Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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?
[finddata]: How do i perform multiple line substitution into single line for same variable using perl

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2017-02-24 06:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (352 votes). Check out past polls.