A Datalog interface for SQL (abstract)
暂无分享,去创建一个
The research reported here describes a prototype datalog interface for SQL. Datalog is a logic based declarative language, a version of Prolog, suitable for database systems. The Datalog considered here does not support function symbols in logical rules. The prototype interface is an attempt to provide additional computational power to SQL via a declarative language. In this regard, it could be considered as the basis for a Knowledge Base Management System.
The design of the interface involves three major components: Datalog Compiler, IC (Intermediate Code) Interpreter, and a CLI (Command Line Interpreter). The datalog compiler translates a given datalog program into an equivalent intermediate representation referred to as IC. The IC generated is suitable for efficient bottom-up evaluation of logical rules. In addition to IC generation, the compiler also performs several tasks such as safety checking and rectification of rules.
The IC interpreter achieves the evaluation of the intermediate code, for logical rules, i.e.. the datalog program, in two stages. The first stage generates SQL statements whose execution would carry out the task as defined by the logical rules. The second phase executes the generated SQL statements by invoking the facilities provided by Pro*C interface to SQL. The SQL statement generation and execution processes are not done sequentially but interleaved.
The last component, CLI, provides the user with facilities to invoke the functions of the datalog interface. The interface provides several functions, in addition to the two main ones: compile and execute.