Database migration in net
Download
1 / 57

Database Migration in .NET - PowerPoint PPT Presentation


  • 87 Views
  • Uploaded on

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:

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Database Migration in .NET' - willis


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

Database Migration in .NET

Continuous Database Evolution



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
Chapter 1: Hiro’s Bad Day










Wha??



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






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?






Changes to shared database are immediately available to everyone

#1

Changes to shared database are immediately available to everyone

(whether they want them or not)


Claire couldn t easily see what had changed to the database

#2

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


Suresh was applying database scripts one week after they were available

#3

Suresh was applying database scripts one week after they were available


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

#4

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




C hanges to shared database a re immediately available to everyone
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 database1
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 available1
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 successfully1
Hiro were available had no way to see if database changes were applied successfully

Version all database changes


THANKS!! were available


Chapter 2 tools
Chapter were available2: Tools


dbDeploy.NET were available*

http://dbdeploy.com


Tarantino were available

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


Migrator.NET were available

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


immature were available


enough slides already... were available


show me the code were available


dbDeploy.NET were available

Pro:

Con:

  • Simple

  • Supports SqlServer, Oracle, Sybase, HSQL, MySql

  • DBA-friendly

  • Needs better dev environment support


Tarantino were available

Pro:

Con:

  • Easy to get started

  • Automates most dev db tasks

  • No control over version numbers

  • SQL Server-specific

  • Rebaselining?

  • Requires NAnt


Migrator.NET were available

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
Agile Vancouver Conference were available

November 4-6, 2008


Questions
Questions? were available


  • Background: were available

    • 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 were available

    • 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 were available

    • 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 were available

    • goal: leverage Rails-style migrations in .NET

    • cross-database migration support

    • leverage domain objects for persistence

    • version table: SchemaInfo


ad