Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: An improved technique for database primary keys

by herveus (Prior)
on Nov 08, 2010 at 16:01 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://870135]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-19 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found