Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. (10%) Consider the following program P in datalog. a(X,Y) par(X,Z), par(Z,Y,) b(X,Y) par(X,Z), par(Z,W), par(W,Y). If b(1,2) and a(0,1) are derived from P, determine

image text in transcribed

4. (10%) Consider the following program P in datalog. a(X,Y) par(X,Z), par(Z,Y,) b(X,Y) par(X,Z), par(Z,W), par(W,Y). If b(1,2) and a(0,1) are derived from P, determine the tuples we may initially have had in relation "par". Justify your answer. (ii) Express the above formulas in Relational Algebra. 5. (10%) Recall the notion of safe formulas in DRC discussed in class. (i) Intuitively describe what are safe formulas? (ii) Considering this notion, how can we characterize the safe rules and programs in datalog (and prolog too). In other words, how rules/facts in such programs P should look like so that we can conclude that P is safe 4. (10%) Consider the following program P in datalog. a(X,Y) par(X,Z), par(Z,Y,) b(X,Y) par(X,Z), par(Z,W), par(W,Y). If b(1,2) and a(0,1) are derived from P, determine the tuples we may initially have had in relation "par". Justify your answer. (ii) Express the above formulas in Relational Algebra. 5. (10%) Recall the notion of safe formulas in DRC discussed in class. (i) Intuitively describe what are safe formulas? (ii) Considering this notion, how can we characterize the safe rules and programs in datalog (and prolog too). In other words, how rules/facts in such programs P should look like so that we can conclude that P is safe

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

Different formulas for mathematical core areas.

Answered: 1 week ago