Database archiving with full database

2020-06-11T19:54:53

Am having relational database MySQL. The requirement is to archive the records of few tables and their related records to be completely removed from the active database and archive it to access later if required. The web application is built on Rails BTW.

Is there a way, where any insertion or update on the original database is reflected to the archived database and deletions on original database are not updated to the archived database.

That way archived database has complete data both active and archived. And the original database has only live-accessible data.

Or is there any different and efficient solution. Why because, if we were to do brute force approach, by whenever the data moved to the archived database, all the records and their dependent records need to be identified and moved to the archived database and then remove the respective records in the original database.

With the Rails framework deleting the related and dependent records is relatively easy when dependent: :destroy is configured correctly.

Copyright License:
Author:「kishore」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/62323810/database-archiving-with-full-database

About “Database archiving with full database” questions

Am having relational database MySQL. The requirement is to archive the records of few tables and their related records to be completely removed from the active database and archive it to access lat...
I'm using Azure SQL database as my source database.Which include 10 tables. I need to do archiving and purging in the table in a period gap of one year.Currently I am using Azure data factory to move
I have a MySQL 5.5 transactional database called vitalstatistix I wish to archive monthly. The database is made up of one huge table called asterisk_event and smaller lookup tables. The asterisk_e...
At what scale of database growth does archiving become a necessity, and are there guidelines to show when it is required? I manage an intranet which provides short news articles via about 40 targe...
My architectural performance problem is a legacy problem: multi-user access on a SQLite database in shared network folder. (Yes, I know, but I cannot change this!) I'd like to archive records of so...
My application demands archiving database tables between sybase and db2 and vice-a-versa and within(db2 to db2 and sybase to sybase) using java. I am trying to understand the best strategies aroun...
If I set up Wal Archiving on a three years old Postgres database (used in production); do the Continuous Archiving and Point-in-Time Recovery (PITR) will work from the beginning? Will I have all th...
If I enable Continuous Archiving from day one, are the resulting logs a practical method of keeping a complete point-in-time history of all database operations? I guess transaction volume will be a
My boss wants me to set up an archiving mechanism such that a table does not grow too big and suffer performance issues. We saw a table grow to 11 million row and about 1 gig in size which IMO is not
I am on SQL Server 2008 R2 and I am currently developing a database structure which contains seasonal values for some products. By seasonal I mean that those values won't be useful after a particu...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.