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.
Entities have several other attributes which are not mentioned in the picture.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Attributes to Relationships in ER Model
- Structural Constraints of Relationships in ER Model
- Recursive Relationships in ER diagrams
- Data Objects, Attributes and Relationships in DBMS
- Difference between Relational model and Document Model
- Difference between E-R Model and Relational Model in DBMS
- Difference between Bottom-Up Model and Top-Down Model
- Mapping from ER Model to Relational Model
- TCP/IP Model
- Layers of OSI Model
- Enhanced ER Model
- Working of ISO-OSI Model
- Introduction of ER Model
- Types of Attributes in ER Model
- Relational Model in DBMS
- Anomalies in Relational Model
- Difference between ER Model and RDBMS
- Devices used in each layer of TCP/IP model
- Building blocks of a Data Model
- Constraints on Relational database model
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.