The Wayback Machine - https://web.archive.org/web/20240812215604/https://www.geeksforgeeks.org/relationships-in-er-model/
Open In App

Relationships in ER model

Last Updated : 12 Jun, 2020
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Entity Relationship model (ER model) contains entities and relationships. ER model enables us to know how these entities are associated with each other. Entities interact with other entities through associations or relationships. Let us assume that Geeks is the name of a student, Placement 100 is the name of a course.

For example, student Geeks enrolls in Placement 100 course.
Here, enrolls is the name of the relationship.

This is only one instance of the relationship. There can be several instances and several other people joining several courses. The relationship enrolls has the student and course as the participating entity sets.

Mathematically, we represent the above as, enrolls is a subset of the cross product of student and course. It has information about which student has enrolled into which course. If (s, c) belongs to enrolls, it would mean that the student s has enrolled in course c. Tuples in enrolls table are known as relationship instances whereas, enrolls is called a relationship type or set. Relationship type contains the collection of associations of the same kind.

Degree of a relationship :
This is used to demonstrate the number of entities which are a part of the given relationship. Degree 2 is called binary relationship and it means that 2 entities are participating in the relationship. It is the most commonly used relationship. Degree 3 is called ternary relationship. Degree n is called n-ary relationship. The tuples should have components which are equivalent to the degree of the relationship.

Diagrammatic Notation for Relationships :
Relationship is represented by a diamond shaped box. Rectangle represents participating entities.

Rectangle of the entity is connected to the diamond of the relationship by a line. The names of entities and relationships is written in their specified shapes. The lines specify connections between the entities and their relationships.

Note –
Entities have several other attributes which are not mentioned in the picture.



Similar Reads

Attributes to Relationships in ER Model
In ER model, entities have attributes which can be of various types like single-valued, multi-valued, composite, simple, stored, derived and complex. But relationships can also have attributes associated to them. Generally it is not recommended to give attributes to the relationships if not required because while converting the ER model into Relati
2 min read
Structural Constraints of Relationships in ER Model
Prerequisite - ER Model To understand Structural Constraints, we must take a look at Cardinality Ratios and Participation Constraints. Cardinality Ratios of relationships : The entities are denoted by rectangle and relationships by diamond. There are numbers (represented by M and N) written above the lines which connect relationships and entities.
3 min read
Data Objects, Attributes and Relationships in DBMS
Data Model is an abstract model that represents the data objects, data flow between these data objects, and the interrelationship between these data objects. It is a way of storing data on a computer so that it can be used in a more efficient manner for further purposes. Data model or data structure consists of following fundamental elements: 1. Da
3 min read
Difference between identifying and non-identifying relationships
In this article, we will discuss the overview of an entity and identifying and non-identifying relationships and finally will focus on differences between both of them. Let's discuss it one by one. Overview : Entity types that do not have their own key attributes are known as the weak entity type. Unlike this, there are regular entity types that ha
7 min read
Recursive Relationships in ER diagrams
Prerequisite - ER Model A relationship between two entities of a similar entity type is called a recursive relationship. Here the same entity type participates more than once in a relationship type with a different role for each instance. In other words, a relationship has always been between occurrences in two different entities. However, the same
3 min read
Can Two Relationships be Related in an ER diagram?
Answer: Yes, two relationships in an ER diagram can be related through shared entities, linking tables, or generalization hierarchies.In traditional Entity-Relationship (ER) diagrams, relationships between entities are typically represented independently. However, interrelations between relationships can exist indirectly through shared entities, li
1 min read
Difference between Bottom-Up Model and Top-Down Model
Top-Down Design Model: In the top-down model, an overview of the system is formulated without going into detail for any part of it. Each part of it then refined into more details, defining it in yet more details until the entire specification is detailed enough to validate the model. if we glance at a haul as a full, it's going to appear not possib
3 min read
Difference between Relational model and Document Model
1. Relational Model: Relational model is a model for the management of the database. It is called so because the data is stored in the form of relations i.e., in the form of tables. Every row consists of related data. These row in the table depict a real-world entity. To work with python and the Relational data model we need a prerequisite knowledg
2 min read
Similarities between TCP/IP model and OSI model
Pre-Requisite: Layers of OSI Model, TCP/IP Model OSI Model or Open Systems Interconnection is an architecture of 7 layers in which each layer has its work to perform whereas TCP/IP is a concise version of the OSI Model. TCP/IP Model consists of 4 layers rather than the 7 layers of the OSI Model. There are so many similarities between the TCP/IP mod
5 min read
ACID Model vs BASE Model For Database
The difference between ACID and BASE database models is the way they deal with this limitation. The ACID model provides a consistent system.The BASE model provides high availability.To provide further insight, we will discuss each of the models separately in detail. ACID Model:Collections of operations that form a single logical unit of work are ca
5 min read
Article Tags :
three90RightbarBannerImg