Can a many-to-many binary relationship have no intersection data?

I'm reading the book 'Fundamentals of Database Management Systems 2nd Edition' and in page 38, there is this question but the answer is not provided, just explain the many-to-many with an associative table!

有帮助吗?

解决方案

short answer: yes, check page 129 for an example ;)

long one: Intersection data are information that not belong to any of two entities of the M2M relationship, but they also don't describe the relationship.

I.e. Teachers and Students

A teacher can have many students, a student many teachers. The hours of lesson of each teacher with each student can be intersection data.

Hours

Teacher Student Hours
A       1       2
A       2       2
B       1       4
B       2       1

But we can also imagine this relationship without hours, for example if we are interested only in which students are in the class of each Teacher.

Classes

Teacher Student 
A       1       
A       2       
B       1       
B       2       

This table continues to describe the relationship, but without intersection data.

Classes is the Associative Entity of the relationship Teacher - Student.

Hope this makes things a bit easier.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top