Chapter 3.2 - ERD
Chapter 3.2 - ERD
DATABASE FUNDAMENTALS
3.2 E-R Diagrams (ERD) in database
development
DOA
Learning OUTCOME
Name
(ATTRIBUTE)
Student
(ENTITY)
Enrolled Course
(RELATIONSHIP) (ENTITY)
3.2.1 Entity, attribute and relationship
Using Chen’s Model notation
Identifying relationship
Links strong entities to weak entities
Represented with double line diamond
3.2.1 Entity, attribute and relationship
•Types of Entity
3.2.1 Entity, attribute and relationship - Associative Entities
connective process
3.2.1 Entity, attribute and relationship
Example :
Associative
Entities
ii) Attribute
3.2.1 Entity, attribute and relationship
Types of Attribute : i.Simple vs. Composite Attribute
•Simple Attribute – cannot broken into smaller components
Exercise
3.2.1 Entity, attribute and relationship
iii) Relationships
ERD ????
Entity?
Attribute?
Relationship?
3.2.2 Relationship cardinality
relationship between a row of one table and a row of another table
minimum and maximum number of record in Entity B that can (or must be)
associated with each instance in Entity A.
Examples:
1.Each EMPLOYEE must hold one and only one JOB
2.Each JOB may be held by one or more EMPLOYEE
3.Each PRODUCT must be classified by one and only one PRODUCT TYPE
4.Each PRODUCT TYPE may classify one or more PRODUCT
3.2.3 Relate entities by applying the rules of cardinality
3.2.3 Relate entities by applying the rules of cardinality
3.2.3 Relate entities by applying the rules of cardinality
What is the cardinality for the scenarios below?
3.2.3 Relate entities by applying the rules of cardinality
For each pair of sentences, identify entities and the relationship representing
the sentences.
• The important data fields are the names of the departments, projects,