Many thanks! for your quick response. Here's what I can think off. Please let me know if this is ok.
* Create a archive database which is a exact replica of production database. Therefore, I will create all the 100 tables with FK relationships around.
* On a regular basis (every six months), move the rows (that fulfill the selection criteria)from production to archive database as defined by the data to be archived stage. This should preserve Referential Integrity (RI) intact. Besides, selective data from production gets deleted.
My question is;
* How should the above logic implemented? eg: SQL scripts, SQL Proc or Java program
* If the answer to the above question is SQL Scripts then how do we rollback to make sure there are no orphaned records?
* When the data model changes drastically then how can we restore from the archive files?
Please help.
Thanks.