Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Relation / 1 to many / 1 to 1
Message
 
À
11/06/1999 11:31:54
Coann Teng
Computer Infobase System S/B
Kuala Lumpur, Malaisie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00228817
Message ID:
00228842
Vues:
10
>Can anyone teach me how to decide it is 1 to many relation or 1 to 1 relation? how to decide which is parent table and which is child table? izzit only 2 type of relation ship in FoxPro?

1-1 vs 1-many:

The real world decides this for you. A 1 to 1 relationship is when there can NEVER be more than one record relating the two tables. Example: Table of patients only has a 1-1 relationship with the deathinfo table. It is important to note though in a 1-many relationship, the parent table may relate to no records in the child table, 1 record or more than 1 record.

Which is child:

This can change. For instance I have a PATIENT table that is the parent table to a DOCTORS table in one query and in another query the DOCTORS table is the parent and the PATIENT is the child. It depends how you are viewing and logically thinking of the data at the moment.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform