Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 37

E R Model

The Entity Relationship Model


Why ER Model is used?
ER Modelling Constructs
1. Entities
Entity Set
2. Attributes
Example
Types of Attributes
Simple Attributes
Composite Attributes
Single Valued Attribute
Multi-valued Attribites
Stored Attribute
Derived Attribute
Key Attribute
Other possible combinations
Composite & multi-valued attribute
• In general, composite and multi-valued attributes may be nested
arbitrarily to any number of levels
• For example, PreviousDegrees of a STUDENT is a composite multi-valued
attribute denoted by {PreviousDegrees (College, Year, Degree, Field)}
• Multiple PreviousDegrees values can exist

• Each has four subcomponent attributes:

• College, Year, Degree, Field


3. Relationships
Example
Relationship Set
• Relationship Type:
• Is the schema description of a relationship
• Identifies the relationship name and the participating entity types
• Also identifies certain relationship constraints
• Relationship Set:
• The current set of relationship instances represented in the database
• The current state of a relationship type
Relationship: Descriptive Attributes
Degree of Relationship
Degree of Relationship
Degree of Relationship
Mapping Cardinalities (Cardinality Ratio)
One to One (1-1) Relationship
One to Many (1:M Relationship)
Many to One (M:1 Relationship)
Many to Many (M:N Relationship)
How to choose relationship?
Example:
Participation Constraints/ Existence
Dependency Constraint

You might also like