SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Databased System
Design, Implementation Management
V.
ADVANCED DATA
MODELING
•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.
FIGURE 5.2 - Specialization Hierarchy
• 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.
FIGURE 5.4-Specialization hierarchy with overlapping 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.
Table 5.2 - Specialization hierarchy Constraint Scenarios
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.
FIGURE 5.5- Tiny College ERD using Entity clusters.
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
FIGURE 5.6- The M:N Relationships Between STUDENTS and CLASS
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
Table 5.4 - Data Use to Keep track of Events
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.
Figure 5.8- Maintaining Salary History
Figure 5.9- Maintaining Manager History
Figure 5.10- Maintaining job history
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.
Figure 5.11- Incorrect ERD with Fan trap Problem
Figure 5.12- Corrected ERD after removal of the Fan Trap
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.
Figure 5.13- A Redundant relationship
THANKYOUUUU
D
a
t
a
B
a
s
e
S
y
s
t
e
m
D
e
s
i
g
n
,
I
m
p
l
e
m
e
n
t
a
t
i
o
n
m
a
n
a
g
e
m
e
n
t
ADVANCED DATA
MODELING

Weitere ähnliche Inhalte

Ă„hnlich wie Advanced data modeling techniques

Salesforce Training Institute & Courses Pune | SFDC Training PCMC
Salesforce Training Institute & Courses Pune | SFDC Training PCMCSalesforce Training Institute & Courses Pune | SFDC Training PCMC
Salesforce Training Institute & Courses Pune | SFDC Training PCMCvictoriousdigital
 
18306_lec-2 (1).ppt
18306_lec-2 (1).ppt18306_lec-2 (1).ppt
18306_lec-2 (1).pptIshuIswarya3
 
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
SQL Tutorial - Basics of Structured Query Language Day 1.pdfSQL Tutorial - Basics of Structured Query Language Day 1.pdf
SQL Tutorial - Basics of Structured Query Language Day 1.pdfRiturajDas28
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagramssadique_ghitm
 
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution ManualData Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manualendokayle
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxMaryJoseph79
 
Uml diagrams usecase
Uml diagrams usecaseUml diagrams usecase
Uml diagrams usecaseSandhyaTatekalva
 
common design patterns summary.pdf
common design patterns summary.pdfcommon design patterns summary.pdf
common design patterns summary.pdfNikolayRaychev2
 
ER Model in the Database Computer Science.pdf
ER Model in the Database Computer Science.pdfER Model in the Database Computer Science.pdf
ER Model in the Database Computer Science.pdfKailash Maheshwari
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxJasmineMichael1
 
entityrelationshipmodel.pptx
entityrelationshipmodel.pptxentityrelationshipmodel.pptx
entityrelationshipmodel.pptxThangamaniR3
 
2 er
2 er2 er
2 erELIMENG
 
Unit 2-Data Modeling.pdf
Unit 2-Data Modeling.pdfUnit 2-Data Modeling.pdf
Unit 2-Data Modeling.pdfMaryJacob24
 
Data Modeling Basics
Data Modeling BasicsData Modeling Basics
Data Modeling Basicsrenuindia
 

Ă„hnlich wie Advanced data modeling techniques (20)

Salesforce Training Institute & Courses Pune | SFDC Training PCMC
Salesforce Training Institute & Courses Pune | SFDC Training PCMCSalesforce Training Institute & Courses Pune | SFDC Training PCMC
Salesforce Training Institute & Courses Pune | SFDC Training PCMC
 
18306_lec-2 (1).ppt
18306_lec-2 (1).ppt18306_lec-2 (1).ppt
18306_lec-2 (1).ppt
 
Data Models.pptx
Data Models.pptxData Models.pptx
Data Models.pptx
 
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
SQL Tutorial - Basics of Structured Query Language Day 1.pdfSQL Tutorial - Basics of Structured Query Language Day 1.pdf
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution ManualData Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
 
Database design
Database designDatabase design
Database design
 
Uml diagrams usecase
Uml diagrams usecaseUml diagrams usecase
Uml diagrams usecase
 
ER modeling
ER modelingER modeling
ER modeling
 
common design patterns summary.pdf
common design patterns summary.pdfcommon design patterns summary.pdf
common design patterns summary.pdf
 
Erd1
Erd1Erd1
Erd1
 
ER Model in the Database Computer Science.pdf
ER Model in the Database Computer Science.pdfER Model in the Database Computer Science.pdf
ER Model in the Database Computer Science.pdf
 
Dbms Model.pdf
Dbms Model.pdfDbms Model.pdf
Dbms Model.pdf
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
 
entityrelationshipmodel.pptx
entityrelationshipmodel.pptxentityrelationshipmodel.pptx
entityrelationshipmodel.pptx
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
 
2 er
2 er2 er
2 er
 
Unit 2-Data Modeling.pdf
Unit 2-Data Modeling.pdfUnit 2-Data Modeling.pdf
Unit 2-Data Modeling.pdf
 
Data Modeling Basics
Data Modeling BasicsData Modeling Basics
Data Modeling Basics
 

KĂĽrzlich hochgeladen

Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxolyaivanovalion
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Delhi Call girls
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
Call Girls Hsr Layout Just Call đź‘— 7737669865 đź‘— Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call đź‘— 7737669865 đź‘— Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call đź‘— 7737669865 đź‘— Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call đź‘— 7737669865 đź‘— Top Class Call Girl Service Ba...amitlee9823
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023ymrp368
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 

KĂĽrzlich hochgeladen (20)

CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptx
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
Best VIP Call Girls Noida Sector 39 Call Me: 8448380779
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
Call Girls Hsr Layout Just Call đź‘— 7737669865 đź‘— Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call đź‘— 7737669865 đź‘— Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call đź‘— 7737669865 đź‘— Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call đź‘— 7737669865 đź‘— Top Class Call Girl Service Ba...
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 

Advanced data modeling techniques

  • 3. •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
  • 4. 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
  • 5. 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.
  • 6. 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.
  • 7. 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.
  • 8. 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.
  • 9. FIGURE 5.2 - Specialization Hierarchy
  • 10. • 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
  • 11. 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
  • 12. 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.
  • 13. FIGURE 5.4-Specialization hierarchy with overlapping Subtypes
  • 14. Table 5.1 - Discriminator attributes with overlapping subtypes
  • 15. 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.
  • 16. Table 5.2 - Specialization hierarchy Constraint Scenarios
  • 17. 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
  • 18. 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.
  • 19. FIGURE 5.5- Tiny College ERD using Entity clusters.
  • 20. Primary Keys • Single attribute or combination attributes, which uniquely identifies each entity instance. * Guarantees entity integrity. * Works with foreign keys to implement relationship.
  • 21. 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.
  • 22. Non intellegent No change Overtime Preferably Single Attribute Preferably Numeric Security complaint Desirable Primary Key Characteristics
  • 23. 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
  • 24. 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
  • 25. FIGURE 5.6- The M:N Relationships Between STUDENTS and CLASS
  • 26. 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
  • 27. Table 5.4 - Data Use to Keep track of Events
  • 28. 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.
  • 29. Table 5.5 - Selection of foreign Key in 1:1 Relationships
  • 30. Figure 5.7- The 1:1 Relationships Between Department and Employee
  • 31. 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.
  • 32. Figure 5.8- Maintaining Salary History
  • 33. Figure 5.9- Maintaining Manager History
  • 35. 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.
  • 36. Figure 5.11- Incorrect ERD with Fan trap Problem
  • 37. Figure 5.12- Corrected ERD after removal of the Fan Trap
  • 38. 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.
  • 39. Figure 5.13- A Redundant relationship