Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cascading Updates for non-key fields
Message
From
26/05/1999 10:04:40
 
 
To
26/05/1999 06:03:36
John White
Micro-Oriented Software Techniques, Inc.
Phoenix, Arizona, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00222726
Message ID:
00222916
Views:
24
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform