Pregunta

There are two strategies when dealing with data records which contain multiple versions. One is to have current records in one table, and their past versions in a history table.

The other is to have all versions in the same table with a flag on the current version.

I've seen arguments for each, and I've seen community agree with both strategies in different posts.

If there is no right answer, how does one decide which strategy to take? I can see the advantage of keeping all the records in the same table for query simplicity (all the records in one table) and less tables in general.

The flip side is you have these huge tables with a ton of records depending on how many versions and complicated relationships between tables.

Pro History Table Database Design for Revisions? Database history changes, same or different table?

Pro Current Record flag https://softwareengineering.stackexchange.com/questions/94489/handling-deleted-users-separate-or-same-table

Other Articles https://softwareengineering.stackexchange.com/questions/94489/handling-deleted-users-separate-or-same-table

No hay solución correcta

Licenciado bajo: CC-BY-SA con atribución
No afiliado a dba.stackexchange
scroll top