Entity database modeling for history

Asked

Viewed 99 times

0

In the system I am developing there are several parts that will need data history.

As I did so far it was, for when you need a history for a table I created another table with the same fields and another field relating the source table.

So far it’s been working.

Two problems I have with this approach are:

1) The more tables need history, the more tables I have to replicate and also end up needing to take care of the codes;

2) Data growth for these tables is huge;

What are the best approaches to this case?

  • 1

    It depends on the requirements that were not posted. All of them, without forgetting any.

  • As for item two a table partitioning is a solution option.

1 answer

-1

I’ve been through this kind of problem, reaching audit occupy 90% of data in Torage. In this case we use the option to purge by period, you define a way to write the data either in files(txt, csv or json) or on another server, that you export the data and remove from your base freeing space and this has to be set periodically, type 3 in 3 months or when the data volume reaches a control point that you think is correct to remove. With the advent of Big Data, in many cases these histories are sent to a data store or data Lake. I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.