XelaIrodavlas
Registered User.
- Local time
- Today, 18:21
- Joined
- Oct 26, 2012
- Messages
- 175
Hi all,
Wasn't sure if this question should come under the Tables section so sorry if i'm in the wrong place.
I'm just trying to figure out why Access allows me to apply multiple Primary Keys to a table, surely every table should have just one?
The situation comes about in many to many joins, If I have a table linking Events to Attendees the join table will look something like:
EventID (PrimaryKey)
PersonID (PrimaryKey)
OtherStuff
I was once told that both the EventID and PersonID should both be the primary keys, but now I am not so sure... Surely it would be better practice to add another field (AutoNumber) and use this as the single primary key, that way it will be easier to link into any other table if required later.
ID (Primary Key)
EventID
PersonID
OtherStuff
Does it actually make a difference?
Any thoughts appreciated,
Thanks all,
Wasn't sure if this question should come under the Tables section so sorry if i'm in the wrong place.
I'm just trying to figure out why Access allows me to apply multiple Primary Keys to a table, surely every table should have just one?
The situation comes about in many to many joins, If I have a table linking Events to Attendees the join table will look something like:
EventID (PrimaryKey)
PersonID (PrimaryKey)
OtherStuff
I was once told that both the EventID and PersonID should both be the primary keys, but now I am not so sure... Surely it would be better practice to add another field (AutoNumber) and use this as the single primary key, that way it will be easier to link into any other table if required later.
ID (Primary Key)
EventID
PersonID
OtherStuff
Does it actually make a difference?
Any thoughts appreciated,
Thanks all,