SlideShare uma empresa Scribd logo
1 de 30
Deductive Databases
ADBMS
By:
Dabbal S. Mahara
2017
Deduction and Induction
 Deductive: towards the consequences
• All swans are white.
• Tessa is a swan.
 Tessa is white.
 Inductive: towards a generalisation of observations
• Joe and Lisa and Tex and Wili and ... (all observed swans)
are swans.
• Joe and Lisa and Tex and Wili and ... (all observed swans)
are white.
 All swans are white.
2
Deduction
 Human beings have the interesting ability to derive facts from a set
of data, even though these facts are not explicitly represented in the
data.
 That is, given appropriate information, humans can deduce new
information by applying rules.
 For example, given a list of people and their parents, we could
deduce their grandparents, great-grandparents, and so on, despite
the fact that these facts were not explicitly represented in the
original data.
 What we have done is to use a rule: “the parent of a parent is a
grandparent (and so on).”
3
Conventional Databases
 In very general terms, a conventional database consists of a
collection of facts.
 Using some form of query language, these facts may be accessed
and manipulated as required.
 However, facts must be explicitly stored in the database for them to
be of any use.
 If a fact is not explicitly represented in the database, then as far as
the database is concerned, that fact effectively does not exist.
4
Conventional Database
 To clarify this idea of implicit data representation, consider the following
example.
 Suppose we have a conventional database that contains the two facts:
• “John is Bill’s father.”
• “Bill is Derek’s father.”
 Now most people will quickly realise that John is also Derek’s grandfather
(assuming, of course, that the two Bills are the same person).
 In other words, this fact is implicit in the two existing facts. However, the
fact “John is Derek’s grandfather” is not stored in the database, so as far
as the database is concerned, there is no relationship whatsoever
between John and Derek.
5
Deductive Database
 A deductive database contains not only facts, but also general rules.
 These rules can be used to deduce new facts that are not explicitly
represented in the database; that is, data can be stored implicitly.
 Now consider the following deductive database:
“John is Bill’s father.”
“Bill is Derek’s father.”
“IF x is y’s father AND y is z’s father, THEN x is z’s grandfather.”
 In addition to the two facts, this database also contains a rule that specifies
the grandfather relationship between a pair of entities.
 The database can prove the statement “John is Derek’s grandfather” by
making the following substitution into the rule: x = “John”, y = “Bill” and z =
“Derek”.
6
Deductive Database
 The effect of rules of this form is to define new relations that are not
explicitly represented in the database.
 These are known as implicit or virtual relations. Explicit relations, like the
father relation above, are known as base relations.
 The set of virtual relations is called the intensional database (IDB), while
the set of base relations is called the extensional database (EDB).
 Deductive database systems are based on first-order logic. First-order
logic allows us to express both facts and rules about the facts using the
same syntax.
7
First Order Logic
 The first-order predicate calculus is one particular
language for expressing logical statements.
 For example, the representation of the database above in
first-order logic would be:
→ father(John, Bill)
→ father(Bill, Derek)
(∀x ∀y ∀z)(father(x, y) ∧ father(y, z) → grandfather(x, z))
where ∧, → and ∀ represent conjunction, implication and
the quantifier “for all” respectively.
8
Deductive Database
 A deductive database can be defined as an advanced database
augmented with an inference system.
 Deductive databases have grown out of the desire to combine logic
programming with relational databases to construct systems that
support a powerful formalism.
 The immediate advantage of this is that it can potentially reduce the
space needed to store data
Database + Inference
Deductive
database
9
Deductive Database
 In a deductive database system we typically specify rules through a
declarative language—a language in which we specify what to
achieve rather than how to achieve it.
 An inference engine (or deduction mechanism) within the system
can deduce new facts from the database by interpreting these
rules.
 Deductive databases have not found widespread adoptions outside
academia, but some of their concepts are used in todays relational
databases to support the advanced features of more recent SQL
standards.
10
Why Deductive DBs?
 This has the advantage that some data can be stored implicitly
using rules, rather than explicitly. This reduces the amount of
storage the database occupies.
 The use of rules also allows us to store new kinds of data, such
as recursive data.
 It incorporates the features and power of a logic programming
