7.%20Refinement%20Queries - PowerPoint PPT Presentation

About This Presentation
Title:

7.%20Refinement%20Queries

Description:

UOR Universal Object Relation. all attributes in one ... Bernard.y Edward.y 25. Elise.y Fred.y 4. Harold.y. Alfred.y. Harold_Age. Alfred_Age ... – PowerPoint PPT presentation

Number of Views:87
Avg rating:3.0/5.0
Slides: 8
Provided by: Syed90
Learn more at: http://cse.unl.edu
Category:

less

Transcript and Presenter's Notes

Title: 7.%20Refinement%20Queries


1
7. Refinement Queries
Three different assumptions about the input
database
Tuple Inside Tuple Outside
Closed World True False
Open World True May be
Possible World May be False
2
  • UOR Universal Object Relation
  • all attributes in one constraint relation
  • assumes possible world

Example
Alfred_Age ... Harold_Age
Alfred.y Harold.y Alfred.y lt 70 Gerald.y 0 Harold.y 5 Bernard.y Edward.y gt 25 Elise.y Fred.y gt 4
3
  • 7.3 Syntax
  • Refinement rule body same as Datalog rule body
  • Refinement rule head a constraint
  • Example
  • x.y lt z.y Sibling(x, z).
  • z.y x.y Parent(x, z).
  • x.y ? 0 Person(x).

4
  • Example
  • Suppose we have five sets of persons
  • P passed drivers test
  • L licensed person
  • A allowed to drive
  • D drives sometime
  • I intoxicated / drinks alcohol

5
  • We know the following
  • All(L, P)
  • All persons must pass a test before getting a
    drivers license.
  • All(A,L)
  • All persons allowed to drive must have a
    license.
  • All(D,P)
  • No one drives without having passed the test.
  • All(L,I)
  • No one who drinks has a license.
  • Some(D,I)
  • Some person X both drives and drinks.

6
  • Here we have UOR with scheme
  • UOR(A.S, D.S, I.S, L.S, P.S)
  • x.S ? y.S All(x,y)
  • x.S ? y.S ? ? Some(x,y)

7
  • 7.5 Projection Queries
  • SELECT y1,.yk
  • FROM UOR
  • Example
  • SELECT Donald_Age
  • FROM UOR
  • This will return a table with the attribute
    Donald_Age
  • 47 Donald.y , Donald.y 49
Write a Comment
User Comments (0)
About PowerShow.com