When normalizing a table that can have a many to many relationship with another table, what steps should you take?

Looking for a detailed answer if possible

Showing Answers 1 - 3 of 3 Answers

aw_zahid

  • Nov 18th, 2008
 

A many-to-many relationship is usually resolved by making a tertiary (third intermediate) table where PKs of both the related tables are recoreded as FKs.

Example: A student can take many classes and a class can have more than one student. This shows a many to many relationship.

To address this issue we have to create a third table in addition to the STUDENT and CLASS tables. This table will store the student id and class id.


tblSTUDENT                           tblCLASS                tblStudentClass
stdID                                       clsID                        stdID
stdName                                  clsName                  clsID

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions