intervention specially the stored procedures, no tool
can completely transform without complexity and
performance compromise. Care must be taken here
to eliminate complex stored procedure, and instead
convert the stored procedure to a method in the
calling application. For example: let say a stored
procedure “ComputePayroll()” is invoked, the
procedure selects the employees and compute
payroll for each employee. Such type of stored
procedure can be offloaded from the database
system and should be handled at application level. In
general, legacy system may have stored procedure
like this one, but during migration this needs to be
converted into an object oriented framework at
application level for reusability.
Payroll.Initialize();
For(int i=0; i<SIZE;i++){
Employee eobj = Payroll[i];
eobj->process();
}
With this approach next time if another migration is
required, there is no changes required at the
processing level. The only change required at all is
at the database layer.
Data Transformation
This step helps in improving the performance during
migration. For example the SQL insertion is time
consuming process as it creates logs on insertion for
each transaction. In addition it requires DBMS for
carrying out the insertion. The import in local
database format is faster than DBMS insertions. The
source data must be converted to the target database
format for the target loader to understand. Let us
assume that we need to migrate a table Trade as in
source database to target. A script can be developed,
which can query the source database and insert it
into target database using SQL insertion command.
But this would take a lot of time if we are trying to
insert 50 millions of trade records. However, by
converting to the local formats like given below, and
loading it through load command we are able to
achieve tremendous performance.
Loader Format
0,20091120,"2009-11-20-11.06.21.000000","2009-11-20-
11.06.21.000000","XYZ",200000,0,0,100.50,300,0,"0",00
00030150.00
3.2 Application Transformation Layer
Application transformation layer is the crucial part
of the database migration. The application
transformation portion deals with how the new data
layout needs to be handled. It also deals with
connectivity for connecting to database and
retrieving the data. For example: DB2 has its own
driver programming API, Oracle, MySQL etc have
their own and so on.
4 MIGRATION STRATEGY
Database migration requires a suitable strategy.
Migration modelling helps easier migration and
improves the reusability. Migration may not be a
onetime activity. The business environment is very
dynamic, technologies changes are inevitable, and
the endless demand would make any application
system to migrate from one system to another with
respect to the change in business environment.
Scalable, reusable strategies are needed for today,
tomorrow and future. We define our strategy is this
paper is as follows.
1. Assessments
2. Build a target development environment
3. Model the target database
4. Model the target application
5. Transform legacy application/database
6. Build the application
7. Testing
8. Benchmark
9. Back out plan
10. Implementation
11. Monitoring and Control
5 CASE STUDY
In our case study we have conducted a migration
using tool vs. using our strategy and have done the
assessment on tool.
5.1 Results
Figure 3.0 shows the comparison of times using
inbuilt MySQL migration toolkit vs. using user
loader program.
EFFECTIVE DATABASE MIGRATION STRATEGY - THE NEED FOR ADDRESSING DATABASE MIGRATION
CHALLENGES OF TODAY, TOMORROW AND BEYOND
337