WebDB and Many:Many realtionships

From: John Smith <jsmith_at_unix.sprint.net>
Date: 5 Aug 1999 19:25:02 GMT
Message-ID: <8E19929FDjsmithunixsprintnet_at_news.earthlink.net>



I have two main tables in a change management system: machines, and requests. The machines table holds machine names, and other data. The requests table holds details on requests to make changes on those machines. Now, each machine can have many changes performed on it, and each change can be performed on many machines, so I have a third table to relate them, named changes. The changes table consists of machine and request ID numbers (which are used as primary keys in their respective tables) with both columns used together as a primary key. No one will be changing much in the machines table, but requests will be added all the time. So far, so good. The problem is, I can't figure out how to have an end user specify (on the WebDB form I'm using to enter the new request, which is based on the requests table) multiple machines for the request to apply to (can be anywhere from 1 to more than 100 machines), and have rows added to the changes table. I imagine I would use an ON INSERT trigger on the request table to add to the changes table, but how will the trigger know WHAT to insert, since the number and ID's of the machines will vary every time? I hope that description of the problem is clear enough...anyone have any ideas? Thanks in advance...

John Smith Received on Thu Aug 05 1999 - 21:25:02 CEST

Original text of this message