Download presentation
Presentation is loading. Please wait.
1
Subclasses and Superclasses
Explain the cohort of the subject. Everyone has different pre-knowledge about some of the aspects. (Source: Elmasri and Navathe, Fundamentals of Database Systems, Figure 1, page 248)
2
Disjointed Constraint
EmpID EmpID EName EName EAddress EMPLOYEE EAddress EMPLOYEE EDob EDob d o TypingSpeed TypingSpeed EngType SECRETARY SECRETARY ENGINEER ENGINEER EngType TECHNICIAN TECHNICIAN TGrade TGrade An Employee, say with ID “001” is: a secretary, OR a technician OR an engineer. An Employee, say with ID “001” is: a secretary, OR a technician OR an engineer OR combination of the subclasses entities.
3
Completeness Constraint
EmpID EmpID EName EName EAddress EMPLOYEE EAddress EMPLOYEE EDob EDob d d Salary PayScale Salary PayScale SALARIED EMPLOYEE HOURLY EMPLOYEE SALARIED EMPLOYEE HOURLY EMPLOYEE An Employee, say with ID “001” is: a salaried employee OR an hourly employee. An Employee, say with ID “001” is: a salaried employee OR an hourly employee OR none of them.
4
Transformation of Specialization/Generalization
Option 8A: Multiple relations-Superclass and subclasses Option 8B: Multiple relations-Subclass relations only Option 8C: Single relation with one type attribute Option 8D: Single relation with multiple type attributes Disjointed Completeness Remarks “d” “o” “p” “t” 8A 8B * *Redundancy of values of superclass entity’s attributes in all subclasses tables. 8C Can generate many NULL values if many local attributes exist in the subclasses entities. 8D Explain the cohort of the subject. Everyone has different pre-knowledge about some of the aspects. The selection of option is affected by variety of reasons, including the constraints of the relationships, the attributes of the entities and the cost to process the queries.
5
Specialization vs Union*
Is-a SUB-CLASS SUPER-CLASS * See problem on the previous lecture. Jaime (owns Veh. ABC) Bank of Stark (owns Veh. DEF) Cersei & Bank of Lannister (own Veh. XYZ) Jaime (owns Veh. ABC) Bank of Stark (owns Veh. DEF) Cersei & Bank of Lannister (own Veh. XYZ) o PERSON BANK OWNER OWNER BANK PERSON U Jaime, 40 y/o Cersei, 40 y/o Tyrion, 38 y/o Bank of Lannister Bank of Stark Bank of Targaryen Jaime, 40 y/o Cersei, 40 y/o Tyrion, 38 y/o Bank of Lannister Bank of Stark Bank of Targaryen
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.