Good day.
The structure of the database is such that it is necessary to insert the data in four tables. About 20 lines in total, double-catch LAST_INSERT_ID()
. The operation is infrequent. There are two options: either implement a transaction, or write data to temporary tables and call the stored procedure. The last option seems easier to me, less code in the application itself. But confuses that it will be implemented for small amounts of data. Please share your personal experience. Is the use of temporary tables for routine data insertion a normal practice, or is it more like a knee-stick approach to plugging holes in the design.