Chris Pollett > Students >
Harini Rao

    ( Print View )










CS298 Proposal

A Simple Interface for Nonstandard Knowledge Systems (SINKS)

Harini Rao (

Advisor: Dr. Chris Pollett

Committee Members: A Simple Interface for Nonstandard Knowledge Systems (SINKS) Harini Rao (

Abstract: Deductive databases extend relational databases, utilizing logic-programming rules for more complex data modeling. A deductive database system is a database system that includes capabilities to define deductive rules, which can deduce or infer additional information from the facts that are stored in a database. They are more beneficial than the traditional relational databases as they provide means for expressing disjunction and negation information. Query processing is also much simpler and easier in deductive databases.

Currently, most of the deductive-style databases such as NAIL!, LDL, CORAL, XSB, etc. usually act as front-ends to a more traditional relational database. It might make it easier to deploy a deductive database system as a back end for a relational database since, then only, the designer of the database needs to understand the non-standard knowledge system and the application programmers can use the SQL they know and love. For my master's project, I intend to develop an interface system whereby non-standard knowledge systems can make their resources available as a backend to a more traditional relational database. The particular deliverable I am working towards is an XSB system backend for the Oracle system.

CS297 Results

To design the interface, a strong foundation is required in logic programming and so the entire previous semester has been devoted to learning about nonstandard knowledge representation systems, the deductive database XSB, its various features, and the interfaces it supports.

  • Researched XSB, stable models and Smodels system.
  • Developed a program that calculates the stable models semantics of a propositional logic program stored in a file.
  • Designed a program that uses XSB's tabling features.
  • Created random Smodels knowledge bases and used the Smodels system to generate stable models
  • Suggested a design for the proposed interface using triggers and stored procedures.
  • Suggested future enhancements and proposed designs to extend the interface for other databases like Microsoft.s SQL Server and Postgres

Proposed Schedule

Week 1 Aug26 . Sep1 Prepare 298 proposal
Week 2& 3: Sep2 -15 Read about Updatable Views, Instead Of triggers and, Stored Procedures in Oracle.
Week 4 & 5 & 6: Sep16 . Oct 6 Deliverable (1) due
Week 7: Oct7-13 Read about C Procedures and XSB
Week 8 & 9 & 10: Oct14-Nov 3 Deliverable (2) due
Week 11 Nov 4 - 10 Final test and debug, Write-up
Week 12: Nov 11 - 17 Give draft to committee, clean up code
Week 13: Nov 18 . Dec1 Prepare final presentation
Week 14: Dec 2 - 8 Finalize write-up
Week 15 Dec 8 -15 Oral defense.

Key Deliverables:

My main deliverable will be an Oracle.XSB interface that allows Oracle users/application programs to access XSB data stores via Oracle. This interface will allow facts in the deductive database XSB to be accessed from Oracle.s environment as though they existed as tables, using updatable views. It will allow the users to write SQL commands like SELECT, INSERT, UPDATE, and DELETE to be passed to the interface and will use .Instead of. triggers and stored procedures to retrieve and update the data from XSB. The interface will be written in a flexible enough manner so that it can be used to connect other relational databases like Microsoft.s SQL SERVER to XSB, as SQL SERVER also supports Instead of triggers and SQL stored procedures. As XSB already has interfaces to other knowledge-based systems such as Smodels, this will mean that my deliverable will be quite general.

  • Software
    • View Level Interface that translates SQL queries to Prolog clauses to retrieve the data from XSB.
    • Instead of. Triggers for accessing the XSB-C interface for updating the data.
    • Stored Procedures for accessing the XSB-C interface for the retrieval of data without updating it.
    • C functions for calling XSB, which allow a C program to initialize XSB and then to interact with XSB to have it, execute commands or queries.
  • Report
    • Description of the architecture of the View Level interface that allows XSB to make its resources available as a backend to Oracle.
    • Description of the architecture of the XSB-C interface.

Innovations and Challenges

  • This interface will allow facts in the deductive database XSB to be accessed from Oracle.s environment as though they existed as tables.
  • It will allow users to write SQL statements to access data from XSB and does not require the user to be familiar with programming logic-based systems.
  • This system is innovative in that it will lower how much a user needs to know compared to the present situation in order to add fuzzy or rule-based information to a relational database. Adding such table that could be useful to limit the scope of queries and potentially improve the speed of their evaluation.
  • Translation of prolog clauses into SQL queries is complex that our View level interface must solve.
  • Retrieval of data without updating it poses an interesting design challenge as triggers can only be invoked by the DML statements (INSERT, UPDATE, or DELETE).
  • Stored procedures will be used for retrieval of data, which interact with XSB-C interface


Foundations of Databases. Abiteboul, Hull, Vianu. Addison Wessley. 1995.

Fundamentals of Database Systems 3rd. Ed. ElMasri and Navathe. Addison-Wesley. 2000.

Jaffar and Mahar. Constraint Logic Programming: A survey. Journal of Logic Programming. pp503-581. 1994.

I.Niemela and P. Simons. Smodels - an implementation of the stable model and well-founded semantics for normal logic programs. In Proceedings of the 4th International Conference on Logic Programming and Nonmonotonic Reasoning, volume 1265 of Lecture Notes in Artificial Intelligence, pages 420-429, Dagstuhl, Germany, July 1997.

P. Simons. Extending and Implementing the Stable Model Semantics. Doctoral dissertation. Research Report 58, Helsinki University of Technology, Helsinki, Finland, April 2000.

The XSB Research Group.