In DBMS, relationships represent associations between entities in a database. The primary types of relationships are:
- One-to-One (1:1):
- Each entity in one table is related to one entity in another.
- Example: A person and their passport.
- One-to-Many (1:N):
- One entity in a table can be related to multiple entities in another.
- Example: A customer and their orders.
- Many-to-Many (M:N):
- Many entities in one table can relate to many entities in another, often managed using a junction table.
- Example: Students and courses.
These relationships define how data is interconnected.