Evolving Agile Databases

  • 871 views
Uploaded 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

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
871
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
35
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

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