language (e.g. Prolog).
11
Deductive Database
 Expert systems work in a similar way to deductive
databases, using rules to deduce information.
 A deductive database is oriented towards storing and
manipulating large amounts of data, whereas an expert
system stores and manipulates large numbers of rules.
 These rules are usually expressed in the database query
language Datalog because of its simplicity and readability .
12
 The deductive database work based on logic has used Prolog as a
starting point. A variation of Prolog called Datalog is used to define rules
declaratively in conjunction with an existing set of relations, which are
themselves treated as literals in the language.
 A deductive database uses two main types of specifications: facts and
rules.
 Facts can be considered as the data stored as relations in a relational
database.Facts are specified in a manner similar to the way relations are
specified, except that it is not necessary to include the attribute names.
 Rules are somewhat similar to relational views. They specify virtual
relations that are not actually stored but that can be formed from the facts
by applying inference mechanisms based on the rule specifications.
13Specification of DDB
14
Prolog/Datalog Notation
 The notation used in Prolog/Datalog is based on providing
predicates with unique names
 A predicate has an implicit meaning, which is suggested by
the predicate name, and a fixed number of arguments
 If the arguments are all constant values, the predicate simply
states that a certain fact is true
 If the predicate has variables as arguments, it is either
considered as a query or as part of a rule or constraint
 All constant values in a predicate are either numeric or
character strings starting with lowercase letters, whereas
variable names always start with an uppercase letter
Datalog Notation
 A program is built from basic objects called atomic formulas
 Atomic formulas are literals of the form p(a1, a2, …, an), where p
is a predicate name and n is the number of arguments for
predicate p
 Different predicate symbols can have different number of
arguments, and the number of arguments n of predicate p is
sometimes called the arity or degree of p
 The arguments can be either constant values or variable
names; Constant values are either numeric or character strings
starting with lowercase letters, whereas variable names always
start with an uppercase letter
16
Prolog/Datalog Notation
Fig: (a) Prolog notation (b) The supervisory tree
Basic inference mechanism for logic
programs
17
• Interpretation of programs (rules + facts)
• There are two main alternatives for interpreting the theoretical
meaning of rules: proof theoretic, and model theoretic interpretation
• proof theoretic interpretation: In the proof-theoretic interpretation of
rules, we consider the facts and rules to be true statements, or
axioms. Ground axioms contain no variables.
1. The facts are ground axioms that are considered to be true
statements.
2. Rules are deductive axioms since they are used to construct
proofs that derive new facts from existing facts.
• The example given next shows how to prove the fact
SUPERIOR(james, ahmad)
18
Example:
1. superior(X, Y)  supervise(X, Y). (rule 1)
2. superior(X, Y)  supervise(X, Z), superior (Z, Y). (rule 2)
3. supervise(jennifer, ahmad). (ground axiom, given)
4. supervise(james, jennifer). (ground axiom, given)
5. superior(jennifer, ahmad). (apply rule 1 on 3)
6. superior(james, ahmad). (apply rule 2 on 4 and 5)
 Given a finite or an infinite domain of constant values, assign to each
predicate in the program every possible combination of values as arguments.
 We must then determine whether the predicate is true or false.
 In general, it is sufficient to specify the combinations of arguments that make
the predicate true, and to state that all other combinations make the
predicate false.
 If this is done for every predicate, it is called an interpretation of the set of
predicates.
 For example, consider the interpretation shown in Figure given next for the
predicates SUPERVISE and SUPERIOR.
 This interpretation assigns a truth value (true or false) to every possible
