Which of the following relational calculus expression is not safe?
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: defines the set of all possible tuples that do not belong to . 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 are bound to values existing in the finite relations or (e.g., for or for ). 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.
