ER Diagram & EER
Lecture 3 · the diagram notation put together, a worked university ER diagram, and the enhanced concepts (specialization, generalization, aggregation).
Notation summary
| Shape | Means |
|---|---|
| Rectangle | Entity set |
| Double rectangle | Weak entity set |
| Diamond | Relationship set |
| Double diamond | Identifying relationship (for a weak entity) |
| Oval | Attribute (underline = key) |
| Double oval · dashed oval | Multivalued · derived attribute |
| Directed line (→) / undirected line (—) | “one” / “many” side of the relationship |
| Double line to an entity | Total participation (single line = partial) |
| Triangle labelled ISA | Specialization / generalization |
Worked example — university ER diagram
The same schema used in the midterm. Double rectangle = weak entity, double diamond = identifying relationship, underline = key, dashed underline = discriminator.
EntityWeak entityRelationshipIdentifyingKey (underline)Discriminator (dashed)Total participation1 / M / N cardinality
courseno from course through the identifying sec of relationship (double line = its total participation). requires is recursive on course with roles main & prereq. Need the full solved version with the key/attribute classification table? Midterm Part 3 →
Enhanced ER (EER) concepts
| Concept | Direction | Idea |
|---|---|---|
| Specialization | Top-down | Split an entity set into sub-groups (person → student, employee) via an ISA triangle. Sub-classes inherit the super-class's attributes. |
| Generalization | Bottom-up | Combine entity sets that share features into a higher-level set. It's the inverse of specialization — drawn the same way. |
| Aggregation | — | Treat a relationship as an abstract entity so it can participate in another relationship (e.g. an eval_for on top of proj_guide). |
Constraints on generalization: disjoint vs overlapping (can an entity be in more than one sub-class?), and total vs partial (must it be in at least one?).
Apply it in the exam: Part 3 — ER Diagram (solved) →