ER Diagrams (Entity-Relationship Diagrams)
An ER Diagram (Entity-Relationship Diagram) is a graphical representation of the structure of a database. It is used to visually model entities, attributes, and relationships between data in a system. ER diagrams help in designing the database before implementation.
ER diagrams are mainly used during the database design phase to clearly understand how different data elements are connected.
🔹 Main Components of ER Diagrams
1️⃣ Entity
An Entity represents a real-world object or concept.
Examples: Student, Employee, Course
Symbol: Rectangle
2️⃣ Attribute
An Attribute describes the properties of an entity.
Examples: Student_ID, Name, Age
Symbol: Oval
Types of attributes:
-
Simple attribute
-
Composite attribute
-
Multivalued attribute
-
Derived attribute
3️⃣ Relationship
A Relationship shows how two or more entities are connected.
Example: A Student enrolls in a Course
Symbol: Diamond
🔹 Types of Relationships
-
One-to-One (1:1)
-
One-to-Many (1:N)
-
Many-to-Many (M:N)
Comments
Post a Comment