its a Advanced data modeling PPT, it help students to Recognize About database design, database management system, Information, Data, Business rules and learn many more about CC104 topics
•About the extended entity Relationship (EER) Model
•How entity Clusters are useto represents multiple entities and Relationship.
•The Characteristic of Good Primary keys and how to select them.
•How to use flexible solutions for special data modeling-cases.
In this chapter, You will learn :
Learning Objectives
Extended Entity Relationship Model
(EERM)
• Result of adding more semantic construct to the original entity
Relationship (ER)model
• EER diagram (EERD): Uses the EER Model
Entity Supertypes and Subtypes
• Entity Supertypes - Generic Entity Type relater to one more entity
Subtype.
*Contains Common Characterisctic
• Entity Subtypes - Contains unique characteristics of each entity
subtype.
Entity Supertypes and Subtypes
*Criteria to determine the usage :
•There must be different, Identifiable kinds of the entity in the users
environment.
•The different kinds of instance Should each have one or more attributes
that are unique to that kinds of instance.
Specialization Hierarchy
• Depicts arrangement of higher-level entity supertypes and lower-level entity subtypes.
• Relationships sometimes described in terms of “IS-A” relationships
• Subtype can exist only within context of supertype
• Subtype can have only one supertype to which it is directly related.
• Supertypes can have many subtypes.
Specialization Hierarchy
• Support attribute inheritance.
Provides the means to :
• Define special supertype attribute known as subtype discriminator
• Define disjoint/overlapping constraints and complete/partial constraints.
• Enables entity subtype to inherit attributes and relationships of supertype
• All entity subtypes inherit their primary key attribute from their supertype
• At implementation level, supertype and its subtype(s) depicted in specialization hierarchy
maintain a 1:1 relationship
• Entity subtype enherit all relationships in which supertype entity Participate.
INHERITANCE
Subtype Descriminator
• The attribute in supertype entity that determines to which entity subtype each supertype
occurrence is related
• The default comparison condition for subtype discriminator attribute is equality
comparison
Disjoint and Overlapping Constraints
• Disjoint Subtypes : contain unique subset of supertype entity set
*known as non-overlapping subtypes
*Implementation based onthe value of the subtypes.
• Overlapping subtypes : contain nonunique subsets of supertype entity set
* Implementation Requires to attribute for each subtypes.
Table 5.1 - Discriminator attributes with overlapping subtypes
Completeness Constraint
• Specifies whether each entity supertype occurrence must also be member of at least
one subtype
• Types :
* Partial completeness : Not every supertype occurence is a member of subtypes
* Total completeness : Every Supertype occurence must be a member of atleast one subtype.
Specialization and Generalization
* Top-down process
* Identifying lower-level, more
specific entity subtypes from higher-
level entity supertype
* Based on grouping unique
characteristics and relationships of
the subtypes
* Bottom-up process
* Identifying higher-level, more
generic entity supertype from lower-
level entity subtypes
* Based on grouping common
characteristics and relationships of
the subtypes
Specialization Generalization
Entity Cluster
• "Virtual” entity type used to represent multiple entities and relationships in ERD
• Avoid the display of attributes to eliminates complication that result when the
inheritance rules changed.
Primary Keys
• Single attribute or combination attributes, which uniquely identifies each entity
instance.
* Guarantees entity integrity.
* Works with foreign keys to implement relationship.
Natural Keys or Natural identifier
• Real World Identifier use to uniquely identify Real world objects.
* Familiar to end users and forms part of their day-to-day business vocabulary.
* Also Known as Natural identifier.
* Use as the Primary key of the entity Being modeled.
Non intellegent
No change Overtime
Preferably Single Attribute
Preferably Numeric
Security complaint
Desirable Primary Key Characteristics
Use of Composite Primary Key
• Useful as identifiers of composite entities,
* Each primary key combination is allowed only once in M:N relationship
• Identifiers of weak entities,
* Weak entity has strong identifying relationship with parent entity
Use of Composite Primary Key
• When used as idetifiers of weak entities, Represent the real world object That is:
* Existent dependent on another real-world object
* Represented in data model as two separate entities in strong identifying
relationship
Surrogate Keys
• Primary Key used to simplify the identification of entity instances useful when:
* there is No natural key
* Selected candidate key has embedded semantic contents or is too long.
• Requires ensuring that the candidate key of entity in questions perform properly.
* use of “unique index” and “not null” constraints
Design Case 1: Implementing 1:1 Relationships
• Foreign keys work with primary keys to properly implement relationships in relational model
RULES:
* Put primary key of the “one” side on the “many” side as foreign key
• Option for selecting and placing of foreign key:
* Place a foreign key in both entities.
* Place a foreign key in one of the entities.
Table 5.5 - Selection of foreign Key in 1:1 Relationships
Figure 5.7- The 1:1 Relationships Between Department and
Employee
Design Case 2: Maintaining History of Time-
Variant Data
• Time Variant Data: data whose values change over time and for which you must keep a history
of data changes must be retained
* Requires Creating a new entity in 1:M relationship with the original entity.
* New Entity contains the new value, Date of the change,and other pertinent attribute.
Design Case 3: Fan Traps
• Design trap : occurs when relationship is improperly or incompletely identified
* Represented in a way not consistent in a real world.
• Fan Trap : occurs when having one entity in two 1:M relationships to other entities
* Produced an association among other entities not expressed in the model.
Design Case 4: Redundant Relationships
• Occur when there are multiple relationship paths between related entities
• Need to remain consistent accross the model
• Help Simplify design.