[DB-SIG] MySQL Multi-Table Insert Strategy

Aaron Bingham abingham at alumni.sfu.ca
Wed Jul 6 20:29:55 CEST 2005

Don Parris <gnumathetes at gmail.com> writes:

> I'm new on the list, and just had a general question about the best
> approach for setting up a multi-table insert.  I know that MySQL
> doesn't support this outright, but would most people recommend using a
> transaction?

This is precisely the kind of thing transactions are for.  By all
means use one.  That way, if something goes wrong with the database or
your program between updating, e.g., the person table and the address
table, the database can't be left in a half-updated state.

If you are not very familiar with databases and will be doing more
work with them, I would recommend you find yourself a good
product-independant book on the topic.  I would recommend An
Introduction to Database Systems by Chris Date



More information about the DB-SIG mailing list