← RGPV CS-502 DBMS November 2023 solved question paper
RGPV CS-502 (GS) | November 2023 | Q2(b) | 7 marks
Question (restated): Design an ER model for employees, departments, managers and dependent children identified by parent and name.
Answer
Employee is a strong entity with primary key ssn and attributes salary and phone. Department is another strong entity with primary key dno and attributes dname and budget. Child is a weak entity: its name is only unique within a particular employee’s family, so name is a partial key and age is a descriptive attribute.
Works_In connects Employee and Department. Assuming each employee works in one department, it is many-to-one from Employee to Department. Manages connects Department to Employee: every department has exactly one manager. The question does not restrict how many departments an employee may manage, so an additional uniqueness constraint is not imposed.
Has_Child is an identifying relationship between Employee and Child. Each child has exactly one recorded parent and total participation in this relationship. The employee may have zero or many children. In Chen notation draw Child as a double rectangle, Has_Child as a double diamond, and underline the partial key with a dashed line.
| Relation | Key and references |
|---|---|
| Employee(ssn,salary,phone,dno) | ssn PK; dno FK |
| Department(dno,dname,budget,manager_ssn) | dno PK; manager_ssn mandatory FK |
| Child(parent_ssn,name,age) | (parent_ssn,name) PK; parent_ssn FK |
When an employee leaves, the associated children must no longer be retained. ON DELETE CASCADE on Child.parent_ssn implements this existence dependency. For example, children (101, Ravi, 8) and (102, Ravi, 6) are distinct because their parent identifiers differ. Two children with the same name under parent 101 are disallowed by the composite key.
The model captures both ordinary relationships and the special identification and lifetime requirements of dependent children.

Further reading: Silberschatz, Korth and Sudarshan, Database System Concepts; Elmasri and Navathe, Fundamentals of Database Systems.
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion