603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 27 A First Course in Database Systems.

Slides:



Advertisements
Similar presentations
1 Datalog: Logic Instead of Algebra. 2 Datalog: Logic instead of Algebra Each relational-algebra operator can be mimicked by one or several Database Logic.
Advertisements

1 Decidable Containment of Recursive Queries Diego Calvanese, Giuseppe De Giacomo, Moshe Y. Vardi presented by Axel Polleres
CS203 Lecture 15.
Aliaksei A. HolubeuAdvances in Database Query Processing Universität Konstanz, 2005 Optimizing an SQL-like Nested Query.
Problem Solving Well-formed predicate calculus expressions provide a means of describing objects and relations in a problem domain and inference rule.
CSE 636 Data Integration Conjunctive Queries Containment Mappings / Canonical Databases Slides by Jeffrey D. Ullman.
Lecture 11: Datalog Tuesday, February 6, Outline Datalog syntax Examples Semantics: –Minimal model –Least fixpoint –They are equivalent Naive evaluation.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Introduction to Graph “theory”
CSC271 Database Systems Lecture # 5. Summary: Previous Lecture  Database languages  Functions of a DBMS  DBMS environment  Data models and their categories.
Recursively Defined Functions
Deductive Database. Relation Database TitleYearLengthType Harry Porter Color Gone with the wind Black and White Snow White195090Color.
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 6 A First Course in Database Systems.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 5 The Mathematics of Getting Around 5.1Euler Circuit Problems 5.2What.
PR-OWL: A Framework for Probabilistic Ontologies by Paulo C. G. COSTA, Kathryn B. LASKEY George Mason University presented by Thomas Packer 1PR-OWL.
Winter 2002Arthur Keller – CS 18014–1 Schedule Today: Feb. 26 (T) u Datalog. u Read Sections Assignment 6 due. Feb. 28 (TH) u Datalog and SQL.
Automated rule Generation Maryam Mustafa Sarah Karim
CSE 636 Data Integration Datalog Rules / Programs / Negation Slides by Jeffrey D. Ullman.
CS5371 Theory of Computation Lecture 1: Mathematics Review I (Basic Terminology)
Mid-term Class Review.
EECS 20 Chapter 3 Sections State Machines Continued Last time we Introduced the deterministic finite state machine Discussed the concept of state.
Information Theory and Security
Credit: Slides are an adaptation of slides from Jeffrey D. Ullman 1.
TR1413: Discrete Math for Computer Science Lecture 0: Introduction.
Table of Contents The independent variable, x, denotes a member of the domain and the dependent variable, y, denotes a member of the range. We say, "y.
Function: Definition A function is a correspondence from a first set, called the domain, to a second set, called the range, such that each element in the.
Database Systems Logical Query Languages assoc. prof., dr. Vladimir Dimitrov web: is.fmi.uni-sofia.bg.
Table of Contents Function: Domain and Range A function is a correspondence between two sets governed by some rule(s) such that each member of the first.
4.4 Linear Inequalities in Two Variables
Database Design Concepts
8.2 n-ary Relations and Their Applications
More Graph Algorithms 15 April Applications of Graphs Graph theory is used in dealing with problems which have a fairly natural graph/network.
Conditional Probability and Independence If A and B are events in sample space S and P(B) > 0, then the conditional probability of A given B is denoted.
Nucleic Acid Structure Many thanks to Dave Bevan for providing some of the material for this lecture.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Copyright © 2010 Pearson Education, Inc. All rights reserved Sec
3. Rough set extensions  In the rough set literature, several extensions have been developed that attempt to handle better the uncertainty present in.
Flight Itinerary Problem ICS 311 Fall 2006 Matt Freeburg.
CS 415 – A.I. Slide Set 5. Chapter 3 Structures and Strategies for State Space Search – Predicate Calculus: provides a means of describing objects and.
Datalog Inspired by the impedance mismatch in relational databases. Main expressive advantage: recursive queries. More convenient for analysis: papers.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 22 A First Course in Database Systems.
Introduction COMP283 – Discrete Structures. JOOHWI LEE Dr. Lee or Mr. Lee ABD Student working with Dr. Styner
CSE 636 Data Integration Conjunctive Queries Containment Mappings / Canonical Databases Slides by Jeffrey D. Ullman Fall 2006.
Departments in Business Business Name 1 Business Name 2.
Chapter 7: Relations Relations(7.1) Relations(7.1) n-any Relations & their Applications (7.2) n-any Relations & their Applications (7.2)
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 17 A First Course in Database Systems.
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 2 Introduction to a First Course in Database Systems.
Chapter 11 Sequences, Induction, and Probability Copyright © 2014, 2010, 2007 Pearson Education, Inc Sequences and Summation Notation.
CSE Winter 2008 Introduction to Program Verification January 31 proofs through simplification.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 24 A First Course in Database Systems.
Relations. Important Definitions We covered all of these definitions on the board on Monday, November 7 th. Definition 1 Definition 2 Definition 3 Definition.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 10 A First Course in Database Systems.
NP-completeness Section 7.4 Giorgi Japaridze Theory of Computability.
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 4 Introduction to a First Course in Database Systems.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 21 A First Course in Database Systems.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 11 A First Course in Database Systems.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 9 A First Course in Database Systems.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 26 A First Course in Database Systems.
ENTITY RELATIONSHIP DIAGRAM. Objectives Define terms related to entity relationship modeling, including entity, entity instances, attribute, relationship.
Artificial Intelligence Logical Agents Chapter 7.
Rough Set Theory and Databases Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 28 A First Course in Database Systems.
Course : T0423-Current Popular IT III
CHAPTER 5 Handling Uncertainty BIC 3337 EXPERT SYSTEM.
Chapter 5 Recursion as a Problem-Solving Technique
Datalog Rules / Programs / Negation Slides by Jeffrey D. Ullman
Graphs Chapter 11 Objectives Upon completion you will be able to:
Logic Based Query Languages
Datalog Inspired by the impedance mismatch in relational databases.
Presentation transcript:

