Skip to content
Official PYQ · 2001

GATE CS 2001 Q2.24 — Tuple Calculus and SQL

Explain with AI

Which of the following relational calculus expression is not safe?

Choose one option
View worked solution

Answer: C

A relational calculus expression is safe if it is guaranteed to yield a finite relation. This requires that all values appearing in the result must belong to the domain of the formula (which consists of constants in the formula and attribute values in the database relations).

  • Option C: {t∣¬(t∈R1)}\{t \mid \neg (t \in R_1)\} defines the set of all possible tuples tt that do not belong to R1R_1. Since the domain of possible values is infinite, this set is infinite, making the expression unsafe.
  • Options A, B, and D: In each of these expressions, the components of the result tuple tt are bound to values existing in the finite relations R1R_1 or R2R_2 (e.g., t[A]=u[A]t[A] = u[A] for u∈R1u \in R_1 or t[A]=s[A]t[A] = s[A] for s∈R2s \in R_2). Thus, they yield a finite set of tuples and are safe.

Therefore, the correct option is C.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Tuple Calculus and SQL questions