Explain Relationship and Relationship sets with example.

This answer is restricted. Please login to view the answer of this question.

Login Now

A relationship represents the association between entity types. For example, ‘Enrolled in’ is a relationship that exists between entity type Student and Course. In ER diagram, the relationship is represented by a diamond and connecting the entities with lines.

Relationship

A set of relationships of the same type is known as a relationship set. The following relationship set depicts S1 being enrolled in C2, S2 being enrolled in C1, and S3 being enrolled in C3.

Relationship Set in DBMS

The number of entity sets that participate in a relationship set is termed as the degree of that relationship set. Thus,

Degree of a relationship set = Number of entity sets participating in a relationship set

Types of Relationship sets:

On the basis of the degree of a relationship set, a relationship set can be classified into the following types-

  1. Unary relationship set
  2. Binary relationship set
  3. Ternary relationship set
  4. N-ary relationship set

1. Unary Relationship set:

A unary relationship set is a relationship set where only one entity set participates in a relationship set.

Example: One person is married to only one person

Unary Relationship

2. Binary relationship set:

A binary relationship set is a relationship set where two entity sets participate in a relationship set.

Example: Student is enrolled in a Course

- Hamro CSIT

3. Ternary Relationship Set:

A ternary relationship set is a relationship set where three entity sets participate in a relationship set.

Example:

Ternary Relationship Set

4. N-ary Relationship set:

An N-ary relationship set is a relationship set where ‘n’ entity sets to participate in a relationship set.

If you found any type of error on the answer then please mention on the comment or report an answer or submit your new answer.
Leave your Answer:

Click here to submit your answer.

Discussion
0 Comments
  Loading . . .