7.4 Data Modelling and ERDs
7.4 Data Modelling and ERDs
SLO # 7.4.1
What is Data Modelling?
Data modeling is the process of creating a data model for the data to be
stored in a Database. This data model is a conceptual representation
of :
• Data objects
• The associations between different data objects
• The rules
SLO # 7.4.2
What is ER Diagrams?
Examples of entities:
Person: Employee, Student, Patient
Place: Store, Building
Object: Machine, product, and Car
Event: Sale, Registration, Renewal
Concept: Account, Course
What are Relationship?
It is a single-valued property of
either an entity-type or a
relationship-type.
For example, a lecture might
have attributes: time, date,
duration, place, etc.
An attribute is represented by an
Ellipse.
Example of ER Diagrams
Facts about ER Diagram Model:
• Entities
• Attributes
• Relationships
Example
For example, in a University database, we might have entities for Students, Courses,
and Lecturers. Students entity can have attributes like Rollno, Name, and DeptID.
They might have relationships with Courses and Lecturers.
Cardinality Notations
Show different types of relationships between
two entities;
SLO # 7.4.3
One to One
One entity from entity set X can be associated with at most one entity of
entity set Y and vice versa.
Example: One student can register for numerous courses. However, all those
courses have a single line back to that one student.
One to Many
One entity from entity set X can be associated with multiple entities of entity
set Y, but an entity from entity set Y can be associated with at least one entity.
SLO # 7.4.4
What are Cardinality?
SLO # 7.4.5
Describe the normalization of relational
database;
SLO # 7.4.6
What is Normalization?