combination of argument values (from a finite domain) for the two predicates.
19Model theoretic interpretation
Model theoretic interpretation 20
• An interpretation is called a model for a specific set of rules if
those rules are always true under that interpretation;
• that is, for any values assigned to the variables in the rules, the
head of the rules is true when we substitute the truth values
assigned to the predicates in the body of the rule by that
interpretation.
21
Example:
1. superior(X, Y)  supervise(X, Y). (rule 1)
2. superior(X, Y)  supervise(X, Z), superior(Z, Y). (rule 2)
known facts:
supervise(franklin, john), supervise(franklin, ramesh),
supervise(franklin, joyce), supervise(james, franklin),
supervise(jennifer, alicia), supervise(jennifer, ahmad),
supervise(james, jennifer).
For all other possible (X, Y) combinations supervise(X, Y) is false.
domain = {james, franklin, john, ramesh, joyce, jennifer, alicia, ahmad}
22
• The above interpretation is also a model for the rules (1) and (2) since each
of them evaluates always to true under the interpretation.
• For example,
superior(X, Y)  supervise(X, Y)
superior(franklin, john)  supervise(franklin, john) is true.
superior(franklin, ramesh)  supervise(franklin, ramesh) is true.
... …
superior(X, Y)  supervise(X, Z), superior(Z, Y)
superior(james, ramesh)  supervise(james, franklin),
superior (franklin, ramesh) is true.
superior(james, alicia)  supervise(james, jennifer),
superior (jennifer, alicia) is true.
Inference mechanism 23
• In general, there are two approaches to evaluating logical
programs: bottom-up and top-down.
• Bottom-up mechanism (also called forward chaining and
bottom-up resolution)
1. The inference engine starts with the facts and applies the
rules to generate new facts. That is, the inference moves
forward from the facts toward the goal.
2. As facts are generated, they are checked against the
query predicate goal for a match.
24
- Example
query goal: superior(james, Y)?
rules and facts are given as above.
1. Check whether any of the existing facts directly matches the query.
2. Apply the first rule to the existing facts to generate new facts.
3. Apply the second rule to the existing facts to generate new facts.
4. As each fact is generated, it is checked for a match of the the query
goal.
5. Repeat step 1 - 4 until no more new facts can be found.
All the facts of the form: superior(james, a) are the answers.
25
Example:
1. superior(X, Y)  supervise(X, Y). (rule 1)
2. superior(X, Y)  supervise(X, Z), superior(Z, Y). (rule 2)
known facts:
supervise(franklin, john), supervise(franklin, ramesh),
supervise(franklin, joyce), supervise(james, franklin),
supervise(jennifer, alicia), supervise(jennifer, ahmad),
supervise(james, jennifer).
For all other possible (X, Y) combinations supervise(X, Y) is false.
domain = {james, franklin, john, ramesh, joyce, jennifer, alicia, ahmad}
superior(james, Y)?
applying the first rule: superior(james, franklin), superior(james, jennifer)
Y = {franklin, jennifer}
applying the second rule: Y = {John, Joyce, Ramesh, alicia, ahmad}
Top-down mechanism 26
(also called back chaining and top-down resolution)
1. The inference engine starts with the query goal and
attempts to find matches to the variables that lead to
valid facts in the database. That is, the inference moves
backward from the intended goal to determine facts that
would satisfy the goal.
2. During the course, the rules are used to generate
subgoals. The matching of these subgoals will lead to the
match of the intended goal.
27
-Example
query goal: ?-superior(james, Y)
rules and facts are given as above.
Query: ?- superior(james, Y)
Rule1: superior(james, Y) 
supervise(james, Y)
Rule2: superior(james, Y) 
supervise(james, Z),
superior(Z, Y)
supervise(james, Z)
superior(franklin, Y) superior(jennifer, Y)
Y=franklin, jennifer
Z=frankiln Z=jennifer
Rule1: superior(franklin, Y) 
supervise(franklin, Y)
Rule1: superior(jennifer, Y) 
supervise(jennifer, Y)
Y= john, ramesh, joyce Y= alicia, ahmad
28
29
Thank You !
30

Mais conteúdo relacionado

Mais procurados

Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database SystemMeghaj Mallick
 
Query optimization
Query optimizationQuery optimization
Query optimizationPooja Dixit
 
Data preprocessing using Machine Learning
Data  preprocessing using Machine Learning Data  preprocessing using Machine Learning
Data preprocessing using Machine Learning Gopal Sakarkar
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)Ravinder Kamboj
 
Frequent itemset mining methods
Frequent itemset mining methodsFrequent itemset mining methods
Frequent itemset mining methodsProf.Nilesh Magar
 
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALADATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALASaikiran Panjala
 
multi dimensional data model
multi dimensional data modelmulti dimensional data model
multi dimensional data modelmoni sindhu
 
