0% found this document useful (0 votes)
5 views

7.4 Data Modelling and ERDs

Uploaded by

gb200054984
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

7.4 Data Modelling and ERDs

Uploaded by

gb200054984
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Data Modeling

Explain the process of data modeling

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

Data model emphasizes on what data is needed and how it should be


organized. Data Model is like architect's building plan which helps to
build a conceptual model and set the relationship between data items.
What is Data Modelling?
Types of data models

The two types of Data Models techniques are


1. Entity Relationship (E-R) Model
2. UML (Unified Modelling Language)
Discuss the Entity Relationship Diagram (ERD)
and its components i.e. Entity relationship,
degree of relationship (cardinality) and
attributes;

SLO # 7.4.2
What is ER Diagrams?

Entity relationship diagram displays the relationships of entity set


stored in a database. In other words, we can say that ER diagrams help
you to explain the logical structure of databases. At first look, an ER
diagram looks very similar to the flowchart. However, ER Diagram
includes many specialized symbols, and its meanings make this model
unique.
What is Entity?

An entity can be place, person, object, event or a concept, which stores


data in the database. The characteristics of entities are must have an
attribute, and a unique key. Every entity is made up of some 'attributes'
which represent that entity.

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?

Relationship is nothing but an association among two or more entities. E.g.,


Tom works in the Chemistry department.

Entities take part in relationships. We can often identify relationships with


verbs or verb phrases.
What are Attributes?

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:

• ER model allows you to draw Database Design


• It is an easy to use graphical tool for modeling data
• Widely used in Database Design
• It is a GUI representation of the logical structure of a Database
• It helps you to identifies the entities which exist in a system and the
relationships between those entities
Components of the ER Diagram:

This model is based on three basic concepts:

• 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.

For example, one class is consisting of multiple students.


Many to One
More than one entity from entity set X can be associated with at most one
entity of entity set Y. However, an entity from entity set Y may or may not be
associated with more than one entity from entity set X.

For example, many students belong to the same class.


Many to Many
One entity from X can be associated with more than one entity from Y and
vice versa.

For example, Students as a group are associated with multiple faculty


members, and faculty members can be associated with multiple students.
Illustrate the difference between
cardinality and modality

SLO # 7.4.4
What are Cardinality?

Defines the numerical attributes of


the relationship between two entities
or entity sets.

Different types of cardinal


relationships are:
• One-to-One Relationships
• One-to-Many Relationships
• May to One Relationships
• Many-to-Many Relationships
What are Modality?
The Modality is completely different from the cardinality. Its value is computed
as “o” when there is no requirement for the relationship to occur or if the
relationship is optional. The modality value is “1” if there is a compulsion for
the occurrence of a relationship. In simple words, it describes whether a
relationship between two or more entities is even required or not.
Draw entity relationship diagram for different
scenarios;

SLO # 7.4.5
Describe the normalization of relational
database;

SLO # 7.4.6
What is Normalization?

Normalization is a database design technique which organizes tables in


a manner that reduces redundancy and dependency of data.

It divides larger tables to smaller tables and links them using


relationships.

You might also like