"Foley, John" wrote:
> > I have a fairly complicated application that, for security reasons,
> > has seven one-to-one tables. The client is Access 97.
> > MySQL is Distrib 3.22.16a-gamma, for pc-solaris2.7 on i386.
> > My question is, how do I go about spreading an insert over the
> > multiple tables so as to ensure a relational hit? (The same security
> > scheme
> > has some users able to insert, and others update, but if a table insert
> > has
> > yet to happen then an update user has nothing to update!)
> > All of the seven tables are being re-combined in queries and
> > presented to the user as tabs on a tabbed dialog of a single form.
> > My first thought is to break "Add New Record" functionality out of
> > the standard Access record selectors, instead having a pass-through query
> > that does an insert on the master table (called "Programs"), calls
> > last_insert_id(), then populates all of the other tables with the
> > apropriate key
> > from Programs (called "ProgID", an int(11)).
> > Is there a simple alternative I'm missing? (like cascade updates?)
> > John T. Foley
No, this is the only way to go.
Remember to use LOCK on the tables in question if invalid reads are a problem.