Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Color of disable - gray
Message
From
06/01/2001 04:23:53
Walter Meester
HoogkarspelNetherlands
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00455216
Message ID:
00460183
Views:
24
Martin,

>I just can't advise anyone on something that I don't believe in.

This confirms, my observations, that the choice between intelligent (or natural) and sorrugate keys is more of a religion than one of a science.

It seems that because your 'believe' you have not opened your mind for some very good reasons daniel has given here.

Two very good points:
1. If having a table with many (x) foreign keys, for reporting (when only adressing the value of those meaningfull keys) you'll have to include x joins to accomplish the same report with surrogate keys. This means:
A. Performance could be terrrible as the number of x goes up.
B. The table is far more readable when either debugging it, or presenting it to endusers in any way.

2. When using static (single attribute) natural keys (like in the superbowl example) I see no problems arising here.

I get the impression, you're also in the 'consistency' camp, are doing things mainly for the sake of consistency, not for the sake what might be best in your situation.

Your experience might tell you, you've never encountered problems with using surrogate keys. My experience say's I have enjoyed using natural and intelligent keys for the last few years. Why ? Because, whenever someone asked me to retrieve some information from the database that was not available from within the program, I often could do this with a single table action like:

USE table
BROWSE FOR ...

Or

SELECT * FROM OnlyOneTable WHERE ....

without having to set relations or use joins to see the meaningfull side of surrogate keys. When something went wrong, I found it helpfull to see all kinds of natural keys to determine what went wrong. I could safely say that it rescued my butt more than once. I certainly think this task is a whole lot more difficult if I used surrogates everywhere, esspecially when doing such ad-hoc queries trough a WAN on a vfp table.

I think, we both have two differente relgions, and as always with 'religions' it's hard, if not impossible to convince the other.

We'll have to respect eachothers 'opinion' and as time passes by we will see both are points to have merit.

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform