P is for Practical | |
PerlMonks |
Re^3: An improved technique for database primary keysby herveus (Prior) |
on Nov 08, 2010 at 16:01 UTC ( [id://870135]=note: print w/replies, xml ) | Need Help?? |
Howdy!
It's a tradeoff. If you use surrogate keys, you always have to join to get the actual key values. Multicolumn PKs are natural. Surrogate keys obfuscate the true structure. Foreign key constraints are essential to document the key structures and to enforce referential integrity. They also help query building tools get the joins right.
yours, Michael
In Section
Meditations
|
|