Professional Documents
Culture Documents
Week2 DBMS PDF
Week2 DBMS PDF
Week2 DBMS PDF
CSC 220
Calender
1 Relational Model
Relational Model
2 SQL
4 Takeaway!
Outline
1 Relational Model
Relational Model
2 SQL
4 Takeaway!
Relational Model
Figure 2: Example of RM
1 Relational Model
Relational Model
2 SQL
4 Takeaway!
SQL
Figure 4: Example1
Relational Model
Figure 5: Example of RM
Outline
1 Relational Model
Relational Model
2 SQL
4 Takeaway!
Database Design
Outline
1 Relational Model
Relational Model
2 SQL
4 Takeaway!
Outline
1 Relational Model
Relational Model
2 SQL
4 Takeaway!
ERM components
Identication of Entities
Identication of Entities
Outline
1 Relational Model
Relational Model
2 SQL
4 Takeaway!
Example
Solution
.
Figure 7: Solution
Dr. Ghulam Mustafa (BULC) Week2 February 20, 2019 23 / 42
Entity-Relationship Model (ERM) Scenario-1
Tips
Follow the steps below to identify and model entities from a set of
interview notes:
Examine the nouns. Are they things of signicance? Name each entity.
Is there information of interest about the entity that the business needs
to hold?
Name each attribute.
Diagram each entity and few of its attributes.
ERM
Figure 8: ERM
Outline
1 Relational Model
Relational Model
2 SQL
4 Takeaway!
Exercise-1
Identify and model the entities & attributes from the following set of
interview notes:
Exercise-1-Descriptions
Solution
Outline
1 Relational Model
Relational Model
2 SQL
4 Takeaway!
RELATIONSHIPS
Relationships
.
Relationships
Relationships
Example
.
Outline
1 Relational Model
Relational Model
2 SQL
4 Takeaway!
Exercise-2
Write the relationship sentences for the following ERM:
Exercise-2-Solution
The unique identier of each entity becomes the primary key of the
table.
1 Relational Model
Relational Model
2 SQL
4 Takeaway!
Takeaway!
Relational Models