ER DIAGRAM
Prof.manoj kumar padhi
INTRODUCTION OF ER MODEL
The Entity-Relationship Model (ER Model) is a conceptual model for designing a databases. This model represents the logical structure of a database, including entities, their attributes and relationships between them.
ER MODEL IN DATABASE DESIGN PROCESS
WHY USE ER DIAGRAMS IN DBMS?
SYMBOLS USED IN ER MODEL
ER Model is used to model the logical view of the system from a data perspective which consists of these symbols:
ENTITY
An Entity represents a real-world object, concept or thing about which data is stored in a database. It act as a building block of a database. Tables in relational database represent these entities.
ENTITY SET�
Characteristics of an Entity Set:
CONT…..
We can represent the entity sets in an ER Diagram but we can't represent individual entities because an entity is like a row in a table, and an ER diagram shows the structure and relationships of data, not specific data entries (like rows and columns). An ER diagram is a visual representation of the data model, not the actual data itself.
TYPES OF ENTITY�
STRONG ENTITY�
WEAK ENTITY�
EXAMPLE:
ATTRIBUTES IN ER MODEL�
TYPES OF ATTRIBUTES�
KEY ATTRIBUTE�
COMPOSITE ATTRIBUTE�
MULTIVALUED ATTRIBUTE�
DERIVED ATTRIBUTE�
TOTAL ER DIAGRAM OF A STUDENT
RELATIONSHIP TYPE AND RELATIONSHIP SET
DEGREE OF A RELATIONSHIP SET
UNARY/RECURSIVE RELATIONSHIP
BINARY RELATIONSHIP
TERNARY RELATIONSHIP
N-ARY RELATIONSHIP
TYPES OF RELATIONSHIPS
ONE-TO-ONE (1:1) RELATIONSHIP
ONE-TO-MANY
MANY-TO-ONE
MANY-TO-MANY
HOW TO DRAW AN ER DIAGRAM
1. Identify Entities: The very first step is to identify all the Entities. Represent these entities in a Rectangle and label them accordingly.
2. Identify Relationships: The next step is to identify the relationship between them and represent them accordingly using the Diamond shape. Ensure that relationships are not directly connected to each other.
3. Add Attributes: Attach attributes to the entities by using ovals. Each entity can have multiple attributes (such as name, age, etc.), which are connected to the respective entity.
CONT…
4. Define Primary Keys: Assign primary keys to each entity. These are unique identifiers that help distinguish each instance of the entity. Represent them with underlined attributes.
5. Remove Redundancies: Review the diagram and eliminate unnecessary or repetitive entities and relationships.
6. Review for Clarity: Review the diagram make sure it is clear and effectively conveys the relationships between the entities.
�
THANK YOU