Database Management System (DBMS) / ER Model

What are Relationships between Entities?

πŸ§‘β€πŸŽ“ What is Relationship?

A Relationship in DBMS defines how two or more entities are connected or associated with each other.

In other words, it shows how one entity is related to another in a real-world context.


πŸ§‘β€πŸŽ“ Example (Real-life):

In a university database:

  • πŸ‘€ Student

  • πŸ“š Course

  • The relationship could be:

    πŸ‘‰ A Student ENROLLS in a Course

Here:

  • Student and Course are entities

  • ENROLLS is the relationship between them



🧾 Relationship Degree:

The degree of a relationship refers to the number of entity sets that participate in a relationship.

Degree

Meaning

Example

Unary

Relationship between same entity

Employee manages another Employee

Binary

Relationship between two entities

Student ENROLLS in Course

Ternary

Relationship between three entities

Doctor prescribes Medicine to Patient


🧠 Summary:

πŸ”Ή Concept

πŸ“– Description

Entity

Real-world object (e.g., Student, Course)

Attribute

Property of an entity (e.g., Name, ID)

Relationship

Describes how entities are connected (e.g., ENROLLS)

ER Diagram

Uses diamonds to show relationships between rectangles