GATE / CS ARCHIVE

GATE CSE 2002 / QUESTION 1.20

Relational algebra and safe calculus

Database Management Systems · Relational Algebra & Calculus · Full GATE CSE 2002 paper

GATE 2002, Q1.20 1 mark · MCQ
Report issue

Relational Algebra & Calculus

Question 1.20, GATE 2002: Which comparison of expressive power is true for formal relational query languages?
(A) Relational algebra is more powerful than relational calculus.
(B) Relational algebra and relational calculus have equal power.
(C) Relational algebra and safe relational calculus have equal power.
(D) None of these.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step 1: Check the safety restriction in the equivalence statement.

Step 2: A safe query restricts its results to values justified by the finite database and query constants. An unrestricted formula such as “x is not in R” over an infinite ambient domain can return infinitely many values. Relational algebra cannot produce that infinite result from finite input relations, explaining why the safe-calculus qualifier selects C over the unrestricted claim.

Conclusion: The expressive-equivalence theorem relates relational algebra to safe/domain-independent relational calculus, C. An unrestricted calculus expression can describe an infinite or domain-dependent result, which ordinary relational algebra over finite input relations cannot produce.

Original paper, page 3