Data-Intensive Technologies for Cloud Computing
Data-Intensive Technologies for CloudComputingData-Intensive Technologies for CloudComputing
Data-Intensive Technologies for Cloud Computinghuda2018
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMSkoolkampus
 
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Gyanmanjari Institute Of Technology
 
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...Salah Amean
 

Mais procurados (20)

Deductive Database
Deductive DatabaseDeductive Database
Deductive Database
 
2. visualization in data mining
2. visualization in data mining2. visualization in data mining
2. visualization in data mining
 
Active database
Active databaseActive database
Active database
 
Temporal databases
Temporal databasesTemporal databases
Temporal databases
 
Query processing in Distributed Database System
Query processing in Distributed Database SystemQuery processing in Distributed Database System
Query processing in Distributed Database System
 
Query optimization
Query optimizationQuery optimization
Query optimization
 
Data preprocessing using Machine Learning
Data  preprocessing using Machine Learning Data  preprocessing using Machine Learning
Data preprocessing using Machine Learning
 
Introduction to Data Mining
Introduction to Data MiningIntroduction to Data Mining
Introduction to Data Mining
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
 
Frequent itemset mining methods
Frequent itemset mining methodsFrequent itemset mining methods
Frequent itemset mining methods
 
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALADATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
 
Mobile databases
Mobile databasesMobile databases
Mobile databases
 
Dbms architecture
Dbms architectureDbms architecture
Dbms architecture
 
multi dimensional data model
multi dimensional data modelmulti dimensional data model
multi dimensional data model
 
Data-Intensive Technologies for Cloud Computing
Data-Intensive Technologies for CloudComputingData-Intensive Technologies for CloudComputing
Data-Intensive Technologies for Cloud Computing
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMS
 
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
 
Xml databases
Xml databasesXml databases
Xml databases
 
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
Data Mining: Concepts and Techniques chapter 07 : Advanced Frequent Pattern M...
 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
 

Semelhante a Deductive databases

Principles of Health Informatics: Informatics skills - searching and making d...
Principles of Health Informatics: Informatics skills - searching and making d...Principles of Health Informatics: Informatics skills - searching and making d...
Principles of Health Informatics: Informatics skills - searching and making d...Martin Chapman
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)Nitesh Singh
 
Knowledge representation using predicate logic
Knowledge representation using predicate logicKnowledge representation using predicate logic
Knowledge representation using predicate logicHarshitaSharma285596
 
Basic review on topic modeling
Basic review on  topic modelingBasic review on  topic modeling
Basic review on topic modelingHiroyuki Kuromiya
 
ICS Part 2 Computer Science Short Notes
ICS Part 2 Computer Science Short NotesICS Part 2 Computer Science Short Notes
ICS Part 2 Computer Science Short NotesAbdul Haseeb
 
Foundation_Logic_1.pptx discrete mathematics
Foundation_Logic_1.pptx discrete mathematicsFoundation_Logic_1.pptx discrete mathematics
Foundation_Logic_1.pptx discrete mathematicsSherwinSangalang3
 
Reasoning Over Knowledge Base
Reasoning Over Knowledge BaseReasoning Over Knowledge Base
Reasoning Over Knowledge BaseShubham Agarwal
 
Reasoning Over Knowledge Base
Reasoning Over Knowledge BaseReasoning Over Knowledge Base
Reasoning Over Knowledge BaseShubham Agarwal
 
Pdi conditioning-sum2018-milan-20181004
Pdi conditioning-sum2018-milan-20181004Pdi conditioning-sum2018-milan-20181004
Pdi conditioning-sum2018-milan-20181004University of Twente
 
Duplicate Detection in Hierarchical Data Using XPath
Duplicate Detection in Hierarchical Data Using XPathDuplicate Detection in Hierarchical Data Using XPath
Duplicate Detection in Hierarchical Data Using XPathiosrjce
 
A Distributed Architecture System for Recognizing Textual Entailment
A Distributed Architecture System for Recognizing Textual EntailmentA Distributed Architecture System for Recognizing Textual Entailment
A Distributed Architecture System for Recognizing Textual EntailmentFaculty of Computer Science
 
Prolog Programming : Basics
Prolog Programming : BasicsProlog Programming : Basics
Prolog Programming : BasicsMitul Desai
 
