CS FundamentalsModerateGATE CS · Product placement

A weak entity set Dependent (partial key dname) is owned by Employee (key eid) through the identifying relationship HasDep. Which table design is correct?

  1. A. Dependent(dname, …) with key dname and a separate HasDep(eid, dname) table
  2. B. Dependent(eid, dname, …) with key dname
  3. C. Dependent(eid, dname, …) with key (eid, dname) and eid referencing Employee ON DELETE CASCADE
  4. D. Employee stores a multivalued attribute dname and no Dependent table

Correct answer: C. Dependent(eid, dname, …) with key (eid, dname) and eid referencing Employee ON DELETE CASCADE

A weak entity's key is its partial key plus the owner's key, and it cannot exist without its owner, so the FK is part of the key and usually cascades on delete. The identifying relationship needs no separate table.

More DBMS and SQL questions

Exams that ask this topic