24-DeducDatabases

# Fa b bc d 1 1 1 1 1 2 2 1 2 3 3 2 1 2 1 3 b b ρ x c

• Notes
• 17

This preview shows page 6 - 12 out of 17 pages.

f(A, B) b(C, D) 1 1 1 1 1 2 2 1 2 3 3 2 1 2 1 3 b b ρ x C ρ y D π xy ( ρ A y ρ B x f ) b b ρ x C ρ y D π xy ( ρ A x ρ B z f | × | ρ A z ρ B y f) π x ρ D x σ C=1 b

Subscribe to view the full document.

Discussion #24 Deductive Databases 7/21 Correspondence Between Relational Databases & Deductive Databases Schemes: f(A,B) b(C,D) Facts: f(1,1). f(1,2). f(2,3). Rules: b(x,y) :- f(y,x). b(x,y) :- f(x,z),f(z,y). Queries: b(1,x)? f(A, B) b(C, D) 1 1 1 1 1 2 2 1 2 3 3 2 1 2 1 3 b b ρ x C ρ y D π xy ( ρ A y ρ B x f ) b b ρ x C ρ y D π xy ( ρ A x ρ B z f | × | ρ A z ρ B y f) π x ρ D x σ C=1 b x 1 2 3 or x = 1 x = 2 x =
Discussion #24 Deductive Databases 8/21 Correspondence Between Relational Databases & Deductive Databases Schemes: f(A,B) b(C,D) Facts: f(1,1). f(1,2). f(2,3). Rules: b(x,y) :- f(y,x). b(x,y) :- f(y,y),f(2,x). Queries: b(1,x)? f(A, B) b(C, D) 1 1 1 1 1 2 2 1 2 3 3 2 b b ρ x C ρ y D π xy ( ρ A y ρ B x f ) b b ρ x C ρ y D π xy ( ρ A y π A σ A=B f | × | ρ B x π B σ A=2 f) π x ρ D x σ C=1 b

Subscribe to view the full document.

Discussion #24 Deductive Databases 9/21 Correspondence Between Relational Databases & Deductive Databases Schemes: f(A,B) b(C,D) Facts: f(1,1). f(1,2). f(2,3). Rules: b(x,y) :- f(y,x). b(x,y) :- f(y,y),f(2,x). Queries: b(1,x)? f(A, B) b(C, D) 1 1 1 1 1 2 2 1 2 3 3 2 3 1 b b ρ x C ρ y D π xy ( ρ A y ρ B x f ) b b ρ x C ρ y D π xy ( ρ A y π A σ A=B f | × | ρ B x π B σ A=2 f) π x ρ D x σ C=1 b
Discussion #24 Deductive Databases 10/21 Correspondence Between Relational Databases & Deductive Databases Schemes: f(A,B) b(C,D) Facts: f(1,1). f(1,2). f(2,3). Rules: b(x,y) :- f(y,x). b(x,y) :- f(y,y),f(2,x). Queries: b(1,x)? f(A, B) b(C, D) 1 1 1 1 1 2 2 1 2 3 3 2 3 1 b b ρ x C ρ y D π xy ( ρ A y ρ B x f ) b b ρ x C ρ y D π xy ( ρ A y π A σ A=B f | × | ρ B x π B σ A=2 f) π x ρ D x σ C=1 b x 1 or x = 1

Subscribe to view the full document.

Discussion #24 Deductive Databases 11/21 Correspondence Between Relational
You've reached the end of this preview.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern