sql - Complete db schema transformation - how to test rewritten queries? -


our database poorly designed way around (we inherited it). i've reworked schema useable , maintainable. quite few tables , columns have been dropped, many columns have moved , tables , columns have been renamed. datatypes have been changed also.

i've extracted queries our webapps , we've started rewriting them. our dba able migrate old data new schema, think. sure need test each query comparing old results new.

how can test such wholesale migration? need able specify parameters, , map old tables/columns new tables/columns. hundreds of queries daunting task. write myself have lot of demands on time using existing tool preferable.

thanks!

i've had ... , easy because rewrote entire application ;)

many queries sounds basic operations such select,insert,updates have not been abstracted in functions - maybe can clean mess before adapting.

now testing:

you need test script a) run queries b) store output of selects comparison

  1. backup test db @ state 0, clear general query log

  2. play around application using deletes, selects , updates,

  3. copy paste log, take every single select , precede "create table temptable_xyz" (or of course select temptable_xyz .. depends on available syntax)

  4. run on both databases, test db @ state 0 , test db @ state 0 after migration script

  5. compare

this should if can make sure used every feature in every app.

gl - nothing making existing stuff better ;)


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -