Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cascading Updates for non-key fields
Message
De
26/05/1999 10:04:40
 
 
À
26/05/1999 06:03:36
John White
Micro-Oriented Software Techniques, Inc.
Phoenix, Arizona, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00222726
Message ID:
00222916
Vues:
25
>>I would make the name a key and use the RI to cascade the change to the child file.
>>
>>BOb
>
>Unfortunately, I cannot. A primary key must be unique and a Manager may manage multiple departments. And RI doesn't work for "Regular" indexes.
>
>...John

Well, sure, in your Many file the Name would be a regular index, but in your Manager file, the manager name could be a candidate key...

I just tried this.. I set up a Manager table with id as primary and name as candidate. (of course, this doesn't allow two managers with the same name, but, if you did have that, this wouldn't work even if you have keed it.)

Then, I set up a Department file with manager field with a regular index on manager. I related the two files and set RI to cascade key changes to the child file. I entered a few records and it worked great.

BOb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform