Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Orphan records
Message
De
02/09/2005 20:05:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01046466
Message ID:
01046478
Vues:
18
This message has been marked as a message which has helped to the initial question of the thread.
>The father table clients are related to child table items in a form.
>When editing a record of the father table,my costumer wants a button
>to delete that record if he wishes so. But I am worried about the child
>records related to them. I am not sure how to treat them in case of
>deleting the father record.

Use referential integrity. Cascading delete is appropriate in some cases: if you delete an invoice, you may want to delete the invoice details automatically. In other cases - in most cases, actually - "restrict" is more appropriate - if you delete a client, you do not want to delete all the client's invoices! You will not even want to delete the client, since the invoices will remained orphaned. In this case, "restrict" will not allow the client to be deleted.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform