Your SlideShare is downloading. ×
Evolving Agile Databases
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Evolving Agile Databases


Published on

Rohit\'s and Umar\'s Evolving Agile Database Presentation at Agile Mumbai 2008 Conference

Rohit\'s and Umar\'s Evolving Agile Database Presentation at Agile Mumbai 2008 Conference

Published in: Technology

1 Like
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 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