Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referential integrity and null values
Message
De
24/02/2005 10:55:58
 
 
À
24/02/2005 10:46:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00990085
Message ID:
00990125
Vues:
26
>>David
>>
>>Just throwing in the following, not sure if germane or not:
>>
>>Would using NVL() in the "default value" of the key be of use?
>>
>>Terry
>
>Terry,
>
>If I understand you correctly, your suggestion is that the field in the parent and in the child table would be automatically filled with a chosen value when someone asks to fill it with NULL.
>This could be a cosmetic improvment on the workaround I mentioned. Or did you mean anything else ?
>
>David

David

Yes, kinda meant that. I don't know if your key is numeric or char, but I wondered if, instead of null you got 0 or SPACE(x) in the key. Don't know about someone "... asks to fill it with NULL" but rather the case where RI insists there is a parent before inserting the child (as in your ex. of a boss without a boss FK). Maybe it might mean needing a dummy parent (e.g. Boss record with key of o or SPACE(x) respectively), so that RI insert restrict will be appeased.

I haven't thought it all through - that's your job :-), but just threw in the suggestion. HTH

Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform