Answer to Question #229644 in Databases | SQL | Oracle | MS Access for Matthew

Question #229644

Given the relations R (A, B) and S (B, C) where values are all integers. Examine the undermentioned three relational algebra expressions

a. A, C(R⋈B=1S)

b. A(B = 1R)XC(B = 1S)

c. A, C (ARXB = 1S)


Two of the three expressions are equivalent (i.e., they produce the same answer on all databases), while one of them can produce a different answer

  1. Which query can produce a contrasting answer? Give the simplest database instance you can think of where a different answer is produced
  2. Why do we care that the expressions are equivalent?
  3. How can we determine that the expressions are equivalent?
1
Expert's answer
2021-08-26T04:00:31-0400

From the given option, we can conclude that query 1 produces the different result.

a) "\\pi_{(A,C)}(\\pi_AR \\times \\sigma_{B=1}S)"

b)

Let R = {(3, 4)} and S = {(1, 2)}

In this case, (a) and (b) produces empty result.

c)

In this, c produces {(3,2)}


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS