Home » Database » Database miscellaneous » Question

Database miscellaneous

  1. Consider a relation geq which represents “greater than or equal to”, that is, (x, y) ∈ geq only if y ≥ x.
    create table geq
    (lb integer not null
    ub integer not null
    primary key lb foreign key (ub) references geq on delete cascade)
    Which of the following is possible if a tuple (x, y) is deleted?
    1. A tupel (z, w) with z > y is deleted
    2. A tuple (z, w) with z > x is deleted
    3. A tuple (z, w) with w < x is deleted
    4. The deletion of (x, y) is prohibited
Correct Option: C

When the tuple (x, y) is deleted, consider the tuple (z, w). Now, in tupel (z, w), z is the lower bound and hence > X. and w is the upper bound and hence > Y.
→ (X, Y) will be easily deleted.
Therefore, Y > X



Your comments will be displayed only after manual approval.