Loading ...
Sorry, an error occurred while loading the content.
 

Re: [XP] Re: Database Testing & Simple Code

Expand Messages
  • Ron Jeffries
    Hello Anthony, Thanks for your email. On Tuesday, August 1, 2006, at 6:50:11 AM, ... Ambler and Sadalage, /Refactoring Databases/ offers a number of ideas for
    Message 1 of 3 , Aug 1, 2006
      Hello Anthony,

      Thanks for your email. On Tuesday, August 1, 2006, at 6:50:11 AM,
      you wrote:

      > "Simon Jones" <simon@...> writes:

      >> Writing automated scripts to move current data to newer production
      >> data. It can be done, but once datasets grow large the amount of
      >> development effort required to updated tests and 'morph' data can
      >> quickly become onerous.

      > I did this once with a very large Oracle database. What we did was to snapshot
      > the database (which took all weekend, but the weekend was downtime anyway),
      > and add triggers that kept track of all changes made to the live data. We
      > could then migrate the snapshot at our leisure, and ensure that the data was
      > updated with the changes. Once the full data had been transferred to the new
      > schema, we swapped the app backend to the version that used the new schema,
      > and swapped the databases. This was not something that we would want to do
      > very often, due to how long it took (about 2 weeks to do the full data
      > migration), but it's certainly doable. If you can't manage the downtime for a
      > snapshot, you can also just copy the data whilst the database is live, using
      > the triggers to ensure that already-copied data is updated.

      > What I've also done is create views that look like the old tables, with
      > insert/update/delete triggers, so the database schema can change underneath,
      > but the app still sees the old schema until the new version of the app can be
      > released.

      Ambler and Sadalage, /Refactoring Databases/ offers a number of
      ideas for morphing the database as we go. It seems to me to have
      some good ideas in it. For my review, see

      http://www.xprogramming.com/xpmag/bookRefactoringDatabases.htm

      Ron Jeffries
      www.XProgramming.com
      I have tried in my way to be free. -- Leonard Cohen
    Your message has been successfully submitted and would be delivered to recipients shortly.