Paul wrote:
I thought about that one but the result will be that if I want to have,
let's say, a list of employees and their associated groups, I would have
to make a UNION select on the 2 tables to get the associated
employee_groups.grp_name since employees.emp_group only contains the ID
of the group name. So only to avoid that, I would prefer to keep the
actual pk/fk mapping. Your solution is somehow interesting since
updating employee_groups.grp_name DOES NOT affect the employees table.

What do you think is better? Keep the existing setup and bang my head
against the wall to find out why it won't work or change to the one you
proposed? Taking into consideration the issue I pointed out above (the
UNION stuff).

Tim sez:
Paul, I don't know anything about MySQL, but some general searching
brought up these interesting things you might want to check.  I agree
with you, updating the child table shouldn't affect the PK/FK mappings
at all unless you're trying to change the child table's FK/PK.  Weird.

These two sites suggest you need to check the version level of your
MySQL (for cascade support):
http://www.geocrawler.com/archives/3/8/2002/5/0/8813034/
http://www.riverside.org/archive/html/mysql/2003-02/msg00392.html

The order in which you declare the ON DELETE/ON UPDATE cascades may be
important:
http://www.faqchest.com/prgm/mysql-l/mysql-03/mysql-0302/mysql-030207/my
sql03020615_23303.html

Probably won't help, but maybe it will.

Tim
___________________________ 
Tim Furry
Web Developer 
Foulston Siefkin LLP 




____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
       Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to