Database migration in net
Sponsored Links
This presentation is the property of its rightful owner.
1 / 57

Database Migration in .NET PowerPoint PPT Presentation


  • 72 Views
  • Uploaded on
  • Presentation posted in: General

Database Migration in .NET. Continuous Database Evolution. story. 3. Claire Bennet : Database Administrator + Neat freak + Former cheerleader. Hiro Nakamura: Software developer + Haphazard + Addicted to manga. Mohinder Suresh:

Download Presentation

Database Migration in .NET

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Database Migration in .NET

Continuous Database Evolution


story


3


Claire Bennet:

Database Administrator + Neat freak + Former cheerleader


Hiro Nakamura:

Software developer + Haphazard + Addicted to manga


Mohinder Suresh:

Software tester (PhD) + Detail-oriented + Efficiency expert


Chapter 1: Hiro’s Bad Day


meet Claire:


Hi!


I’m just finishing this SSIS package


Sure!


Strange. It used to work.


Can you come back in 5 minutes?


45 minutes later:


HIRO!!!


Wha??


1 hour earlier:


There’s gotta be a way to make this more generic


I’ll just update the shared database to be more consistent with the domain model


It will be fine...


back in the present:


DOH! Stupid shared database


meanwhile:


Hiro! I just upgraded the test database with that script that you gave me last week, but it doesn’t seem to be working. How do I know if the script has been applied correctly?


If only I could go back in time and fix this...


There has to be better way...


what problems did you see?


my list


#1

Changes to shared database are immediately available to everyone

(whether they want them or not)


#2

Claire couldn’t easily see what had changed to the database


#3

Suresh was applying database scripts one week after they were available


#4

Hiro had no way to see if database changes were applied successfully


how would you solve this?


my prescriptions:


Changes to shared database are immediately available to everyone

(whether they want them or not)

Separate database instances


Claire couldn’t easily see what had changed to the database

All database changes are under sourcecontrol


Suresh was applying database scripts one week after they were available

Automate database migration


Hiro had no way to see if database changes were applied successfully

Version all database changes


THANKS!!


Chapter 2: Tools


dbDeploy.NET*

http://dbdeploy.com


Tarantino

  • http://code.google.com/p/tarantino/


Migrator.NET

  • http://code.google.com/p/migratordotnet/


immature


enough slides already...


show me the code


dbDeploy.NET

Pro:

Con:

  • Simple

  • Supports SqlServer, Oracle, Sybase, HSQL, MySql

  • DBA-friendly

  • Needs better dev environment support


Tarantino

Pro:

Con:

  • Easy to get started

  • Automates most dev db tasks

  • No control over version numbers

  • SQL Server-specific

  • Rebaselining?

  • Requires NAnt


Migrator.NET

Pro:

Con:

  • Easy to get started

  • Cross-database support

  • Supports SqlServer, Oracle, MySql, Postgres

  • Data migration

  • Developer-specific

  • No way to easily capture SQL


Agile Vancouver Conference

November 4-6, 2008


Questions?


  • Background:

    • database scripts in sourcecontrol

    • database instances per developer

  • SqlServer generate scripts

    • what happens after version 1.0

    • what version is this anyway?

  • SqlCompare – take a look

  • version table

  • dbDeploy.net – up and down

  • Tarantino

  • Rails migrations

    • multi-database support (ie in-memory db for integration tests)

    • DSL for database update

    • data migration support

  • what is migrated?

  • in example migrate database containing data (use Northwind)

  • rebaselining

  • managing branches


  • dbDeploy.net

    • goal: automate the creation of delta script

    • production focused: hand off to production DBA

      • database migration for most organizations is not automated

    • supported DBs: SqlServer, Oracle, Sybase, MySql, HSql

    • version table: changelog (configurable)

    • versioning: derived from filename

    • does three things:

      • 1) determine which scripts have to be applied

      • 2) increment version for application of each script

      • 3) merge all scripts into a single script


  • Tarantino

    • goal: automate database creation and upgrade

    • development focus: easily automatable for as part of build process

      • database migration for most organizations is not automated

    • version table: usd_

    • version=# of executed scripts – rebaselining?


  • Migrator.NET

    • goal: leverage Rails-style migrations in .NET

    • cross-database migration support

    • leverage domain objects for persistence

    • version table: SchemaInfo


  • Login