database-designentity-relationshiperddatabase-diagram

EER Diagram - Mixing Specialization and Disjointness Constraints Among Subtypes


I'm trying to design an EER diagram that has the supertype Student with the following subtypes: Undergraduate, Graduate, and Research Assistant. A Student must be either an Undergraduate or a Graduate, and a Student may or may not be a Research Assistant.

I'm not entirely sure how to depict these relationships. Should I have supertype/subtype relationships going from Student to subtypes Undergraduate and Graduate with total specialization and disjointness while a separate relationship goes to Research Assistant with only partial specialization?

enter image description here

Or should I have relationships that have total specialization and overlapping and define the subtype discriminator to reflect the constraints above?

enter image description here

Sorry if I'm missing something obvious.


Solution

  • Your first diagram is correct and clearly depicts the specialization you described.