normalization question

peterbowles

Registered User.
Local time
Today, 23:05
Joined
Oct 11, 2002
Messages
163
I am trying to explain why after normalizing data you often get a table that has two primary keys

Can any help

thanks
 
After normalising tables, I've never seen any with more than one primary key.

Can you give an example of what you mean?
 
If you open the report in the DB you can see the tables and the relationships

In the tbl Link Student Number and Module Number are both Primary keys
 

Attachments

Can you post a '97 version?
 
Well, the table Link actually has no primary keys. It has two foreign keys. That's because it is used to manage a many to many relationship. This type of table is usually called a junction table.
 
That is a junction table for defining a many-to-many relationship because one student can have lots of modules, and one module can be done by lots of students.

You can fix it to have the two fields in question to be a primary key to stop a student being stored twice with the same module as the student and the module will act as the unique index.
 
I see Thanks

I read up on it in a few books but nothing gave me a clear answer just an essay

Thanks again
 

Users who are viewing this thread

Back
Top Bottom