Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referential integrity: restrict, cascade, ignore and CHA
Message
De
16/11/1999 13:28:57
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00291533
Message ID:
00291543
Vues:
30
Evan,

>> COVERAGE
=======
id
fkStaffOff
fkStaffOn

>>The domain expert has told me that if the employee who is being covered is deleted, then just delete the coverage data. If the employee that is covering
the shift is deleted then mark the shift as being available. To me this means mark fkStaffOn as NULL, which does not fit into the standard restrict,
cascade ignore concepts of RI.

>> My questions (for those that are still reading).
>> 1) Is this an indication that my design is flawed

Maybe. If you had a COVERAGE_OFF table and a COVERAGE_ON table, you wouldn't have this problem (but you might have other problems :-> ) Deletion of either staff would simply delete any of their entries in the OFF and ON tables.

>> 2) Does this mean I don't understand RI or am misusing RI?

With the combined COVERAGE table, the OFF staff fits RI, but the ON staff fits a business rule that does not translate well into RI (at least as it relates to DELETE action). I think you understand it well enough to know that the 3 choices won't work here. Well, actually, the ON staff does fit the ignore option for RI, as long as you handle setting null some other way.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform