ER Diagram Presentation
ER Diagram Presentation
to our Presentation
INTRODUCTION TO ER
DIAGRAM
1. Entity
An entity is something real in the world that we want to store data about.
It can be a person, place, object, or event.
Examples: Student, Teacher, Book, Car
It is shown as a rectangle in the diagram.
Types of Entities:
• - Strong Entity:
Can exist on its own.
Example: A Person with a name and ID.
• - Weak Entity:
Cannot exist without another entity.
Example: A Child depends on a Parent.
• - Associative Entity:
Connects two entities and holds extra information.
Example: Enrollment connects a Student and a Course, and includes
details like Grade or Join Date.
COMPONENTS OF ER
DIAGRAM
2. Attributes
Attributes are details about an entity, shown as ovals connected to it.
eg: A Student has attributes like StudentID, Name, Age.
-Types of Attributes:
• ✅ Simple: Cannot be broken down. eg: Age
• 🧩 Composite: Can be split into parts. eg: Name = First + Last
• 🔘 Single-valued: Has only one value. eg: Date of Birth
• 🧪 Multi-valued: Has more than one value. eg: Phone Numbers
• 💾 Stored: Actually stored in the database. eg: Date of Birth
• 🔄 Derived: Calculated from other data. eg: Age (from DOB)
• Key Attribute: Uniquely identifies an entity. eg: Roll No
COMPONENTS OF ER
DIAGRAM
3. Relationships
Show how two entities are connected, shown as a diamond shape.
eg: Student enrolls in Course.
Types of Relationships (Cardinality):
• 🔗 One-to-One (1:1): One entity connects to only one other.
eg: One Employee has one Department.
• 🔗 One-to-Many (1:N): One record connects to many in another
entity.
eg: One Customer has many Orders.
• 🔗 Many-to-One (N:1): Many records connect to one in another
entity.
eg: Many Employees work in one Department.
• 🔗 Many-to-Many (M:N): Many records in both entities are linked.
eg: Many Students enroll in many Courses (needs a bridge table
like StudentCourse).
ER-DIAGRAM SYMBOLS
Symbol Meaning
▭
Entity
◯
Attribute
◇
Relationship
⥮
Double
Rectangle
⤷
Lines
ER-DIAGRAM
EXAMPLE OF ER-DIAGRAM
🧱 1. Entities (Rectangles)
- Student: Represents students in the system. eg: StudentID, Name
- Course: Represents the courses offered. eg: CourseID
- Enrollment (Associative Entity): Connects Student and Course, storing extra
info.
eg: JoinDate, Grade
🔗 2. Relationships (Diamonds)
- Enrolls: Connects Student and Course, showing that a student enrolls in a
course.
This is modeled using the Enrollment table to hold more details.
🧩 3. Attributes (Ovals)
- Student → StudentID, Name
- Course → CourseID
- Enrollment → JoinDate, Grade
SUMMARY
Enrolls
Relationsh Connects Student and Course
ip
THANK U
(end)
# Machu
Gang