This document discusses entity-relationship modeling and the relational model. It defines key concepts like entities, attributes, relationships and cardinality. It shows examples of entity-relationship diagram notation using rectangles, ellipses and diamonds. The document then maps an entity-relationship diagram for a DVD rental database to relational tables. It concludes with a short quiz to test understanding of entity-relationship modeling concepts.
Scaling API-first – The story of a global engineering organization
ER MODELING AND RELATIONAL MAPPING
1. WEEK 2 ENTITY-RELATIONSHIP MODELING:
summary
Real-life example
Relational Data Model Basic Concepts:
Entity, Attribute, Keys, Relationship, Cardinality
ERD notation:
Rectangles, Ellipses, Diamonds, Lines
Advantages / Disadvantages of ERD:
quiz
2. WEEK 2 ENTITY-RELATIONSHIP MODELING:
summary
Real-life example
quiz
Mapping the ERD to the relational model
DVD(DVDId, Title, YearPublished)
Customer(CustomerId, FirstName, LastName, Address, PhoneNo)
Director(DiretorId, FirstName, LastName, Address, PhoneNo)
Actor(ActorId, FirstName, LastName, Address, PhoneNo)
Requests(DVDId, CustomerId, DateRequest)
Directed(DVDId, DiretorId, YearDirected)
PlaysIn(DVDId, ActorId, YearPlaysIn)
3. WEEK 2 ENTITY-RELATIONSHIP MODELING:
summary
Real-life example
quiz
Map the ERD for DVD rental database.
CustomerId
Address
PhoneNo
LastName
FirstName
LastName
Customer
N
DiretorId
DVDId
Requests
FirstName
Title
Date
Director
1
N
N
N
Directed
Address
PhoneNo
Year
YearPublished
DVD
Plays in
Year
Address
FirstName
N
PhoneNo
Actor
ActorId
LastName
4. WEEK 2 ENTITY-RELATIONSHIP MODELING:
summary
Real-life example
quiz
1. A thing in the real world with an independent existence is:
A. A bit
B. A window
C. An entity
D. A table
E. A database
2. Properties used to describe an entity are:
A. Attributes
B. Rows
C. Characters
D. Entities
E. Names
Enter answer,,,.
5. WEEK 2 ENTITY-RELATIONSHIP MODELING:
summary
Real-life example
quiz
1. A thing in the real world with an independent existence is:
A. A bit
B. A window
C. An entity
D. A table
E. A database
2. Properties used to describe an entity are:
A. Attributes
B. Rows
C. Characters
D. Entities
E. Names
answer is:
1. C
2. A
6. WEEK 2 ENTITY-RELATIONSHIP MODELING:
summary
Real-life example
quiz
3. An attribute that is selected to uniquely identify each occurrence of an entity
type is :
A. Alternate key
B. Prime attribute
C. Multi valued attribute
D. Primary key
E. Atomic attribute
4. The Entity-Relationship data model is an example of implementation of a field :
A. True
B. False
5. Cardinality specifies how many instances of an entity relate to one instance of
another entity :
A. True
B. False
Enter answer,,,.
7. WEEK 2 ENTITY-RELATIONSHIP MODELING:
summary
Real-life example
quiz
3. An attribute that is selected to uniquely identify each occurrence of an entity
type is :
A. Alternate key
B. Prime attribute
C. Multi valued attribute
D. Primary key
E. Atomic attribute
4. The Entity-Relationship data model is an example of implementation of a field :
A. True
B. False
5. Cardinality specifies how many instances of an entity relate to one instance of
another entity :
A. True
B. False
answer is:
3. D
4. B
5. A