Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programming Standards
Message
From
18/11/1999 14:37:28
 
 
To
18/11/1999 14:05:59
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00291621
Message ID:
00292648
Views:
28
>>
>>Yes, I've followed those discussions.
>
>Hmmm. We finnaly got the feeling noone was listening. I'm glad at least someone did.

I'll speak up next time.

>
>>I have intelligent keys in my table...they are candidate keys. I agree, debugging using intelligent keys makes things a bit easier. I've done development both ways and found that the advantages of surrogate keys outweighs their drawbacks.
>
>What advantages do you experience ?

1. I don't have to worry about changes to the key and updating other tables.
2. Easier of the user to enter data. They are not responsible for generating unique IDs.


>
>>There may be a couple of occassions that would require fewer joins, but not very many. Again, IMO, the benefits of a surrogate PK outweigh its disadvantages.
>
>Within a major project of mine, that would very many.

Hmmm...since I don't know what you're doing, I can't say. My experience says it is a rare care.

>
>>>Using generated PK does remind me of the hierachical databases with pointers to child records. I'd really don't want to go that way.
>>
>>Even with intelligent keys and normalization, you still need child tables. Using surrogate keys does not limit me in any way.
>
>I was refering to the fact that a hierarchical database was/is using meaningless pointers to connect parent and child tables. This generated PK thing does remind me of this.

Yup, it is meaningless. That doesn't necessarily make it harder to handle.


>
>>>In many cases I might use a generated key, but not in all. For Example if I got a article table, i would choose articlno (character) as the PK.
>
>>I would have an article id too, but it would not be the PK. It sounds like something that is user entered and/or generated based on the data.
>
>Well, I guess we have different standpoints on this. Because you've followed my discussion with JimB it seems pointless to start over again.

There are valid points to do the PK either way. There are also downsides to doing it either way. I've used intelligent PKs in the past. Right now, I'm more confortable with surrogate keys. If you want to use intelligent keys, I don't have a problem with it.



>
>Walter,
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform