history rows management in database

后端 未结 10 1841
灰色年华
灰色年华 2021-02-03 11:48

As in many databases, i am designing a database that should keep record of previous versions of the rows changed in each table.

The standard solution to this problem is

10条回答
  •  悲&欢浪女
    2021-02-03 12:37

    How will you define primary keys? There will be many rows with the same primary key due to keaping the history rows in the same table.

    Also you don't seem to have a way to know the order of your history rows when a single "real" row gets changed more the once.

    (One project I worked on, we generated all the history tables and triggers using codesmith, this worked very well.)

提交回复
热议问题