Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Relationship between tables
Message
 
À
24/10/1999 23:00:19
Ru-Chuan Lu
Retail Workshop
Shanghai, Chine
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00280803
Message ID:
00280858
Vues:
10
>Hello all,
>
>A newbie question:
>
>Which one is better, set the relationships between tables in Database
>Designer stage or in the Data Environment with one form? and why?
>
>Thanks for any attention.
Ru-Chan,

The two issues you ask about are different.

Relationships in the database:

These are called prersistent relationships because they outlive the session. Theya re there to allow referential integrity to be programmed without hard coding the relationships invloved. The RI code can read the relationships from the database and then use them.

Relationships created at runtime using SET RELATION:

These are temporal relationships as they disappear once the tables are closed. Persistent relationships don't help you here because they are not set automatically at runtime. Even if you have a persistent relationship, you would still need to set it at runtime again.

So, what is the answer to your question? Yes! They are both better than teh other for the purpose for which they are designed. Persistent relationships are constant over time and can allow you to wirte generic code that reads them from the database and uses them. Temporal relationships are valuable as they are needed at runtime but are not part of the relational definition of the data.

You can use both, one, or none and still get your app to work.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform