Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: An improved technique for database primary keys

by herveus (Parson)
on Nov 08, 2010 at 16:01 UTC ( #870135=note: print w/ replies, xml ) Need Help??


in reply to Re^2: An improved technique for database primary keys
in thread An alternate technique for database primary keys

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


Comment on Re^3: An improved technique for database primary keys

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://870135]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (17)
As of 2015-08-03 13:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (37 votes), past polls