Evolving Agile Databases

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Evolving Agile Databases - Presentation Transcript

    1. Evolving Databases in Agile Umar Akhter & Rohith Rajagopal
    2. Good DB Management Principles
      • Provide each developer with his/her own DB instance
        • This allows developers to try things out without affecting other developers
        • Sometimes a developer might want 2 instances - one for testing and another for development
    3. Good DB Management Principles
      • Don't use binary db dumps
        • Because they are hard to version control/merge
      • Use scripts to create the DB schema
        • So a new dev can easily recreate the schema
    4. Good DB Management Principles
      • Version control the scripts used to create/change the DB schema
        • To keep the DB schema in sync with the code which uses it
      • Automate running the scripts which create the schema
        • Because you will need to create the schema multiple times and you should automate repetitive tasks.
        • Use bat file or ant file
    5. Good DB Management Principles
      • Use alter scripts rather than drop table and recreate (or hbm2ddl)
        • both drop table/recreate and hbm2ddl will delete existing data
      • Don't hardcode the paths while automating
        • It's easier to move across machines if the paths are in one place (property file, environment variables)
    6. Good DB Management Principles
      • Make sure your tests are easily repeatable
        • You should be able to run your tests any number of times without manual intervention in between
        • Make your tests clean up after each run
      • Make sure your scripts are repeatable
        • You shouldn't need any manual steps to figure out which script to run to get your DB schema right
        • You should be able to invoke the same command which (irrespective of the current state of the DB) will upgrade you to the correct version of the schema
    7. Good DB Management Principles
      • Use a tool like DB Deploy which
        • Keeps track of applied alter version in the DB
        • figures out from the schema + the alter files which alters to apply
        • Upgrading production databases becomes very easy
        • Reduced testing overhead for upgrade scripts
        • Deployment becomes easy and fast!!
    8. Further Reading
      • http://martinfowler.com/articles/evodb.html
      • http://databaserefactoring.com/
      • http://goforthandcode.blogspot.com/2007/12/brief-history-of-database.html
      • http://goforthandcode.blogspot.com/2008/01/schema-to-survive-winds-of-change.html

    + Naresh JainNaresh Jain, 2 years ago

    custom

    582 views, 0 favs, 0 embeds more stats

    Rohit\'s and Umar\'s Evolving Agile Database Presen more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 582
      • 582 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 26
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories