Deductive database: Difference between revisions
No edit summary |
|||
Line 5: | Line 5: | ||
* Order sensitivity and procedurality: In Prolog program execution depends on the order of rules in the program and on the order of parts of rules; these properties are used by programmers to build effective programs. In database languages (like SQL or Datalog), however, program execution is independent of the order or rules and facts. |
* Order sensitivity and procedurality: In Prolog program execution depends on the order of rules in the program and on the order of parts of rules; these properties are used by programmers to build effective programs. In database languages (like SQL or Datalog), however, program execution is independent of the order or rules and facts. |
||
* Special predicates: In Prolog programmers can directly influence the procedural evaluation of the program with special predicates such as the [[Cut (logic programming)|cut]], this has no correspondence in deductive databases. |
* Special predicates: In Prolog programmers can directly influence the procedural evaluation of the program with special predicates such as the [[Cut (logic programming)|cut]], this has no correspondence in deductive databases. |
||
* Function symbols: Logic Programming languages allow [[Functional predicate|function |
* Function symbols: Logic Programming languages allow [[Functional predicate|function symbols]] to build up complex symbols. This is not allowed in deductive databases. |
||
* Tuple oriented processing: Deductive databases use set oriented processing while logic programming languages concentrate on one tuple at a time. |
* Tuple oriented processing: Deductive databases use set oriented processing while logic programming languages concentrate on one tuple at a time. |
||
Revision as of 18:25, 15 April 2010
A deductive database system is a database system which can make deductions (ie: conclude additional facts) based on rules and facts stored in the (deductive) database. Datalog is the language typically used to specify facts, rules and queries in deductive databases. Deductive databases have grown out of the desire to combine logic programming with relational databases to construct systems that support a powerful formalism and are still fast and able to deal with very large datasets. Deductive databases are more expressive than relational databases but less expressive than logic programming systems. Deductive databases have not found widespread adoptions outside academia, but some of their concepts are used in today's relational databases to support the advanced features of more recent SQL standards.
Deductive databases and logic programming
Deductive databases reuse a large number of concepts from logic programming; rules and facts specified in the deductive database language Datalog look very similar to those in Prolog. However, there are a number of important differences between deductive databases and logic programming:
- Order sensitivity and procedurality: In Prolog program execution depends on the order of rules in the program and on the order of parts of rules; these properties are used by programmers to build effective programs. In database languages (like SQL or Datalog), however, program execution is independent of the order or rules and facts.
- Special predicates: In Prolog programmers can directly influence the procedural evaluation of the program with special predicates such as the cut, this has no correspondence in deductive databases.
- Function symbols: Logic Programming languages allow function symbols to build up complex symbols. This is not allowed in deductive databases.
- Tuple oriented processing: Deductive databases use set oriented processing while logic programming languages concentrate on one tuple at a time.
References
Further reading
- Author: Stefano Ceri, Georg Gottlob, Letizia Tanca: Logic Programming and Databases. Publisher: Springer-Verlag. ISBN 978-0387517285
- Author: Ramez Elmasri and Shamkant Navathe: Fundamentals of Database Systems (3rd edition). Publisher: Addison-Wesley Longman. ISBN 0-201-54263-3