Progress Towards Leveraging Natural Language Processing for Collecting Experi...
Progress Towards Leveraging Natural Language Processing for Collecting Experi...Progress Towards Leveraging Natural Language Processing for Collecting Experi...
Progress Towards Leveraging Natural Language Processing for Collecting Experi...Anubhav Jain
 
Contextual Ontology Alignment - ESWC 2011
Contextual Ontology Alignment - ESWC 2011Contextual Ontology Alignment - ESWC 2011
Contextual Ontology Alignment - ESWC 2011Mariana Damova, Ph.D
 

Semelhante a Deductive databases (20)

Ai lab manual
Ai lab manualAi lab manual
Ai lab manual
 
Principles of Health Informatics: Informatics skills - searching and making d...
Principles of Health Informatics: Informatics skills - searching and making d...Principles of Health Informatics: Informatics skills - searching and making d...
Principles of Health Informatics: Informatics skills - searching and making d...
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)
 
Knowledge representation using predicate logic
Knowledge representation using predicate logicKnowledge representation using predicate logic
Knowledge representation using predicate logic
 
Basic review on topic modeling
Basic review on  topic modelingBasic review on  topic modeling
Basic review on topic modeling
 
01bkb04p.ppt
01bkb04p.ppt01bkb04p.ppt
01bkb04p.ppt
 
ICS Part 2 Computer Science Short Notes
ICS Part 2 Computer Science Short NotesICS Part 2 Computer Science Short Notes
ICS Part 2 Computer Science Short Notes
 
Chapter 5 (final)
Chapter 5 (final)Chapter 5 (final)
Chapter 5 (final)
 
Foundation_Logic_1.pptx discrete mathematics
Foundation_Logic_1.pptx discrete mathematicsFoundation_Logic_1.pptx discrete mathematics
Foundation_Logic_1.pptx discrete mathematics
 
Bi4101343346
Bi4101343346Bi4101343346
Bi4101343346
 
Reasoning Over Knowledge Base
Reasoning Over Knowledge BaseReasoning Over Knowledge Base
Reasoning Over Knowledge Base
 
Reasoning Over Knowledge Base
Reasoning Over Knowledge BaseReasoning Over Knowledge Base
Reasoning Over Knowledge Base
 
G
GG
G
 
Pdi conditioning-sum2018-milan-20181004
Pdi conditioning-sum2018-milan-20181004Pdi conditioning-sum2018-milan-20181004
Pdi conditioning-sum2018-milan-20181004
 
J017616976
J017616976J017616976
J017616976
 
Duplicate Detection in Hierarchical Data Using XPath
Duplicate Detection in Hierarchical Data Using XPathDuplicate Detection in Hierarchical Data Using XPath
Duplicate Detection in Hierarchical Data Using XPath
 
A Distributed Architecture System for Recognizing Textual Entailment
A Distributed Architecture System for Recognizing Textual EntailmentA Distributed Architecture System for Recognizing Textual Entailment
A Distributed Architecture System for Recognizing Textual Entailment
 
Prolog Programming : Basics
Prolog Programming : BasicsProlog Programming : Basics
Prolog Programming : Basics
 
Progress Towards Leveraging Natural Language Processing for Collecting Experi...
Progress Towards Leveraging Natural Language Processing for Collecting Experi...Progress Towards Leveraging Natural Language Processing for Collecting Experi...
Progress Towards Leveraging Natural Language Processing for Collecting Experi...
 
Contextual Ontology Alignment - ESWC 2011
Contextual Ontology Alignment - ESWC 2011Contextual Ontology Alignment - ESWC 2011
Contextual Ontology Alignment - ESWC 2011
 

Mais de Dabbal Singh Mahara (17)

Spatial databases
Spatial databasesSpatial databases
Spatial databases
 
Ordbms
OrdbmsOrdbms
Ordbms
 
Odbms concepts
Odbms conceptsOdbms concepts
Odbms concepts
 
Object database standards, languages and design
Object database standards, languages and designObject database standards, languages and design
Object database standards, languages and design
 
Normalization
NormalizationNormalization
Normalization
 
Relational model
Relational modelRelational model
Relational model
 
