Data Model (Extra) - 113538
Data Model (Extra) - 113538
Lecture 3
PREPARED BY
Mr. Siphael Betuel
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
Text: Any alphabetical/numerical data that you desire
Examples of Text data are: names, addresses, stock numbers,
room numbers, zip codes, etc.
Number :This field is for numbers where you want to add,
subtract, multiply, divide,
Date/Time: Dates and Times. You may format these later,
as you may desire.
Currency :Dollars ($). You may format these later, as you
may desire.
AutoNumber : This field is an “automatic” counter that
assigns a number each time you put data into a new field.
Value Sets (Domains) of Attributes.
❑Candidate Key
▪ The minimal set of attributes that uniquely identifies
each occurrence of an entity type
▪ A candidate key is the minimal number of attributes,
whose value(s) uniquely identify each entity
occurrence. For example, the branch number
(branchNo) attribute is the candidate key for the
Branch entity type, and has a distinct value for each
branch entity occurrence
Keys
❑ 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
Starting an ERD
Works_
employee department
in
Questions or Comments over ERD?
Examples