CP 121 - 3
CP 121 - 3
Database Systems
Lecture 3: Data Models
Madam, Muro
Data Models
Strong Entity
These shapes are independent from other entities,
and are often called parent entities, since they will
often have weak entities that depend on them.
They will also have a primary key, distinguishing each
occurrence of the entity.
Types of Entities
Weak Entity
Weak entities depend on some other entity type.
They don't have primary keys, and have no meaning
in the diagram without their parent entity.
ERD CONTINUE…
4. Null values.
In some cases a particular entity may not have an
applicable value for an attribute. E.g a person with
no college degree would have null for college
degree.
Data Type: MS access
• ,
Person belongs Location
Cardinality
Entity instance‟s participation count
Describes how many entity instance can be in the
relationship
Cardinality
Minimum cardinality
Describes the minimum number of entity instances that
must participate in a relationship
One-to-One Relationship
One-to-One (1:1)
A single entity instance in one entity class is related to a
single entity instance in another entity class
Notation
A governor governs (only) one state; a state has (only) one governor
One-to-Many Relationship
One-to-Many (1:N)
A single entity instance in one entity class (parent) is
related to multiple entity instances in another entity
class (child) Notation
Many-to-Many (N:M)
Each entity instance in one entity class is related to
multiple entity instances in another entity class; and vice
versa Notation
Manages
EMPLOYEE
Binary Relationship
• Relationship ,
between the Is_assigned PARKING
EMPLOYEE
instances of two SPACE
entity type.
• Binary (two
entities)
relationship is most Contains
common PRODUCT
PRODUCTS
LINE
Ternary Relationship
• A simultaneous .
relationship among PART
instances of three entity
types
VENDOR WAREHOUSE
Supplies
Identifying relationship
The relationship associating the weak entity set with
the identifying entity set is called the identifying
relationship
Participation Constraints
1-to-1 relationship
1-to-M relationship
M-to-N relationship
Cardinality con’t
Starting an ERD
Works_
employee department
in
Examples