Professional Documents
Culture Documents
Entity
Database Design
And Development
Relationship
(ER) Modeling
Nor Azlina Binti Aziz Fadzillah
FSKM
UiTM NS, Kampus Seremban
Learning Objectives
The main characteristics of entity relationship components
How relationships between entities are defined, refined, and incorporated into the
database design process
That real-world database design often requires the reconciliation of conflicting goals
Entity Relationship Model (ERM)
Example:
In a University database,
we might have entities for
Students, Courses, and
Lecturers.
Identifiers • One or more attributes that uniquely identify each entity instance
Entity exists in the database only when Entity exists apart from all of its related
it is associated with another related entities
entity occurrence Referred to as a strong entity or
regular entity
RELATIONSHIP STRENGTH
▪ Primary key of
Weak the related
Entity entity does not
contain a
(non-
identifying) primary key
relationship component of
the parent entity
Relationship
Participation One entity occurrence
Mandatory requires a
corresponding entity
participation occurrence in a
particular relationship
Crow’s Foot Symbols
Recursive
relationship:
Relationship exists
between occurrences of
the same entity set
THREE TYPES OF RELATIONSHIP DEGREE
ER REPRESENTATION OF
RECURSIVE RELATIONSHIPS
Associative Entities
Also known as composite or bridge entities
May also contain additional attributes that play no role in connective process
Converting the M:N Relationship into Two
1:M Relationships
Developing an ER Diagram
Create a detailed narrative of the organization’s description of
Create
operations
Identify Identify main entities and relationships from the business rules
Therefore,
DEPARTMENT is optional to
PROFESSOR
PROFESSOR teach CLASS
CLASS is optional to PROFESSOR
BUSINESS RULE:
Need for high processing speed may limit the number and
Need complexity of logically desirable relationships
a) Create a basic Crow's Foot ERD based on the above relational schema.
SALES INVOICE
You need to make sure that all your entities and relationships are properly labeled
You need to make sure that the ER diagram supports all the data you need to store
You should assure that each entity only appears a single time in the ER diagram
Name every relationship, entity, and attribute are represented on your diagram
Consider the relationships between all entities and relate them with proper cardinality
Apply the technique of database normalization to re-structure the entities in a way that can
reduce data redundancy and improve data integrity.
Summary
ER Model in DBMS stands for an Entity-Relationship model
The ER model is a high-level data model diagram
ER diagrams are a visual tool which is helpful to represent the ER model
ER diagrams in DBMS are blueprint of a database
Entity relationship diagram DBMS displays the relationships of entity set stored in a database
ER diagrams help you to define terms related to entity relationship modeling
ER Model in DBMS is based on three basic concepts: Entities, Attributes & Relationships
An entity can be place, person, object, event or a concept, which stores data in the database
(DBMS)
Relationship is nothing but an association among two or more entities
A weak entity is a type of entity which doesn't have its key attribute
It is a single-valued property of either an entity-type or a relationship-type
It helps you to defines the numerical attributes of the relationship between two entities or entity sets
ER- Diagram DBMS is a visual representation of data that describe how data is related to each other
While Drawing ER diagrams in DBMS, you need to make sure all your entities and relationships are
properly labeled.