Agneta Westman (Pipefitter)
List of Contributed Questions (Sorted by Newest to Oldest)
List of Contributed Answer(s) (Sorted by Newest to Oldest)
In the context of a Database Management System (DBMS) and specifically the Entity-Relationship (ER) model, the degree of a relationship defines the number of entity types that participate in that relationship. It tells us how many different kinds of entities are connected through a single relationship. This is a fundamental concept for data modeling, as it helps define the structure and constraints of the database. There are three main types of relationship degrees, each describing a different kind of association between entities:1. Unary Relationship (Degree 1): This is a relationship where the association is between instances of the same entity type. It's also called a recursive relationship. For example, in an Employee
entity, a relationship like "Manages" could link one employee (a manager) to another employee (a subordinate) within the same entity set.2. Binary Relationship (Degree 2): This is the most common type of relationship. It involves two different entity types. For example, a Student
entity is enrolled in a Course
entity. The "Enrolls_in" relationship between them is binary.3. Ternary Relationship (Degree 3): This is a relationship that simultaneously involves three different entity types. For example, consider a scenario involving a Doctor
, a Patient
, and a Medicine
. The relationship "Prescribes" might be used to record which doctor prescribed which medicine to which patient. This is a single relationship connecting three entities.Higher-degree relationships (n-ary) are possible but are much less common than binary relationships.
Answered for the Question: "What is degree of relationship in dbms?"