[thelist] Relational DB

Ben Phillips ben at inchima.com
Mon Feb 4 08:29:00 CST 2002


>>> I have a 4 tables with simple relationships among them (table 1
>>> has 1 field from table 2, one field from table 3 and table 3 has
>>> one field from table 4).  The problem I am having is finding out
>>> how to write to all tables at once.
>
> you cannot do it in one sql statement
>
> the next best thing is to do it in one database call, where 4 sql
> statements are passed over at the same time
>
> worst case is 4 separate database calls

further, you might want to look at locking the tables before you update them
and then releasing them after the update. if the data is critical
information, then any errors occuring during updating can be fixed, and the
data is consistent before, during and after the update.

benji.
inchima.com




More information about the thelist mailing list