Documente Academic
Documente Profesional
Documente Cultură
Learning Outcomes
Lecture 5 EERM
Limitations of the basic ER modeling Model information through the use of EER diagrams using UML EER data modeling concepts
Limitations of ER Modeling
Enhanced ER Modeling
Semantic concepts are incorporated into the original ER model and called the Enhanced Entity-Relationship (EER) model Most useful additional data modelling concept of Enhanced ER (EER) model is called specialisation/ generalisation using UML EER still incorporates much of the same designing concepts when modelling an organisations database system. Eg, Entities (class), relationships, attributes (characteristics), multiplicity, etc but with enhanced features to reflect true realworld semantics. It focuses on true normalisation rules!
Basic concepts of ER modelling are not sufficient to represent requirements of newer, more complex applications Response is development of additional semantic modelling concepts
Specialization/Generalization
Specialisation Process of maximising differences between members of an entity by identifying their distinguishing characteristics. This is a top-down approach of identifying lower-level entities. Generalisation Process of minimising differences between entities by identifying their common characteristics. This is a bottom-up approach of identifying higher-level entities.
Specialization Specialization is the process of defining a set of subclasses of a superclass The set of subclasses is based upon some distinguishing characteristics of the entities in the superclass
Generalization
Example: {SECRETARY, ENGINEER, TECHNICIAN} is a specialization of EMPLOYEE based upon job type.
May have several specializations of the same superclass
7
Generalization
Specialization/Generalization
10
Specialization/Generalization
An entity in a subclass represents the same real world object as in superclass eg, the entity in the subclass is the same entity in the superclass, but has distinct role(s) or attributes Superclass/subclass relationship is one-to-one (1:1) Superclass may contain overlapping or distinct subclasses (see previous slide)
Not all members of a superclass need be a member of a subclass. (see previous slide)
11
12
Attribute Inheritance
An entity in a subclass represents same real world object as in superclass, and may possess subclass-specific attributes, as well as those associated with the superclass. Subclass entities inherit all common attributes from the superclass, eg, name, address, salary, etc Use to avoid describing different types of staff with possibly different attributes within a single entity.
13
14
15
16
Describes relationship between members of the subclasses and indicates whether member of a superclass can be a member of one, or more than one, subclass. May be disjoint {Or} or nondisjoint {And}.
17 18
19
20
Disjointness Constraint:
Specifies that the subclasses of the specialization must be disjoint:
an entity can be a member of at most one of the subclasses of the specialization
Completeness Constraint:
Whether an instance of a supertype must also be a member of at least one subtype Total specialization rule yes (double line) Partial allows an entity not to belong to any of the subclasses Shown in EER diagrams by a single line
23
24
Note: Generalization usually is total because the superclass is derived from the subclasses.
25