Chapter 5 - 1 Predicate Calculus Formal language –True/False statements –Supports reasoning Usage –Integrity constraints –Non-procedural query languages.

Slides:



Advertisements
Similar presentations
From Handbook of Temporal Reasoning in Artificial Intelligence By Jan Chomicki & David Toman Temporal Databases Presented by Leila Jalali CS224 presentation.
Advertisements

The Logic of Quantified Statements
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Calculus Chapter 4, Part B.
Chapter 3 Tuple and Domain Relational Calculus. Tuple Relational Calculus.
1 541: Relational Calculus. 2 Relational Calculus  Comes in two flavours: Tuple relational calculus (TRC) and Domain relational calculus (DRC).  Calculus.
Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
1 Relational Calculus Chapter 4 – Part II. 2 Formal Relational Query Languages  Two mathematical Query Languages form the basis for “real” languages.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Chapter Predicate Calculus Formal language –True/False statements –Supports reasoning Usage –Integrity constraints –Non-procedural query languages.
Relational Calculus. Another Theoretical QL-Relational Calculus n Comes in two flavors: Tuple relational calculus (TRC) and Domain relational calculus.
Relational Calculus CS 186, Spring 2007, Lecture 6 R&G, Chapter 4 Mary Roth   We will occasionally use this arrow notation unless there is danger of.
SPRING 2004CENG 3521 E-R Diagram for the Banking Enterprise.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse.
1 Relational Algebra and Calculus Yanlei Diao UMass Amherst Feb 1, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Introduction to Database Systems 1 Relational Calculus Relational Model : Topic 2.
Dr. Alexandra I. Cristea CS 319: Theory of Databases: C6.
Relational Calculus CS 186, Fall 2003, Lecture 6 R&G, Chapter 4   We will occasionally use this arrow notation unless there is danger of no confusion.
Rutgers University Relational Calculus 198:541 Rutgers University.
Predicates and Quantifiers
Chapter 1: The Foundations: Logic and Proofs
1 Relational Algebra and Calculus Chapter 4. 2 Relational Query Languages  Query languages: Allow manipulation and retrieval of data from a database.
Lecture 3 [Self Study] Relational Calculus
Discussion #141/20 Discussion #14 Predicate Calculus.
The Relational Model: Relational Calculus
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Relational Calculus Chapter 4, Section 4.3.
1 CS 430 Database Theory Winter 2005 Lecture 6: Relational Calculus.
1st-order Predicate Logic (FOL)
Chapter 8 Relational Calculus. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.8-2 Topics in this Chapter Tuple Calculus Calculus vs. Algebra.
CSE314 Database Systems The Relational Algebra and Relational Calculus Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
Database Management Systems, R. Ramakrishnan1 Relational Calculus Chapter 4.
Introduction to Quantification Chapter 9 Language, Proof and Logic.
Relational Calculus R&G, Chapter 4. Relational Calculus Comes in two flavors: Tuple relational calculus (TRC) and Domain relational calculus (DRC). Calculus.
1 Relational Algebra and Calculas Chapter 4, Part A.
Math 51/COEN 19 Day 3, 1.4 Quantifiers 1. 3 Predicates A lot like functions that return booleans Let P(x) denote x
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Bertram Ludäscher Department of Computer Science & Engineering University of California, San Diego CSE-291: Ontologies in Data Integration.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
LDK R Logics for Data and Knowledge Representation First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
CSC 411/511: DBMS Design Dr. Nan WangCSC411_L5_Relational Calculus 1 Relational Calculus Chapter 4 – Part B.
Logic Programming. Formal Logics- Recap Formulas – w/out quantifiers Free Variables Bound Variables Assignments and satisfaction Validity and satisfiability.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Database Management Systems, R. Ramakrishnan1 Relational Calculus Chapter 4, Part B.
N-ary Relations & Their Applications. 2 n-ary Relations Let A 1, A 2, …, A n be sets. An n-ary relation on these sets is a subset of A 1 x A 2 x … x A.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Relational Calculus Database Management Systems, 3rd ed., Ramakrishnan and Gehrke, Chapter 4.
Relational Calculus Chapter 4, Section 4.3.
3. The Logic of Quantified Statements Summary
Relational Model By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany)
Relational Calculus Chapter 4, Part B
Predicate Calculus Discussion #14 Chapter 2, Section 1 1/20.
Discussion #14 Predicate Calculus
Predicate Calculus Discussion #14 Chapter 2, Section 1.
1st-order Predicate Logic (FOL)
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Predicates and Quantifiers
Logics for Data and Knowledge Representation
Predicate Calculus. Predicate Calculus Topics Predicates Variables and instantiation Quantifiers Logical expressions Bound and free variables.
Relational Calculus Chapter 4, Part B 7/1/2019.
Representations & Reasoning Systems (RRS) (2.2)
CS589 Principles of DB Systems Fall 2008 Lecture 4b: Domain Independence and Safety Lois Delcambre
Relational Calculus Chapter 4 – Part II.
1st-order Predicate Logic (FOL)
Relational Calculus Chapter 4, Part B
Presentation transcript:

