No primary key for table benefits
Posted on 2013-06-22
Hey guys, I've for 3 tables.
1) code definition - primary key = code ID
2) activity - primary key = activity ID
3) code storage - no primary key
Each activity has 1 or more codes and these codes are stored in the code storage field. As such, code storage has two foreign keys for activity is and code id. From my knowledge of primary keys and indexing, I don't need a primary key for code storage as no records need to be unique and also Access forces an index on this artificially created code storage ID field.
Questions for your expert opinion!! = ))
1) can I go without a primary key here?
2) I think no primary key and indexing on activity id is actually the best cause I'll be querying the table a lot on activity id - it's a trade off the reading and writing but I guess I can do some real world testing moving forward.