Professional Documents
Culture Documents
ER Diagrams Crow Feet & Chen Notations The main characteristics of entity relationship components Entity Attributes Primary keys Composite primary keys Composite and simple attributes Single-valued attributes Multivalued attributes Relationships 1:M relationship 1:1 relationship M:N relationship
2
Entities
Refers to entity set and not to single entity occurrence Corresponds to table and not to row in relational environment In both Chen and Crows Foot models, entity is represented by rectangle containing entitys name Entity name, a noun, is usually written in capital letters
Attributes
Characteristics of entities In Chen model, attributes are represented by ovals and are connected to entity rectangle with a line Each oval contains the name of attribute it represents In Crows Foot model, attributes are written in attribute box below entity rectangle
Single-Valued Attributes
Single-value attribute can have only a single value
Ex. CAR_MODEL_NO
Multivalued Attributes
Multivalued attributes can have many values Ex. A car color may be subdivided into many colors (colors for the roof, body and trim) Chen Model, the multivalued attributes are shown by double line connecting the attribute to the entity.
7 8
10
Derived Attributes
Attribute whose value may be calculated (derived) from other attributes.
Ex. EMP_AGE can be derived by computing the difference between the current date and the EMP_DOB
Need not be physically stored within database. Can be derived by using an algorithm. Chen Model, the derived attribute is connected to the entity using dashed line.
11
12
Relationships
Association between entities Participants are entities that participate in a relationship Relationships between entities always operate in both directions in order to classified whether the relationship is 1:1, 1:M or M;N Relationship classification is difficult to establish if only one side of the relationship is known
13
14
15
16
17
18
19
20
26
Relationship Strength
Weak (non-identifying) relationships
Exists if PK of related entity does not contain PK component of parent entity
27
28
Weak Entities
Weak entity meets two conditions Existence-dependent
Cannot exist without entity with which it has a relationship
Has primary key that is partially or totally derived from parent entity in relationship Database designer usually determines whether an entity can be described as weak based on business rules
29
30
Relationship Participation
Optional participation
One entity occurrence does not require corresponding entity occurrence in particular relationship
Mandatory participation
One entity occurrence requires corresponding entity occurrence in particular relationship
31
32
Relationship Degree
Indicates number of entities or participants associated with a relationship Unary relationship
Association is maintained within single entity
Binary relationship
Two entities are associated
Ternary relationship
Three entities are associated
33
34
35
36
Recursive Relationships
Relationship type where same entity type participates more than once in different
Recursive Relationships
roles
Relationship can exist between occurrences of the same entity set Naturally found within unary relationship
37
38
39
40
Summary
Now you should be able to explain: ER Diagrams Crow Feet & Chen Notations The main characteristics of entity relationship components Entity Attributes Relationships - 1:M relationship , 1:1 relationship and M:N
relationship
References
Database systems: design, implementation, and management, by Peter Rob, Carlos Coronel
Strong and weak identfying relationship Relationship participation Relationship degree Recursive relationship
41 42