Overview of dbms
Overview of dbmsOverview of dbms
Overview of dbms
 
ER modeling
ER modelingER modeling
ER modeling
 
EER modeling
EER modelingEER modeling
EER modeling
 
Unit 9 graph
Unit   9 graphUnit   9 graph
Unit 9 graph
 
Unit 7 sorting
Unit   7 sortingUnit   7 sorting
Unit 7 sorting
 
Unit 6 tree
Unit   6 treeUnit   6 tree
Unit 6 tree
 
Unit 5 linked list
Unit   5 linked listUnit   5 linked list
Unit 5 linked list
 
Unit 4 queue
Unit   4 queueUnit   4 queue
Unit 4 queue
 
Unit 8 searching and hashing
Unit   8 searching and hashingUnit   8 searching and hashing
Unit 8 searching and hashing
 
Unit 3 stack
Unit   3 stackUnit   3 stack
Unit 3 stack
 
Unit 2 algorithm
Unit   2 algorithmUnit   2 algorithm
Unit 2 algorithm
 

Último

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 

Último (20)

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 

Deductive databases

  • 2. Deduction and Induction  Deductive: towards the consequences • All swans are white. • Tessa is a swan.  Tessa is white.  Inductive: towards a generalisation of observations • Joe and Lisa and Tex and Wili and ... (all observed swans) are swans. • Joe and Lisa and Tex and Wili and ... (all observed swans) are white.  All swans are white. 2
  • 3. Deduction  Human beings have the interesting ability to derive facts from a set of data, even though these facts are not explicitly represented in the data.  That is, given appropriate information, humans can deduce new information by applying rules.  For example, given a list of people and their parents, we could deduce their grandparents, great-grandparents, and so on, despite the fact that these facts were not explicitly represented in the original data.  What we have done is to use a rule: “the parent of a parent is a grandparent (and so on).” 3
  • 4. Conventional Databases  In very general terms, a conventional database consists of a collection of facts.  Using some form of query language, these facts may be accessed and manipulated as required.  However, facts must be explicitly stored in the database for them to be of any use.  If a fact is not explicitly represented in the database, then as far as the database is concerned, that fact effectively does not exist. 4
  • 5. Conventional Database  To clarify this idea of implicit data representation, consider the following example.  Suppose we have a conventional database that contains the two facts: • “John is Bill’s father.” • “Bill is Derek’s father.”  Now most people will quickly realise that John is also Derek’s grandfather (assuming, of course, that the two Bills are the same person).  In other words, this fact is implicit in the two existing facts. However, the fact “John is Derek’s grandfather” is not stored in the database, so as far as the database is concerned, there is no relationship whatsoever between John and Derek. 5
  • 6. Deductive Database  A deductive database contains not only facts, but also general rules.  These rules can be used to deduce new facts that are not explicitly represented in the database; that is, data can be stored implicitly.  Now consider the following deductive database: “John is Bill’s father.” “Bill is Derek’s father.” “IF x is y’s father AND y is z’s father, THEN x is z’s grandfather.”  In addition to the two facts, this database also contains a rule that specifies the grandfather relationship between a pair of entities.  The database can prove the statement “John is Derek’s grandfather” by making the following substitution into the rule: x = “John”, y = “Bill” and z = “Derek”. 6
  • 7. Deductive Database  The effect of rules of this form is to define new relations that are not explicitly represented in the database.  These are known as implicit or virtual relations. Explicit relations, like the father relation above, are known as base relations.  The set of virtual relations is called the intensional database (IDB), while the set of base relations is called the extensional database (EDB).  Deductive database systems are based on first-order logic. First-order logic allows us to express both facts and rules about the facts using the same syntax. 7
  • 8. First Order Logic  The first-order predicate calculus is one particular language for expressing logical statements.  For example, the representation of the database above in first-order logic would be: → father(John, Bill) → father(Bill, Derek) (∀x ∀y ∀z)(father(x, y) ∧ father(y, z) → grandfather(x, z)) where ∧, → and ∀ represent conjunction, implication and the quantifier “for all” respectively. 8
  • 9. Deductive Database  A deductive database can be defined as an advanced database augmented with an inference system.  Deductive databases have grown out of the desire to combine logic programming with relational databases to construct systems that support a powerful formalism.  The immediate advantage of this is that it can potentially reduce the space needed to store data Database + Inference Deductive database 9
  • 10. Deductive Database  In a deductive database system we typically specify rules through a declarative language—a language in which we specify what to achieve rather than how to achieve it.  An inference engine (or deduction mechanism) within the system can deduce new facts from the database by interpreting these rules.  Deductive databases have not found widespread adoptions outside academia, but some of their concepts are used in todays relational databases to support the advanced features of more recent SQL standards. 10
  • 11. Why Deductive DBs?  This has the advantage that some data can be stored implicitly using rules, rather than explicitly. This reduces the amount of storage the database occupies.  The use of rules also allows us to store new kinds of data, such as recursive data.  It incorporates the features and power of a logic programming language (e.g. Prolog). 11
  • 12. Deductive Database  Expert systems work in a similar way to deductive databases, using rules to deduce information.  A deductive database is oriented towards storing and manipulating large amounts of data, whereas an expert system stores and manipulates large numbers of rules.  These rules are usually expressed in the database query language Datalog because of its simplicity and readability . 12
  • 13.  The deductive database work based on logic has used Prolog as a starting point. A variation of Prolog called Datalog is used to define rules declaratively in conjunction with an existing set of relations, which are themselves treated as literals in the language.  A deductive database uses two main types of specifications: facts and rules.  Facts can be considered as the data stored as relations in a relational database.Facts are specified in a manner similar to the way relations are specified, except that it is not necessary to include the attribute names.  Rules are somewhat similar to relational views. They specify virtual relations that are not actually stored but that can be formed from the facts by applying inference mechanisms based on the rule specifications. 13Specification of DDB
  • 14. 14 Prolog/Datalog Notation  The notation used in Prolog/Datalog is based on providing predicates with unique names  A predicate has an implicit meaning, which is suggested by the predicate name, and a fixed number of arguments  If the arguments are all constant values, the predicate simply states that a certain fact is true  If the predicate has variables as arguments, it is either considered as a query or as part of a rule or constraint  All constant values in a predicate are either numeric or character strings starting with lowercase letters, whereas variable names always start with an uppercase letter
  • 15. Datalog Notation  A program is built from basic objects called atomic formulas  Atomic formulas are literals of the form p(a1, a2, …, an), where p is a predicate name and n is the number of arguments for predicate p  Different predicate symbols can have different number of arguments, and the number of arguments n of predicate p is sometimes called the arity or degree of p  The arguments can be either constant values or variable names; Constant values are either numeric or character strings starting with lowercase letters, whereas variable names always start with an uppercase letter
  • 16. 16 Prolog/Datalog Notation Fig: (a) Prolog notation (b) The supervisory tree
  • 17. Basic inference mechanism for logic programs 17 • Interpretation of programs (rules + facts) • There are two main alternatives for interpreting the theoretical meaning of rules: proof theoretic, and model theoretic interpretation • proof theoretic interpretation: In the proof-theoretic interpretation of rules, we consider the facts and rules to be true statements, or axioms. Ground axioms contain no variables. 1. The facts are ground axioms that are considered to be true statements. 2. Rules are deductive axioms since they are used to construct proofs that derive new facts from existing facts. • The example given next shows how to prove the fact SUPERIOR(james, ahmad)
  • 18. 18 Example: 1. superior(X, Y)  supervise(X, Y). (rule 1) 2. superior(X, Y)  supervise(X, Z), superior (Z, Y). (rule 2) 3. supervise(jennifer, ahmad). (ground axiom, given) 4. supervise(james, jennifer). (ground axiom, given) 5. superior(jennifer, ahmad). (apply rule 1 on 3) 6. superior(james, ahmad). (apply rule 2 on 4 and 5)
  • 19.  Given a finite or an infinite domain of constant values, assign to each predicate in the program every possible combination of values as arguments.  We must then determine whether the predicate is true or false.  In general, it is sufficient to specify the combinations of arguments that make the predicate true, and to state that all other combinations make the predicate false.  If this is done for every predicate, it is called an interpretation of the set of predicates.  For example, consider the interpretation shown in Figure given next for the predicates SUPERVISE and SUPERIOR.  This interpretation assigns a truth value (true or false) to every possible combination of argument values (from a finite domain) for the two predicates. 19Model theoretic interpretation
  • 20. Model theoretic interpretation 20 • An interpretation is called a model for a specific set of rules if those rules are always true under that interpretation; • that is, for any values assigned to the variables in the rules, the head of the rules is true when we substitute the truth values assigned to the predicates in the body of the rule by that interpretation.
  • 21. 21 Example: 1. superior(X, Y)  supervise(X, Y). (rule 1) 2. superior(X, Y)  supervise(X, Z), superior(Z, Y). (rule 2) known facts: supervise(franklin, john), supervise(franklin, ramesh), supervise(franklin, joyce), supervise(james, franklin), supervise(jennifer, alicia), supervise(jennifer, ahmad), supervise(james, jennifer). For all other possible (X, Y) combinations supervise(X, Y) is false. domain = {james, franklin, john, ramesh, joyce, jennifer, alicia, ahmad}
  • 22. 22 • The above interpretation is also a model for the rules (1) and (2) since each of them evaluates always to true under the interpretation. • For example, superior(X, Y)  supervise(X, Y) superior(franklin, john)  supervise(franklin, john) is true. superior(franklin, ramesh)  supervise(franklin, ramesh) is true. ... … superior(X, Y)  supervise(X, Z), superior(Z, Y) superior(james, ramesh)  supervise(james, franklin), superior (franklin, ramesh) is true. superior(james, alicia)  supervise(james, jennifer), superior (jennifer, alicia) is true.
  • 23. Inference mechanism 23 • In general, there are two approaches to evaluating logical programs: bottom-up and top-down. • Bottom-up mechanism (also called forward chaining and bottom-up resolution) 1. The inference engine starts with the facts and applies the rules to generate new facts. That is, the inference moves forward from the facts toward the goal. 2. As facts are generated, they are checked against the query predicate goal for a match.
  • 24. 24 - Example query goal: superior(james, Y)? rules and facts are given as above. 1. Check whether any of the existing facts directly matches the query. 2. Apply the first rule to the existing facts to generate new facts. 3. Apply the second rule to the existing facts to generate new facts. 4. As each fact is generated, it is checked for a match of the the query goal. 5. Repeat step 1 - 4 until no more new facts can be found. All the facts of the form: superior(james, a) are the answers.
  • 25. 25 Example: 1. superior(X, Y)  supervise(X, Y). (rule 1) 2. superior(X, Y)  supervise(X, Z), superior(Z, Y). (rule 2) known facts: supervise(franklin, john), supervise(franklin, ramesh), supervise(franklin, joyce), supervise(james, franklin), supervise(jennifer, alicia), supervise(jennifer, ahmad), supervise(james, jennifer). For all other possible (X, Y) combinations supervise(X, Y) is false. domain = {james, franklin, john, ramesh, joyce, jennifer, alicia, ahmad} superior(james, Y)? applying the first rule: superior(james, franklin), superior(james, jennifer) Y = {franklin, jennifer} applying the second rule: Y = {John, Joyce, Ramesh, alicia, ahmad}
  • 26. Top-down mechanism 26 (also called back chaining and top-down resolution) 1. The inference engine starts with the query goal and attempts to find matches to the variables that lead to valid facts in the database. That is, the inference moves backward from the intended goal to determine facts that would satisfy the goal. 2. During the course, the rules are used to generate subgoals. The matching of these subgoals will lead to the match of the intended goal.
  • 27. 27 -Example query goal: ?-superior(james, Y) rules and facts are given as above. Query: ?- superior(james, Y) Rule1: superior(james, Y)  supervise(james, Y) Rule2: superior(james, Y)  supervise(james, Z), superior(Z, Y) supervise(james, Z) superior(franklin, Y) superior(jennifer, Y) Y=franklin, jennifer Z=frankiln Z=jennifer Rule1: superior(franklin, Y)  supervise(franklin, Y) Rule1: superior(jennifer, Y)  supervise(jennifer, Y) Y= john, ramesh, joyce Y= alicia, ahmad
  • 28. 28
  • 29. 29