Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with a code
Message
 
À
07/05/2007 11:16:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01223049
Message ID:
01225235
Vues:
18
Edgar,

I see that you got an answer to the current question. I have a question for you though;
IDN   Name    Parent   Gender
1     Silver    3      Horse
2     Golden    3      Mare
3     Silverado 0      Horse
How will you handle when Silver and Golden have another child? Or when Golden has a child with some other stallion? I would suggest that you do something like this;
Horses
IDN   Name      Gender
1     Silver    Horse
2     Golden    Mare
3     Silverado Horse

Heritage
IDN    Mare     Horse   Child
1       2        1       3
This way each child born has a record in Heritage that shows its parentage. Parents may parent multiple children with the same or different partners.
Limitations in the original design are gone. Besides the dealing with parents and children is greatly simplified as it is no longer a table self join to get the data.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform