DEDUCTIVE DATABASES
Popoola, John Abimbola (johnbimbo12@gmail.com)
Yusuf Wasiu
CONTENTS
• Introduction
• Philosophy
• Architecture
• Evaluation
• Example Applications
• References
INTRODUCTION
• A deductive database is one that can make conclusions (or deductions)
from the rules and facts stored in such deductive database.
• Its advantage comes into play especially with the presence of large
amount of data belonging to complex domains such as mineral
exploration and financial analysis.
• As a result of the problem of understanding and interpreting this large
amount of information, a mechanism for reasoning the stored
information is necessary.
PHILOSOPHY
• Stems from the need to merge logic programming with relational
databases, whilst still ensuring the database is efficient and scalable.
• It is an implementation of deductive reasoning.
• Here’s a classical example:
All men are mortal.
Socrates is a man.
Therefore, Socrates is mortal.
PHILOSOPHY: LAW OF DETACHMENT
• The first form of deductive reasoning, also known as Modus ponens.
• States that if the two statements are true, we can derive a third true
statement, which is the conclusion.
• Format:
If p, then q.
p
q
• Example:
If I have money, I will help you.
I have money.
I will help you
PHILOSOPHY: LAW OF SYLLOGISM
• Combines the hypothesis of a first statement with the conclusion of a
second statement. The synergy between the two provides a conclusion.
• Format:
P  Q.
Q  R.
Therefore, P  R.
• Example:
If you don’t study well, you won’t pass your exams.
If you don’t pass your exams, you won’t graduate.
Therefore, if you don’t study well, you won’t graduate.
PHILOSOPHY: LAW OF CONTRAPOSITIVE
• Also known as Modus tollens.
• States that a false antecedent leads to a false consequent i.e. if a
conclusion is false, the hypothesis must also be false.
• Format:
P  Q.
~Q.
Therefore, we can conclude ~P.
• Example:
If a number is even, then it is divisible by 2.
9 is not divisible by 2.
Therefore, 9 is not an even number.
VALIDITY & SOUNDNESS
• Arguments based on Deductive Reasoning are evaluated in terms of
their validity and soundness.
• Validity  If all of the premises of an argument are true, the conclusion
would have to be true, i.e. it is impossible for the conclusion to be false
when all the premises are true.
• Example:
• All Computer Science courses are interesting.
• Database Management is a Computer Science course.
• Therefore, Database Management is interesting.
VALIDITY & SOUNDNESS
• Note: Validity does not take into account whether an argument is true
or not.
• This implies an argument can be valid, albeit totally false.
• Example:
Bingo is a dog.
All dogs are reptiles.
Therefore, Bingo is a reptile.
• A valid argument need not have true premises or a true conclusion, but
a sound argument needs to.
VALIDITY & SOUNDNESS
• Sound Argument Valid + True premises
• A sound argument must always have true premises, and as such will
have a true condition.
• Example:
All animals are living things.
Tortoise is an animal.
Therefore, tortoise is a living thing.
ARCHITECTURE
• A deductive database is made up of the following components:
• Basic Facts (Database)
• Procedures which are used to calculate new values (Bank of
Procedures)
• Non-procedural description of a system functionality (Rules of
inference)
ARCHITECTURE
DBMS
DB
Database Schema
Terms (Basic Facts)
Terms (Procedures)
Rules of Inference
Bank of Procedures
(External Procedures)
Database
(Basic Facts)
OUTPUT
DEDUCTIVE DATABASE
• DATALOG: This is a programming language used in
deductive database
• It is part of another language called Prolog and incorporates
basic logic principles for data integration, database queries,
etc.
• Datalog has found new application in Data integration,
Declarative Networking, Program Analysis, and Commercial
and Academic Systems2
DATALOG
• The general syntax for Datalog rule is given below
ancestor(X,Y) :- parent(X,Y).
ancestor(X,Y) :- parent(X,Z), ancestor(Z,Y).
• These two lines define two facts, i.e. things that always hold “the parent of mary is
bill and the parent of john is mary”.
parent(bill, mary).
parent(mary, john).
• Bottom - Up (forward chaining)
• The inference engine creates new facts by applying the rules to the original facts.
• Once these new facts are created the forward chaining inference engine will check the
new facts against the query predicate goal for a match.
• Facts will only be generated that are relevant to the query
• Else if all other possible facts are created it becomes inefficient for systems that have
a large set of rules and facts.
EVALUATION OF DEDUCTIVE DATABASE
EVALUATION OF DEDUCTIVE DATABASE
• Top - Down (backward Chaining)
• The top down approach is also known as backward chaining or top-down resolution.
• As the name suggests, this inference engines works in the opposite way to the bottom-
up inference mechanism.
• Deductive database provides an intelligent database system capable of generating new rules
from existing rules and facts.
• This type of functionality has many, possible, applications specifically:
• Artificial Intelligence
• Semantic networks
• Frames
• Production systems
• Rules for capturing domain-specific knowledge
DEDUCTIVE DATABASE APPLICATION
DEDUCTIVE DATABASE EXAMPLE
• CORAL: CORAL project was developed at the University of
Wisconsin in 1988; the idea was to develop a robust deductive
database system.
• The CORAL system uses a declarative language and has a C++
front-end, allowing the user to program declaratively and
imperatively.
• CORAL combines the most important features of SQL and
REFERENCES
• Ramakrishnan, R., Bothner, P., Srivastava, D., and Sudarshan, S. CORAL: A database
programming language. Proceedings of the NACLP Workshop on Deductive Databases,
Austin, TX, 1990. Available as Report TR-CS-90-14, Department of Computing and
Information Sciences, Kansas State University.
• Ludascher, B., May, W., and Lausen, G. ¨ Nested transactions in a logical language for active
rules. In LID (1996).
• Ross, K. A syntactic stratification condition using constraints. In ILPS (1994).
• Abiteboul, S., Hull, R. and Vianu, V. (1995) Foundations of Databases. Addison-Wesley,
Reading, MA, 1995.
• Green, T. J., Huang, S. S., and Loo, B. T. Datalog and recursive query processing. Foundations
and Trends in Databases (2011). In preparation.
• Ackley, D., et al. (1990) System Analysis for Deductive Database Environments: an Enhanced
role for Aggregate Entities, Procs. 9th Int. Conference on Entity-Relationship Approach,
Lausanne, CH, Oct. 8-10, 1990.
Thank You

Deductive databases

  • 1.
    DEDUCTIVE DATABASES Popoola, JohnAbimbola (johnbimbo12@gmail.com) Yusuf Wasiu
  • 2.
    CONTENTS • Introduction • Philosophy •Architecture • Evaluation • Example Applications • References
  • 3.
    INTRODUCTION • A deductivedatabase is one that can make conclusions (or deductions) from the rules and facts stored in such deductive database. • Its advantage comes into play especially with the presence of large amount of data belonging to complex domains such as mineral exploration and financial analysis. • As a result of the problem of understanding and interpreting this large amount of information, a mechanism for reasoning the stored information is necessary.
  • 4.
    PHILOSOPHY • Stems fromthe need to merge logic programming with relational databases, whilst still ensuring the database is efficient and scalable. • It is an implementation of deductive reasoning. • Here’s a classical example: All men are mortal. Socrates is a man. Therefore, Socrates is mortal.
  • 5.
    PHILOSOPHY: LAW OFDETACHMENT • The first form of deductive reasoning, also known as Modus ponens. • States that if the two statements are true, we can derive a third true statement, which is the conclusion. • Format: If p, then q. p q • Example: If I have money, I will help you. I have money. I will help you
  • 6.
    PHILOSOPHY: LAW OFSYLLOGISM • Combines the hypothesis of a first statement with the conclusion of a second statement. The synergy between the two provides a conclusion. • Format: P  Q. Q  R. Therefore, P  R. • Example: If you don’t study well, you won’t pass your exams. If you don’t pass your exams, you won’t graduate. Therefore, if you don’t study well, you won’t graduate.
  • 7.
    PHILOSOPHY: LAW OFCONTRAPOSITIVE • Also known as Modus tollens. • States that a false antecedent leads to a false consequent i.e. if a conclusion is false, the hypothesis must also be false. • Format: P  Q. ~Q. Therefore, we can conclude ~P. • Example: If a number is even, then it is divisible by 2. 9 is not divisible by 2. Therefore, 9 is not an even number.
  • 8.
    VALIDITY & SOUNDNESS •Arguments based on Deductive Reasoning are evaluated in terms of their validity and soundness. • Validity  If all of the premises of an argument are true, the conclusion would have to be true, i.e. it is impossible for the conclusion to be false when all the premises are true. • Example: • All Computer Science courses are interesting. • Database Management is a Computer Science course. • Therefore, Database Management is interesting.
  • 9.
    VALIDITY & SOUNDNESS •Note: Validity does not take into account whether an argument is true or not. • This implies an argument can be valid, albeit totally false. • Example: Bingo is a dog. All dogs are reptiles. Therefore, Bingo is a reptile. • A valid argument need not have true premises or a true conclusion, but a sound argument needs to.
  • 10.
    VALIDITY & SOUNDNESS •Sound Argument Valid + True premises • A sound argument must always have true premises, and as such will have a true condition. • Example: All animals are living things. Tortoise is an animal. Therefore, tortoise is a living thing.
  • 11.
    ARCHITECTURE • A deductivedatabase is made up of the following components: • Basic Facts (Database) • Procedures which are used to calculate new values (Bank of Procedures) • Non-procedural description of a system functionality (Rules of inference)
  • 12.
    ARCHITECTURE DBMS DB Database Schema Terms (BasicFacts) Terms (Procedures) Rules of Inference Bank of Procedures (External Procedures) Database (Basic Facts) OUTPUT
  • 13.
    DEDUCTIVE DATABASE • DATALOG:This is a programming language used in deductive database • It is part of another language called Prolog and incorporates basic logic principles for data integration, database queries, etc. • Datalog has found new application in Data integration, Declarative Networking, Program Analysis, and Commercial and Academic Systems2
  • 14.
    DATALOG • The generalsyntax for Datalog rule is given below ancestor(X,Y) :- parent(X,Y). ancestor(X,Y) :- parent(X,Z), ancestor(Z,Y). • These two lines define two facts, i.e. things that always hold “the parent of mary is bill and the parent of john is mary”. parent(bill, mary). parent(mary, john).
  • 15.
    • Bottom -Up (forward chaining) • The inference engine creates new facts by applying the rules to the original facts. • Once these new facts are created the forward chaining inference engine will check the new facts against the query predicate goal for a match. • Facts will only be generated that are relevant to the query • Else if all other possible facts are created it becomes inefficient for systems that have a large set of rules and facts. EVALUATION OF DEDUCTIVE DATABASE
  • 16.
    EVALUATION OF DEDUCTIVEDATABASE • Top - Down (backward Chaining) • The top down approach is also known as backward chaining or top-down resolution. • As the name suggests, this inference engines works in the opposite way to the bottom- up inference mechanism.
  • 17.
    • Deductive databaseprovides an intelligent database system capable of generating new rules from existing rules and facts. • This type of functionality has many, possible, applications specifically: • Artificial Intelligence • Semantic networks • Frames • Production systems • Rules for capturing domain-specific knowledge DEDUCTIVE DATABASE APPLICATION
  • 18.
    DEDUCTIVE DATABASE EXAMPLE •CORAL: CORAL project was developed at the University of Wisconsin in 1988; the idea was to develop a robust deductive database system. • The CORAL system uses a declarative language and has a C++ front-end, allowing the user to program declaratively and imperatively. • CORAL combines the most important features of SQL and
  • 19.
    REFERENCES • Ramakrishnan, R.,Bothner, P., Srivastava, D., and Sudarshan, S. CORAL: A database programming language. Proceedings of the NACLP Workshop on Deductive Databases, Austin, TX, 1990. Available as Report TR-CS-90-14, Department of Computing and Information Sciences, Kansas State University. • Ludascher, B., May, W., and Lausen, G. ¨ Nested transactions in a logical language for active rules. In LID (1996). • Ross, K. A syntactic stratification condition using constraints. In ILPS (1994). • Abiteboul, S., Hull, R. and Vianu, V. (1995) Foundations of Databases. Addison-Wesley, Reading, MA, 1995. • Green, T. J., Huang, S. S., and Loo, B. T. Datalog and recursive query processing. Foundations and Trends in Databases (2011). In preparation. • Ackley, D., et al. (1990) System Analysis for Deductive Database Environments: an Enhanced role for Aggregate Entities, Procs. 9th Int. Conference on Entity-Relationship Approach, Lausanne, CH, Oct. 8-10, 1990.
  • 20.