DBMS Unit 2
DBMS Unit 2
The Entity-Relationship (E-R) Model is a way to visualise and design databases. It helps
organise data into entities and define relationships between them, making it easier to
understand how data is connected and how it should be structured in a database.
1. Entity:
○ An entity is a real-world object or thing that we want to store information
about.
○ Example: In a school database, students, teachers, and courses are all
entities.
2. Attributes:
○ Attributes are the properties or details of an entity.
○ Example: For the "Student" entity, attributes could be StudentID, Name,
Age, and Class.
3. Relationship:
○ A relationship defines how two entities are related to each other.
○ Example: A "Student" enrolls in a "Course." Here, "enrolls in" is the
relationship between the "Student" and "Course" entities.
A Simple Example:
The E-R model is often represented using a diagram called the E-R Diagram (ERD). Here's
how it looks:
In this diagram:
The E-R model is widely used because it provides a clear and structured way to design
databases. It ensures that all necessary data is captured and that relationships between
different data points are well-defined, reducing the chances of errors and inconsistencies.
Fun Fact:
Did you know that the concept of the E-R model was introduced by Peter Chen in 1976? He
originally developed it as a way to help people understand and design databases more
intuitively. His work has since become a fundamental part of database theory!