1/17
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Subclass vs. Superclass
Definition: A superclass is an entity type that includes distinct subgroupings of its entity occurrences. A subclass is a distinct subgrouping of entities in a superclass that shares common attributes or relationships while possessing specialized characteristics.
Example: EMPLOYEE is a superclass; ENGINEER and MANAGER are subclasses of EMPLOYEE
Type Inheritance (Attribute & Relationship Inheritance)
Definition: The principle where a subclass entity inherits all attributes and relationship participation instances of its superclass entity, in addition to having its own specific (local) attributes and relationships.
Example: A SECRETARY subclass inherits SSN, Name, and BirthDate from the EMPLOYEE superclass, plus has its own specific attribute TypingSpeed.
Specialization
Definition: A top-down process of defining a set of subclasses of an entity type based on distinguishing characteristics, attributes, or relationships.
Example: Starting with PERSON and specializing it into STUDENT and EMPLOYEE based on role in an organization.
Generalization
Definition: A bottom-up process of unifying existing entity types that share common features into a single higher-level superclass.
Example: Combining CAR and TRUCK entity types into a broader superclass VEHICLE based on shared attributes like VehicleID and Price.
Disjointness Constraint
Disjoint (d): An entity can belong to at most one subclass.
Example:
Disjoint: A VEHICLE is either a CAR or a TRUCK (denoted with d).

Overlapping Constraint
Overlapping (o): An entity can belong to multiple subclasses simultaneously.
Example:
Overlapping: A PARTS entity can be both a MANUFACTURED_PART and a PURCHASED_PART (denoted with o).

Completeness Constraint (Total vs. Partial)
Total (Mandatory): Every entity in the superclass must belong to a subclass (represented by double lines).
Partial (Optional): An entity in the superclass is not required to belong to any subclass (represented by single lines).
Example:
Total: Every EMPLOYEE must be either HOURLY_EMPLOYEE or SALARIED_EMPLOYEE.
Partial: An EMPLOYEE may or may not be a MANAGER.
Define the 4 constraints:
Disjoint, total
Disjoint, partial
Overlapping, total
Overlapping, partial
Disjoint, total (one and only one): entity can belong to only one subclass
Example: A STUDENT must be classified as either UNDERGRADUATE or GRADUATE, and cannot be both.
Disjoint, partial (zero to one): entity can belong to at most one subclass
Example: An EMPLOYEE can be a SECRETARY or an ENGINEER, or simply an EMPLOYEE without a specialized subclass.
Overlapping, total (one to many): an entity must belong to at least one subclass
Example: Every PATIENT in a hospital must be classified as an INPATIENT, OUTPATIENT, or both.
Overlapping, partial (zero to many): an entity is not required to belong to any subclass
Example: A PARTS entity can be a MANUFACTURED_PART, a PURCHASED_PART, both, or neither (e.g., raw material).
Specialization Hierarchy
Definition: A structure where every subclass participates as a child in only ONE superclass/subclass relationship (single inheritance tree structure).
Example: PERSON → EMPLOYEE → FACULTY (each child has only one direct parent class).
Specialization Lattice
Definition: A structure where a subclass can have MORE THAN ONE superclass (multiple inheritance).
Example: ENGINEERING_MANAGER is a subclass of both ENGINEER and MANAGER.
Subclass Insertion Rule
Inserting an entity into a subclass automatically requires that the entity exists in (or is inserted into) its superclass.
Example: Adding a new record to GRADUATE_STUDENT automatically requires creating an entry in STUDENT.
Superclass Deletion Rule
Definition: Deleting an entity instance from a superclass automatically deletes that instance from all of its subclasses.
Example: Removing an employee record from EMPLOYEE automatically deletes associated records in SALARIED_EMPLOYEE or MANAGER.
What is a Union Type (Category) in EER modeling?
Definition: A single subclass/superclass relationship created by combining more than one distinct superclass. (so unifying the superclasses into a common label)
Example: The OWNER category is a union of PERSON, BANK, and COMPANY. An instance of OWNER must belong to at least one of these superclasses (e.g., a car can be owned by a Person, Bank, OR Company).

What does the circle with a "U" mean in an EER diagram?
It represents a Union Type (Category) node. It connects multiple superclasses into a single category subclass.

What does the U on a line mean?
The OPEN end of the arc always points toward the SUPERCLASS (the larger/parent group).
The CLOSED/ROUNDED end points toward the SUBCLASS (the smaller/child group).

What does the upside-down U on a line mean?
Top: Subclass (REGISTERED_VEHICLE).
Bottom: Superclasses (CAR, TRUCK) connected to the (U) circle.
(because CAR and VEHICLE are superclasses that can unify into the common label REGISTERED_VEHICLE)
EER Checklist: How do you decide if something should be an Entity vs. an Attribute?
Make it an Entity if: It has multiple attributes, multiple instances, and unique traits distinct from other entities.
Do NOT make it an Entity if: It is just a report (e.g., Daily Appointments) or a temporary transaction query (e.g., Balance Inquiry).
EER Checklist: When should you use a Multivalued Attribute vs. a Weak Entity?
Multivalued Attribute: Use when the attribute is simple and exact cardinality/participation tracking isn't important.
Weak Entity: Use when an entity has no primary key of its own and depends on an identifying relationship with a owner entity to exist.