603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 27 A First Course in Database Systems

Deductive Databases Recursive Programming in Datalog: 1.FollowOn(x,y)  SequelOf(x,y) 2.FollowOn(x,y)  SequelOf(x,z) AND FollowOn(z,y) Rule1 is the basis; it tells us that every sequel is a follow-on. Rule 2 says that every follow-on of a sequel of movie x is also a follow-on of x. If z is a sequel of x, and we have found that y is a follow-on of z, then y is a follow-on of x.

Deductive Databases Recursive Programming in Datalog: SF DEN DAL CHI NY A Map of Some Airline Flights UA AA UA UA AA AA AA UA

Deductive Databases Recursive Programming in Datalog: airline from to departs arrives UASFDEN AASFDAL UADENCHI UADENDAL AADALCHI AADALNY AACHINY UACHINY Tuples in Relation Flights!

Deductive Databases Recursive Programming in Datalog: extension database A predicate whose relation is stored in the database is called an extension database (EDB) intensional database A predicate for which the corresponding relation is defined by logical rules is called an intensional database (IDB)

Deductive Databases Recursive Programming in Datalog: Many examples of the use of recursion can be found in the study of paths in a graph. The previous slide shows a graph representing some flights of two hypothetical airlines - Untried Airlines(UA), and Arcane Airlines (AA) -- among the cities of San Francisco, Denver, Dallas, Chicago, and New York.

Deductive Databases Recursive Programming in Datalog: Flights are represented by and EDB relation: Flights(airline, from, to, departs, arrives) The tuples in the relations are shown in the previous table

Deductive Databases Recursive Programming in Datalog: The simplest recursive question we can ask is: “For what pairs of cities (x, y) is it possible to get from city x to city y by taking one or more flights?” The following two rules describe a relation Reaches(x,y) that contains exactly these pairs of cities: 1.Reaches(x,y)  Flights(a,x,y,d,r) 2.Reaches(x,y)  Reaches(x,z) AND Reaches(z,y)

Deductive Databases Recursive Programming in Datalog: 1.Reaches(x,y)  Flights(a,x,y,d,r) The first rule says that Reaches contains those pairs of cities for which there is a direct flight from the first to the second; The airline a, departure time d, and arrival time r are arbitrary in this rule.

The Deductive Databases Recursive Programming in Datalog: 2.Reaches(x,y)  Reaches(x,z) AND Reaches(z,y) The second rule says that if you can reach from city x to city z and you can reach from z to y, then you can reach from x to y. To evaluate the relation Reaches, we begin by using Rule (1)

Deductive Databases Recursive Programming in Datalog: To evaluate the relation Reaches, we begin by using Rule (1) 1.Reaches(x,y)  Flights(a,x,y,d,r) we get (SF, DEN), (SF, DAL), (DEN,CHI) (DEN,DAL), (DAL,CHI), (DAL, NY), and (CHI, NY) => seven pairs represented by arcs in graph

Deductive Databases Recursive Programming in Datalog: In the next round we apply recursive Rule (2) 2.Reaches(x,y)  Reaches(x,z) AND Reaches(z,y) to put together pairs of arcs such that the head of one is the tail of the next. This yields additional pairs (SF,CHI), (DEN, NY), and (SF,NY)

Deductive Databases Recursive Programming in Datalog: The third round combines all one- and two-arc pairs together to form paths of length up to four arcs. Here we get no new pairs. The relation Reaches thus consists of the ten pairs (x,y) such that y is reachable from x in the diagram

Deductive Databases Recursive Programming in Datalog: A more complicated definition of when two flights can be combined into a longer sequence of flights is to require that the second leaves an airport at least an hour after the first arrives at that airport. Now we can use IDB predicate, which we can call Connects(x,y,d,r).

Deductive Databases Recursive Programming in Datalog: Connects(x,y,d,r) says that we can take one or more flights, starting at city x at time d and arriving at city y at time r. The rules for Connects are: 1. Connects(x,y,d,r)  Flights(a,x,y,d,r) 2. Connects(x,y,d,r)  Connects(a,z,y,d,t1) AND Connects(z,y,t2,r) AND t1 <= t

Rough Set Theory and Databases Rough Set Information System: Q UAD a1 a2 d x1. Xn

Rough Set Theory and Databases Rough Set Information System: The information system is a database-like system This information system is a new tool to deal with knowledge acquisition under uncertainty This information system is called Rough Set Theory

Rough Set Information System: Rough Set Information System The main advantage of Rough Set Theory is that it does not need any preliminary or additional information about the data- like probability in Statistics like basic probability number in D-S Theory of Evidence like grade of membership or the value of possibility in fuzzy set theory

Rough Set Information System Rough Set Theory : Rough set theory has successfully implemented in knowledge-based systems - in medicine - in industry - etc.

Rough Set Information System Rough Set Theory: The information systems represents what is called “instance space” in learning from examples The concept of a rough set is a mathematical tool to deal with -uncertain and imprecise data Rough Set Theory offers a new insight and efficient algorithm

Rough Set Information System Rough Set Theory: In rough set theory each imprecise concept is replaced by a pair of precise concepts - lower approximations and upper approximations

Deductive Databases Next Lecture Rough Set Theory and Database