CMIS 450 Database Design Dr Bijoy Bordoloi Enhanced
CMIS 450 Database Design Dr. Bijoy Bordoloi Enhanced E-R Modeling (EER) Bordoloi
Sub-entities • A sub-entity is a subset of another entity, called the super-entity • The sub-entity is always existencedependent on the super entity COMPUTER MAINFRAME Bordoloi EMPLOYEE PROGRAMMER
Sub-entities EMPPLOYEE AGENT HOURLY CLERK SALARIED PROGRAMMER SYSTEMS APPLICATIONS Bordoloi
Sub-entity classes • A class is a group of mutually exclusive subentities • Sub-entities of class are vertically aligned in diagram • One super-entity may have several unrelated classes Bordoloi
Sub-entity classes EMPLOYEE AGENT HOURLY CLERK SALARIED PROGRAMMER SYSTEMS APPLICATIONS PROG-CLASS JOB-CODE Bordoloi WAGE-CLASS
Sub-entity classes • Each class corresponds to an (optional) class attribute of the super-entity Bordoloi
Attribute Inheritance • The attributes of a super-entity apply to all of its sub-entities • The converse is false, in general Bordoloi
Attribute Inheritance EMPLOYEE AGENT COMMISION SALARIED TERRITORY HOURLY CLERK TYPING SPEED OVER-TIME RATE PROGRAMMER APPLICATIONS SYSTEMS MACHINE LANGUAGE SS-NUM Bordoloi LEVEL NAME SEX EXTENSION
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) EMPLOYEE IS-A PROGRAMMER Bordoloi
Super-entity — Sub-entity Cardinality E 1 E 2 E 3 E 4 E 5 . . . P 1 P 2 P 3 . . . • IS-A relationship is normally omitted from diagram for clarity Bordoloi
Example SUPPLIER DEPARTMENT SUPPLY WORK-IN ASSIGN-TO EMPLOYEE SUPERVISOR PROJECT PART MANAGE BELONGS-TO STAFF EXECUTE Bordoloi STORE TASK WAREHOUSE
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. Bordoloi
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… Bordoloi
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 Bordoloi
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…. Bordoloi
- Slides: 15