# Deductive database

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Deductive_database
> Markdown URL: https://mediated.wiki/source/Deductive_database.md
> Source: https://en.wikipedia.org/wiki/Deductive_database
> Source revision: 1292079040
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Database system}}
A '''deductive database''' is a [database system](/source/database_system) that can make [deductions](/source/Deductive_reasoning) (i.e. conclude additional facts) based on [rules](/source/wiktionary%3Arule) and [fact](/source/fact)s stored in its database. [Datalog](/source/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](/source/logic_programming) with [relational database](/source/relational_database)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](/source/expressive_power_(computer_science)) than logic programming systems such as [Prolog](/source/Prolog). In recent years, deductive databases have found new application in [data integration](/source/data_integration), [information extraction](/source/information_extraction), networking, [program analysis](/source/program_analysis), security, and [cloud computing](/source/cloud_computing).<ref>[http://www.cs.ucdavis.edu/~green/papers/sigmod906t-huang.pdf Datalog and Emerging applications]</ref>

Deductive databases reuse many concepts from logic programming; rules and facts specified in Datalog look very similar to those written in Prolog,<ref>{{Citation |last=Maier |first=David |title=Datalog: concepts, history, and outlook |date=2018-09-01 |work=Declarative Logic Programming: Theory, Systems, and Applications |volume=20 |pages=3–100 |url=https://dl.acm.org/doi/10.1145/3191315.3191317 |access-date=2025-01-06 |publisher=Association for Computing Machinery and Morgan & Claypool |doi=10.1145/3191315.3191317 |isbn=978-1-970001-99-0 |last2=Tekle |first2=K. Tuncay |last3=Kifer |first3=Michael |last4=Warren |first4=David S.|url-access=subscription }}</ref> but there are some important differences: 
* 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),<ref>{{Cite web |title=People Search: How It Works |url=https://veripages.com/ |access-date=2025-01-07 |website=veripages.com}}</ref> 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](/source/Cut_(logic_programming)). This has no correspondence in deductive databases.
* Function symbols: Logic programming languages allow [function symbols](/source/Functional_predicate) to build up complex symbols. This is not allowed in deductive databases.
* [Tuple](/source/Tuple)-oriented processing: Deductive databases use set-oriented processing, while logic programming languages concentrate on one tuple at a time.

==References==

{{Reflist}}
{{More citations needed|date=January 2009}}

== Further reading ==
* Author: Herve Gallaire, [Jack Minker](/source/Jack_Minker), Jean-Marie Nicolas: ''Logic and Databases: A Deductive Approach''. Publisher: ACM. [doi:10.1145/356924.356929](/source/doi%3A10.1145%2F356924.356929)
* Author: [Stefano Ceri](/source/Stefano_Ceri), [Georg Gottlob](/source/Georg_Gottlob), Letizia Tanca: ''Logic Programming and Databases''. Publisher: Springer-Verlag. {{ISBN|978-0-387-51728-5}}
* Author: Ramez Elmasri and Shamkant Navathe: ''Fundamentals of Database Systems'' (3rd edition). Publisher: Addison-Wesley Longman. {{ISBN|0-201-54263-3}}

{{Database models}}
{{Authority control}}

Category:Database management systems

{{database-stub}}

---
Adapted from the Wikipedia article [Deductive database](https://en.wikipedia.org/wiki/Deductive_database) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Deductive_database?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
