Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parents, do you know where your Children are?
Message
 
À
01/03/2000 03:18:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00339639
Message ID:
00339649
Vues:
24
Mike,

Parent and child are relative terms that refer to two tables involved in a relationship. The term parent is the table from which the relationship originates and the child is the target of the relationship. These terms are often misused through the assumption that they are permanently assigned to a specific table at some point.

Example;
USE Invoice
USE LineItems IN 0 ORDER InvNo
SET RELATION TO InvNo INTO LineItems
* Above, Invoice - parent    LineItems - child

CLOSE ALL
USE LineItems
USE Invoice IN 0 ORDER InvNo
SET RELATION TO InvNo INTO Invoice
* This one is LineItems - Parent    Invoice - Child
Another way to see it is that the Parent is the controlling table and the child is the controlled table.

The role of parent/child in a relationship may vary depending on the current situation. For example, we may define a persistent relationship between Customer and Invoice, Invoice and LineItems, and LineItems and Inventory. However we need a report that shows Inventory items and lists the custoemrs that bought them. Our environment would be;
Inventory (Parent)
  LineItems (Child to Inventory  Parent to Invoice)
    Invoice (Child to LineItems   Parent to Customer)
      Customer (Child to Invoice)
This is exactly the opposite to the persistent relationships.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform