Deductive database
Encyclopedia
A Deductive database is a database system
Database system
A database system is a term that is typically used to encapsulate the constructs of a data model, database Management system and database....

 that can make deductions
Deductive reasoning
Deductive reasoning, also called deductive logic, is reasoning which constructs or evaluates deductive arguments. Deductive arguments are attempts to show that a conclusion necessarily follows from a set of premises or hypothesis...

 (i.e.: conclude additional facts) based on rules and facts
Facts
Facts usually refers to the usage as a plural noun of fact, an incontrovertible truth.Facts may also refer to:*Carroll, Lewis, who wrote a poem called "Facts"*FACTS , program produced by Asia Television in Hong Kong....

 stored in the (deductive) database. Datalog
Datalog
Datalog is a query and rule language for deductive databases that syntactically is a subset of Prolog. Its origins date back to the beginning of logic programming, but it became prominent as a separate area around 1977 when Hervé Gallaire and Jack Minker organized a workshop on logic and databases...

 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
Logic programming
Logic programming is, in its broadest sense, the use of mathematical logic for computer programming. In this view of logic programming, which can be traced at least as far back as John McCarthy's [1958] advice-taker proposal, logic is used as a purely declarative representation language, and a...

 with relational database
Relational database
A relational database is a database that conforms to relational model theory. The software used in a relational database is called a relational database management system . Colloquial use of the term "relational database" may refer to the RDBMS software, or the relational database itself...

s 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
SQL
SQL is a programming language designed for managing data in relational database management systems ....

 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
Prolog
Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics.Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is declarative: the program logic is expressed in terms of...

. 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 efficient programs. In database languages (like SQL or Datalog), however, program execution is independent of the order of rules and facts.
  • Special predicates: In Prolog, programmers can directly influence the procedural evaluation of the program with special predicates such as the cut
    Cut (logic programming)
    The cut, in Prolog, is a goal, written as !, which always succeeds, but cannot be backtracked past. It is best used to prevent unwanted backtracking, for example, to prevent extra solutions being found by Prolog and avoid additional computations that are not desired or required in a program.The cut...

    , this has no correspondence in deductive databases.
  • Function symbols: Logic Programming languages allow function symbols
    Functional predicate
    In formal logic and related branches of mathematics, a functional predicate, or function symbol, is a logical symbol that may be applied to an object term to produce another object term....

     to build up complex symbols. This is not allowed in deductive databases.
  • Tuple
    Tuple
    In mathematics and computer science, a tuple is an ordered list of elements. In set theory, an n-tuple is a sequence of n elements, where n is a positive integer. There is also one 0-tuple, an empty sequence. An n-tuple is defined inductively using the construction of an ordered pair...

     oriented processing: Deductive databases use set-oriented processing while logic programming languages concentrate on one tuple at a time.

Further reading

  • Author: Stefano Ceri, Georg Gottlob
    Georg Gottlob
    Georg Gottlob FRS is an Oxford-based Austrian computer scientist who works in the areas of database theory, logic, and artificial intelligence.Gottlob obtained his PhD in computer science at Vienna University of Technology in 1981...

    , 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
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK