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 CS Theory concepts for SDE interviews with the CS Theory 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
- Mapping from ER Model to Relational Model
- Difference between Bottom-Up Model and Top-Down Model
- Difference between E-R Model and Relational Model in DBMS
- Difference between Relational model and Document Model
- Types of Keys in Relational Model (Candidate, Super, Primary, Alternate and Foreign)
- Introduction of ER Model
- Relational Model in DBMS
- Introduction of Relational Model and Codd Rules in DBMS
- Anomalies in Relational Model
- Layers of OSI Model
- TCP/IP Model
- Generalization, Specialization and Aggregation in ER Model
- Enhanced ER Model
- Snowflake Schema in Data Warehouse Model
- Web Information Retrieval | Vector Space Model
- Mathematics | Hypergeometric Distribution 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 firstname.lastname@example.org. 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.