In the Entity Relationship (ER) Model, relationship types describe how many instances of one entity can be associated with instances of another. The three main relationship types are one‑to‑one (1:1), one‑to‑many (1:M), and many‑to‑many (M:N). Understanding these types is essential for correct ER design and mapping to relational tables.
1. One‑to‑One (1:1) Relationship
In a one‑to‑one relationship, one instance of entity A is related to at most one instance of entity B, and vice versa.
Examples
One PERSON has at most one PASSPORT.
One ROOM in a hostel may be assigned to one STUDENT.
ER Notation
Usually written as 1:1 on the relationship line between two entities.
Mapping to Relational Model
Add a foreign key to one of the tables (usually the dependent one).
For example, in PERSON(PID, Name) and PASSPORT(ID, Issue_Date), you may add PID as a foreign key in the PASSPORT table.
2. One‑to‑Many (1:M) Relationship
In a one‑to‑many relationship, one instance of entity A can relate to many instances of entity B, but each B instance relates to at most one A instance.
Examples
One DEPARTMENT can have many EMPLOYEES, but each EMPLOYEE belongs to one department.
One AUTHOR may write many BOOKS, but each BOOK has one author (in a simple model).
ER Notation
Written as 1:M near the relationship line (1 on the DEPARTMENT side, M on the EMPLOYEE side).
Mapping to Relational Model
Place the foreign key in the “many” side table.
Example:
DEPARTMENT(DID, DName)
EMPLOYEE(EID, Name, DID)
The DID in EMPLOYEE is a foreign key referencing DEPARTMENT(DID).
3. Many‑to‑Many (M:N) Relationship
In a many‑to‑many relationship, many instances of entity A can relate to many instances of entity B.
Examples
Many STUDENTS enrolled in many COURSES.
Many CUSTOMERS may order many PRODUCTS.
ER Notation
Written as M:N between the two entities.
Mapping to Relational Model
Create a separate junction table (also called relationship table or associative entity).
This table has foreign keys from both sides plus any relationship attributes.
Example:
STUDENT(Roll_No, Name, Branch)
COURSE(Course_ID, Course_Name, Credits)
ENROLLMENT(Roll_No, Course_ID, Grade, Semester)
Here, ENROLLMENT is the junction table with:
Roll_No (foreign key from STUDENT)
Course_ID (foreign key from COURSE)
Primary key: {Roll_No, Course_ID}
Why Relationship Types Matter
They determine where to place foreign keys in the relational model.
They affect data integrity and constraints (NOT NULL, uniqueness).
They influence query design (JOINs between tables).
Summary
Relationship Types in the DBMS ER Model are one‑to‑one (1:1), one‑to‑many (1:M), and many‑to‑many (M:N). Each type has a specific meaning and leads to a particular way of mapping entities into relational tables. By correctly identifying the relationship type, beginners can design more accurate and consistent database schemas.