I am wondering what approach would be good to migrate your huge old data to new system database (Where table names and columns different from old system – need mapping tables and columns)?
1) Whether should it be database to database (means write scripts to extract data from old database and carefully map them and put it new one)? Above that write unit test to check the integerity.
(OR)
2) Should I use new system Model (using Java Persistence API) programme to extract data from old database then put it in objects (Hibernate or JPA Entity objects) and persist them?
Go with the first one. This is what ETL tools were born for.
I would not recommend writing a Java program. It’d be a great deal of effort to develop and test for a one-time use. Use the right tool for the job.