5. Compare the computed values.
Table 9 1 provides computations for selected database types. The argument for
the DB2
SUM()
function is converted to
DECIMAL
type, because in most cases the
SUM()
function returns the same data type as its argument, which can cause
arithmetic overflow. For example, when calculating the sum on an
INTEGER
column, if the result exceeds the
INTEGER
data type range, error
SQL0802N
is
generated:
Arithmetic overflow or other arithmetic exception occurred
.
Converting the argument to
DECIMAL
eliminates the error.
Table 9 1 Aggregations for data migration verification
Data type
MySQL operation
DB2 operation
numeric(
sum(val)
sum(cast(val as
sion>,)
decimal(31,)))
date
sum(trunc( val to_date(
sum(cast(days(val) as
0001/01/02 , yyyy/mm/dd )))
decimal(31,1)))
variable length
sum(length(val))
sum(cast(length(val) as
character
decimal(31,0)))
fixed length
sum(length(rtrim(val)))
sum(cast(length(rtrim(val))
character
as decimal(31,0)))
9.3 Code and application testing
The most important part of the testing process is to verify that each component of
the system functions as it was before migrating. All components of the RDBMS
system should be verified whether they are working properly.
9.3.1 Application code check
The scope of application testing depends on the migrated application.
For self built applications the testing process should be started with the
application queries. All queries should be independently tested to ensure that
they return the expected results. With the application queries successfully
migrated, the surrounding client programs should be rebuilt, and then the
application should be tested against the target database. Each module of the
application and possibly each screen form should be run and be checked for
errors or improper functionality. All supported interfaces should also be checked.
The very important issue is to document all the tests conditions such as what
operations were performed, which application screens were opened, what input
data was used for testing, and what the result was. For larger projects, the
Chapter 9. Testing and tuning
275
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved