Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary Keys: surrogate or composite??
Message
 
To
21/03/2000 17:28:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00348623
Message ID:
00348671
Views:
21
>Hi all,
>
>I'm having a discussion with my boss and a fellow co-worker who is a dba about the usage of surrogate keys for primary keys in tables (he calls them "artificial keys").
>
>My colleagues on the other hand are saying that it's a mistake to use "artificial" keys because they aren't self documenting in the code. They

I had a similar argument with someone else about all of this. They used the same argument about it being more self-documenting (ie. showing the implied relationships between fields and their uniqueness). I just don't buy it. I'm maintaining a system right now that uses composite keys and it's a nightmare. Fields that are supposed to be unique aren't always, which means sometimes the routines based on those tables return odd results.

I'd stick with surrogate keys and just create indexes on the would-be composite keys if you want to show some sort of relationship between fields. I think it's just a much safer way to go.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform