0% found this document useful (0 votes)
10 views8 pages

7.4 Data Modelling and ERDs

Data modeling is essential for structuring databases efficiently and involves three stages: conceptual, logical, and physical data modeling. An entity relationship diagram (ERD) visually represents entities and their relationships, including cardinality and attributes. Examples provided illustrate how to construct ERDs for a car-insurance company and a hospital.

Uploaded by

northernshezan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views8 pages

7.4 Data Modelling and ERDs

Data modeling is essential for structuring databases efficiently and involves three stages: conceptual, logical, and physical data modeling. An entity relationship diagram (ERD) visually represents entities and their relationships, including cardinality and attributes. Examples provided illustrate how to construct ERDs for a car-insurance company and a hospital.

Uploaded by

northernshezan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

7.

4 Data Modelling and ERDs


SLO 7.4.1
Data Modeling

Data modeling is the process of creating a conceptual representation of


data that will be stored in a database. It is a critical step in database
design, as it ensures that the database is structured in a way that is
efficient, flexible, and scalable.
Data Modeling Process
The data modeling process can be divided into three main stages:

1. Conceptual data modeling: This stage involves identifying the entities (things,
events, or concepts) that will be stored in the database, as well as the relationships
between them. The conceptual data model is typically represented using an entity
relationship diagram (ERD).
2. Logical data modeling: This stage involves refining the conceptual data model by
adding more detail, such as data types and constraints. The logical data model is
still independent of any specific database management system (DBMS).
3. Physical data modeling: This stage involves converting the logical data model
into a physical data model that is specific to the DBMS that will be used to
implement the database. The physical data model includes details such as table
names, column names, and data types.
Entity Relationship Diagram (ERD)

An entity relationship diagram (ERD) is a graphical representation of the entities


and relationships in a database. ERDs are used to develop conceptual and logical
data models.
Components of an ERD:

● Entities: Entities are the things, events, or concepts that will be stored in the
database. Examples of entities include students, teachers, courses, and
grades.
● Relationships: Relationships define the associations between entities.
Examples of relationships include "enrolled in" (student and course), "taught
by" (teacher and course), and "received" (student and grade).
● Degree of relationship (cardinality): Cardinality defines the number of
occurrences of one entity that can be associated with a single occurrence of
another entity. There are three main types of cardinality:
○ One-to-one: Each occurrence of one entity can be associated with only
one occurrence of the other entity.
○ One-to-many: Each occurrence of one entity can be associated with
multiple occurrences of the other entity.
○ Many-to-many: Each occurrence of one entity can be associated with
multiple occurrences of the other entity, and vice versa.
● Attributes: Attributes are the properties of entities and relationships.
Examples of attributes include student ID, student name, course code, course
name, teacher name, and grade.
Examples:
Construct an E-R diagram for the following problems:
A car-insurance company whose customers own one or more cars each. Each car has
associated with it zero to any number of recorded accidents.
A hospital with a set of patients and a set of medical doctors.
Associate with each patient a log of the various tests and
examinations conducted.

You might also like