This question has been answered on SO several times: here , here, and external links here and here .
I understand the approaches described above, and I plan to use this approach.
But I have a few fundamental doubts about its implementation.
In my case, several columns in a row can be updated at the same time, so you should follow the correct implementation method:
- Find out the type of operation (INSERT / UPDATE / DELETE)
- Find out which columns are being updated.
- Read the full line before upgrading
- Insert one row in the audit table for each column modified by the old and new value (along with other information).
- refresh table
database mysql database-design
understack
source share