Degree of relationship

 Topic Outline
Degree of Relationships
Types of Relationships
  • Unary Relationship
  • Binary Relationship
    • One to One Relationship
    • One to Many Relationship
    • Many to Many Relationship
  • Ternary Relationship

Degree of Relationship

Relationships consist of many entities. In a relationship, the number of entities is called the degree of relationship. 

Types of Relationships

1: Unary Relationship
2: Binary Relationship
3: Ternary Relationship

1: Unary Relationship

A unary relationship is a type of relationship. This relationship is established between the instance of the same entity. A unary relationship is also known as a recursive relationship.

Example

The below relationship means that a student helps another student.


Shape

The below relationship means that teacher lives with another teacher.



 
 2: Binary Relationship

A binary relationship is a type of relationship. The relationship of degree 2 is called binary relationship. This relationship exists between the instances of two entity types.

Types of Binary Relationship

One to One Relationship

One to One relationship is a type of binary relationship. A one-to-one relationship is used when for each instance in the first entity class there is only one instance in the second entity class and for each instance in the second entity class, there is only one instance in the first entity class.

Examples

The below relationship means that one manager manages only one organization. Similarly, one organization is managed by one manager.


Shape 

The below relationship means that one head runs only one Department. Similarly, one department is run by one head.


 

One to Many Relationship

One to Many relationships is a type of binary relationship. A one-to-many relationship is used when for each instance in the first entity class there can be many instances in the second entity class and for each instance in the second entity class, there is only one instance in the first entity class.

Examples

The below relationship means that one university can have many departments but one department is part of only one college.


 

The below relationship means that one Province can have many cities but one city has belonged to one province.


 

The below relationship means that one organization can have many employees but one employee has belonged to one organization.


 

Many to Many Relationship

Many to Many relationships are a type of binary relationship. A many-to-many relationship is used when for each instance in the first entity class there can be many instances in the second entity class and for each instance in the second entity class, there can be many instances in the first entity class.

Examples

The below relationship means that one student can learn many skills and one skill can be learned by many students.


 

The below relationship means that one person may read many books and one book may be read by many persons.


 


3: Ternary Relationship

A ternary relationship is a type of relationship. This relationship exists among the instances of three entity types.

Examples

The below relationship means that one or many developers with one or many clients sign on one or many contracts.


 


The below relationship means that one or many engineer with one or many clients sign on one or many projects.


 


Comments

Popular Posts

Computer Abbreviation

Transport Layer

Introduction to Database

Types of database

Threads in operating system

Display devices

Shortcut keys of computer

History of Computer