150 likes | 162 Views
This article explores the concept of sub-entities in Enhanced E-R modeling, where a sub-entity is a subset of a super-entity. It discusses the relationships and attributes associated with sub-entities and their inheritance from the super-entity.
E N D
CMIS 450 Database DesignDr. Bijoy Bordoloi Enhanced E-R Modeling (EER)
Sub-entities • A sub-entity is a subset of another entity, called the super-entity • The sub-entity is always existence-dependent on the super entity COMPUTER EMPLOYEE MAINFRAME PROGRAMMER
EMPPLOYEE AGENT HOURLY CLERK SALARIED PROGRAMMER SYSTEMS APPLICATIONS Sub-entities
Sub-entity classes • A class is a group of mutually exclusive sub-entities • Sub-entities of class are vertically aligned in diagram • One super-entity may have several unrelated classes
EMPLOYEE AGENT HOURLY CLERK SALARIED PROGRAMMER SYSTEMS APPLICATIONS PROG-CLASS JOB-CODE WAGE-CLASS Sub-entity classes
Sub-entity classes • Each class corresponds to an (optional) class attribute of the super-entity
Attribute Inheritance • The attributes of a super-entity apply to all of its sub-entities • The converse is false, in general
EMPLOYEE COMMISION AGENT SALARIED TERRITORY HOURLY CLERK TYPING SPEED OVER-TIME RATE PROGRAMMER APPLICATIONS SYSTEMS MACHINE LANGUAGE LEVEL SS-NUM EXTENSION NAME SEX Attribute Inheritance
EMPLOYEE IS-A PROGRAMMER Super-entity — Sub-entity Cardinality • There is always an implicit IS-A relationship between a sub-entity and its super-entity • Cardinality of IS-A is always maximum 1-1 and minimum 1-0 (super-entity — sub-entity)
P1 E1 P2 E2 P3 E3 E4 . . . E5 . . . Super-entity — Sub-entity Cardinality • IS-A relationship is normally omitted from diagram for clarity
SUPPLIER DEPARTMENT SUPPLY WORK-IN ASSIGN-TO STORE EMPLOYEE PROJECT PART WAREHOUSE SUPERVISOR MANAGE BELONGS-TO STAFF EXECUTE TASK Example
Example of Dictionary • Entity: EMPLOYEE All employees of XYZ Corp, including board members, part-time employees and retirees, but excluding contractors. • Attribute: EMP-NUM Use: identifies employee Employee identification number, assigned by Personnel department at hire-in.
Example of Dictionary • Attribute: (FNAME, MNAME, LNAME, SUFFIX) Use: describes EMPLOYEE Full legal name of employee. For Asian employees, LNAME is family name…and so on… • Entity: DEPARTMENT All organizational units at the departmental and group level. Does not include divisions or sections… and so on…
Example of Dictionary • Relationship:WORK-IN • Related Entities:EMPLOYEE DEPARTMENT • Cardinality:1-N maximum 0-1 minimum • Describes administrative assignment of personnel for supervision and performance review. Does not include project assignments
Example of Dictionary • Relationship:MANAGE • Related Entities:SUPERVISOR PROJECT • Cardinality:1-N maximum 1-1 minimum • Front-line project management responsibility. Unrelated to departmental management assignments, which are documented in relationship DIRECT…and so on….