An Entity merely represents something you want to keep a list of. Two lists can exist that have a relationship with each other - for example Student (a list) enrols in (a relationship) Course (a list). Of course a student can enrol in many courses and a course can have many students enroled in it. Therefore the relationship between Student to Course is "many to many". Many to many relationships between entitities in a relational database management system are resolved by placing a third entity between the entities involved. In ER diagrams this is noted by drawing a box around the relationship diamond - thus promoting the relationship to an "associative entity". The cardinality of the two orignial entities ("many to many") is removed. New cardinality ("one to many") between the outer entities (Student and Course) and the associative entity (Student.Course) with the many towards the associative entity. The data in the associative entity - from the above example - tells us which student is enrolled in which course. (In the following illustration, please ignore underscores. They just space the Words out. "{" and "}" denote many) : Entity_____Associative Entity____Entity : STUDENT -------{STUDENT.COURSE }----COURSE : Fred_________ Fred.Math__________ Math : Sally_________ Fred.Science________Science : Gus__________Gus.Math___________Cooking : _____________Gus.Cooking : _____________Sally.Math : In a real database the values recorded in the STUDENT.COURSE table would not be student names and course titles. They would be the primary key values from the STUDENT and COURSE tables. The benefits of this design are:
1) The student is only recorded once which helps minimise data errors.
2) The course is only recorded once which helps minimise data errors.
3) Students can enrol in many courses and courses can have many students enrolledd.
Copyright © 2026 eLLeNow.com All Rights Reserved.