You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
An Entity-Relationship (E-R) Diagram is a visual representation of the entities in a database and the relationships between them. E-R diagrams are used during the design stage of database development to plan the structure before implementation.
An entity is a real-world object or concept about which data is stored. In an E-R diagram, entities are shown as rectangles.
Examples: Student, Course, Teacher, Order, Product.
Attributes are the data items stored about each entity. They are shown as ovals connected to their entity (in Chen notation) or listed inside the entity box (in Crow's Foot notation).
Examples for a Student entity: StudentID, FirstName, Surname, DateOfBirth.
Key attribute: The primary key is usually underlined.
Relationships show how entities are connected. They are shown as diamonds in Chen notation or as lines in Crow's Foot notation.
Examples: Student enrols on Course, Teacher teaches Course.
Cardinality describes the number of instances of one entity that can be associated with instances of another.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.