Chapter Predicate Calculus Formal language –True/False statements –Supports reasoning Usage –Integrity constraints –Non-procedural query languages “what” rather than “how” SQL (helps with formulation of some harder queries) Prolog –Model theory (basis for design theory, techniques & tools)

Chapter Syntax – Symbols Truth Values: T F Constants Variables Functions: return a value Predicates: return T or F Logical Connectors Quantifiers:   –  xP(x) = P(x 1 )  P(x 2 )  … –  xP(x) = P(x 1 )  P(x 2 ) ... Parentheses P Q  P P  Q P  Q P  Q P  Q F F T F F T T F T T F T T F T F F F T F F T T F T T T T

Chapter Syntax – Terms & Atoms Terms: yield a value –Each variable and constant is a term. –Each function is a term (e.g., f(t 1, t 2 ) where t 1 and t 2 are terms). Atoms: yield T or F –T –F –Each predicate is an atom (e.g., p(t 1, t 2 ) where t 1 and t 2 are terms).

Chapter Syntax – Formulas Formulas –An atom is a formula. –If P & Q are formulas, so are (  P), (P  Q), (P  Q), (P  Q), (P  Q) –If P is a formula and x is a variable,  x(P) and  x(P) are formulas Example:  x(x+y = 10   z  x(x > z)) –bound and free variables –scope of a variable –closed and open formulas

Chapter Semantics Interpretation –Specify domain D –Assign values in D to: Constants (unique name assumption: literals denote themselves & constant symbols like  have only one value) n-ary functions: f:D n  D (e.g., +, -, …) n-ary predicates: p:D n  {T, F} (e.g., <, =, …) Evaluation –Closed formulas: evaluation yields T or F –Open formulas: evaluation yields set of domain elements Examples –D = {0, …, 99} –  x(2x mod 100 > 95) evaluates to T –  x(2x mod 100 > 95) evaluates to F –2x mod 100 > 95 yields {48, 49, 98, 99}

Chapter Counting Quantifiers Notational shorthand –  1 x(P(x)) T if there is exactly 1 value for which P is true –  2 x(P(x)) … exactly 2 … –   5 x(P(x)) … 5 or more … –  <3 x(P(x)) … less than 3 … Equivalent expressions –  0 x(P(x))   x(P(x))   x(  P(x)) –  1 x(P(x))   x(P(x))   x  y(P(x)  P(y)  x = y)

Chapter Model Theory & Relational DBs Let relation names be predicates with a place for each attribute. Write integrity constraints as closed formulas. Example: r(A, B, C) A is a Key. Interpretation: Domain = {1,2,3} r(1, 2, 3) = T r(2, 2, 2) = T r(x, y, z) = F (for all others)  x   1 (r(x, y, z))

Chapter Model Theory, OSM, & Rel. DBs Relations: Integrity Constraints: –Key Constraints  x   1 y(Room(x) has Cost(y))  x  y   1 z(Cost(x) is equivalent to Amount(z) in Currency(y))  x  y   1 z(Cost(z) is equivalent to Amount(x) in Currency(y)) –Referential-Integrity Constraints  x  y  z(Cost(x) is equivalent to Amount(y) in Currency(z)   w(Room(w) has Cost(x))) –Attribute-Domain Constraints  x(  y  z(Cost(y) is equivalent to Amount(z) in Currency(x)  x  {Mark, Drachma, …})... Room(x) has Cost(y) Cost(x) is equivalent to Amount(y) in Currency(z) R Mark R ,000 Drachma R Mark ,000 Drachma

Chapter Valid Interpretations Interpretation –Domain all values in the current DB domain-closure assumption: these are the only elements that can be substituted for variables –Value Assignments assign constants to themselves use the closed-world assumption (tuple substitutions for predicates yield T, and all other substitutions yield F) Valid Interpretation –All closed formulas evaluate to T –DB integrity: the constraints of the DB are satisfied –Examples: the previous two examples show valid interpretations