Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SEEK(),INDEXSEEK() or KeyMatch() or SELECT-SQL?
Message
De
08/04/2005 16:09:15
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01002645
Message ID:
01002836
Vues:
36
This message has been marked as a message which has helped to the initial question of the thread.
>BTW, I do not know how to handle CASCADE updates/deletes if the FK is Null. What do you think?

Depends. I can see a scenario where you have an optional link to another table - say, a link to addresses, and for some records you have no address at all, so the fk into addresses would be null. In such a case, do nothing. Now if a record is edited so that it had a fk and now that FK is going null (just discovered that the address doesn't exist so you clean up), it's a matter of your policy whether you want the address record to still exist (maybe you have someone else at the same address) or you want to kill it right away (because your table has 1:1 relation with addresses).

Master-detail relationship would be a different matter - no child record should ever be written without a proper key to its parent record.

Don't know whether I said anything useful here - I'm doing RI through business objects for quite a while, or have a DBA who writes the stuff at the SQL server level, so I'm not much of a help when it comes to RI within a dbc.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform