I am currently designing a Database for a Project of mine. The target is to connect different kind of “Objects” like Web-links, text, pictures and files with each other.
Using the following tables my first attempt ended as described below:
TABLE text
TABLE picture
TABLE file
so my first attempt was to connect each Table to the Table “Project” by using n:m relations. after that I had to create a Table which safes the connections between those objects, so I created a “relation” Table. But then the Problem appeared, that I am not able to connect each table (text,picture and file) to each other very efficiently.
Does anyone of you guys now how to do such a thing in a good way?
Thanks for your help in advance!
CyrillC
N:M relationcan be resolved using the following technique. Lets suppose there is an entityStudent, you create a table namedStudent, an entityTeacherso a tableTeacheris created. Lets supposeone teachercan teachmanystudentsandone studentcan be taught bymany teachers. So, to resolve this so can introduceweak entity, lets suppose you create a table namedTeacherStudent. The columns ofTeacherStudentcould bepkTeacherStudentId,fkTeacherId,fkStudentId.The same approach could be applied in your case to resolve
N:Mrelation.Hope this help.