Justin Francis Self-Portrait

Saturday, September 8, 2007

Is Database Version Control Worth It?

In this second post on the subject of automatic database upgrading, I discuss the merits of the system whose implementation is described in the previous post.

I won't be circumspect; it is not cheap to make auto-deployment work. It took one programmer two weeks to implement and we probably spend about one day a month maintaining the system. In the end, it comes down to one fundamental factor: the number of environments to which you deploy. But first, the pro and cons.

The biggest advantage of this system is that deployments can be fully automatic. They can be scheduled to happen at a specific time, and everything will get upgraded. No waiting on the DBA, or ensuring the changes are all correct and in the proper spot.

Similarly, the deployment of the new "database version" becomes as solid and consistent as the deployment of the code. The deployment of the database necessarily becomes part of the testing phase of an iteration. This means that deployments are more often successful because they are better controlled and better tested.

The one big disadvantage is complexity. There is a lot of complexity in maintaining a database version. I am not convinced, however, that this complexity is due to the automatic deployment. Rather, I think that the deployment merely exposes problems that would otherwise be hidden when deployment is done manually.

For example, the system may boot fine without running a particular rollback script, but the deployer will stop the boot because the upgrade will fail because the rollback was not run. This would be hidden in a manual deployment, but exposed during an automatic one.

But by far the biggest determining factor is the number of instances you need to deploy to. Just on the development side of things, we have a unittesting database, a deployment database (to unit-test the upgrade scripts), the full development database, the trimmed (lean data) development database and a number of personal development database instances. Then there are testing, staging and production databases.

If a developer makes a change to the database they must publish this change (run it) on each of those databases. If they don't, tests will begin to fail and servers will fail to start as others upgrade to the latest source which does not yet have the required database support. If the developer does not run them on all the databases, it is left to other developers to run the changes when they figure out the reason their servers will not boot.

With the automatic deployment, none of this is necessary. Upgrading to the latest version of the source will also upgrade any databases being used to the appropriate version.

For us, with only a half-dozen databases, it is worth it. It is worth it twice over. I never have to come in during the pre-dawn to launch a version, and I never have to tell other guys they need to run change scripts as they appear. My code changes and databases changes have been harmonized. They both work in the same way.

Everything just works. And that is the best compliment a user can give to a piece of software.

11 comments:

Anonymous said...

Maybe I`ll be Captain Obvious, but... it's only few days to New Year last, so let's be happy!
Hohoho!)
[url=http://nkfdsjhfhs.com].[/url]

Anonymous said...

Happy New Year[url=http://nfksghjskf.com/],[/url] everyone! :)

Anonymous said...

Happy New Year[url=http://sdjfh.in/flexpen/],[/url] everyone! :)

Anonymous said...

[url=http://fastcashloansonlinedirectly.com/#oudsm]fast cash advance payday loans[/url] - fast cash advance payday loans , http://fastcashloansonlinedirectly.com/#czugk payday loans

Anonymous said...

[url=http://buyonlinelasixone.com/#6780]lasix without prescription[/url] - generic lasix , http://buyonlinelasixone.com/#10020 buy lasix online

Anonymous said...

[url=http://buyonlinelasixone.com/#2679]cheap lasix[/url] - lasix cost , http://buyonlinelasixone.com/#2390 lasix cost

Anonymous said...

[url=http://buyonlinelasixone.com/#14153]cheap lasix[/url] - buy lasix , http://buyonlinelasixone.com/#9555 buy lasix online

Anonymous said...

[url=http://buyaccutaneorderpillsonline.com/#5663]order accutane[/url] - accutane without prescription , http://buyaccutaneorderpillsonline.com/#4948 buy accutane

Unknown said...

coach outlet
tory burch outlet online
michael kors outlet
timberland canada
coach factory outlet
burberry handbags
pandora uk
true religion outlet
gucci outlet
coach outlet store online
louis vuitton outlet
michael kors outlet
ralph lauren uk
jordan shoes
louis vuitton
jeremy scott adidas
chanel handbags
cheap oakley sunglasses
jordan 11s
hollister clothing
copy watches
prada bags
p90x workouts
polo outlet
jordan retro 3
coach outlet
pandora jewelry
hollister co
retro jordan
pandora rings
coach outlet online
jordan retro 8
ray ban sunglass
air jordans
toms.com
oakley frogskins
20150626xiong

Zhenhong Bao said...

michael kors outlet
ralph lauren outlet
mont blanc pens
asics,asics israel,asics shoes,asics running shoes,asics israel,asics gel,asics running,asics gel nimbus,asics gel kayano
mulberry uk
swarovski jewelry
ralph lauren uk
longchamp pliage
pandora jewelry
thomas sabo uk
hollister shirts
adidas trainers
asics
coach outlet
michael kors wallet
fitflops sale
true religion jeans
louis vuitton bags
adidas shoes
hermes bags
kate spade uk
toms outlet
louis vuitton outlet stores
louis vuitton neverfull sale
discount michael kors handbags
longchamp handbags
prada outlet
michael kors factory outlet
louis vuitton handbags
michael kors handbags
polo ralph lauren
true religion jeans
cartier outlet store
michael kors outlet
omega outlet
20160507zhenhong

chenmeinv0 said...

michael kors outlet clearance
burberry outlet
louis vuitton purses
rolex watches outlet
louboutin pas cher
mbt shoes
louboutin shoes
coach outlet online
canada goose sale
cheap uggs
michael kors outlet
montblanc pens
cheap ugg boots
louis vuitton outlet
chanel outlet
fitflop sandals
coach outlet online
michael kors
coach outlet
adidas trainers uk
ugg outlet
jordan shoes
cavaliers jerseys
tiffany and co jewelry
cheap rolex watches
doudoune canada goose
chaussures ugg
ray ban sunglasses outlet
cheap jordan shoes
louis vuitton handbags
chenyingying20161103