Home » Database » Database miscellaneous » Question

Database miscellaneous

  1. The following table has two attributes A and C where A is the primary key and C is the foreign key referencing a with on-delete cascade.

    The set of all tuples that must be additionally deleted to preserve referential integrity when the tuple (2, 4) is deleted is
    1. (3, 4) and (6, 4)
    2. (5, 2) and (7, 2)
    3. (5, 2), (7, 2) and (9, 5)
    4. (3, 4), (4, 3) and (6, 4)
Correct Option: C

On delete cascade says that deletion of a primary key value should delete its all foreign key references.
So in (2,4) 2 is primary key so tuples (5,2) & (7,2) should be deleted,
but in (5,2) 5 is also a key so (9,5) also deleted cascade.
Hence (c) is correct option.



Your comments will be displayed only after manual approval.