Why the blog?

To record development problems and hopefully subsequent solutions when working on an ongoing Java project.

When I started on this project, it was already 5 years old. I thought it would be useful see how introducing some XP techniques might help reduce some unwanted artifacts

A test-driven re-write would be my preference, but as is so typical, this has been ruled out as too much work.

So, hopefully continuous gradual change in the right direction will help.

Thursday, June 26, 2008

Following and adhering to database conventions.
Conventions in a database should actually be strict rules, and the db should be made to follow them. Unfortunately, there are many entities and many rules.
E.g. naming conventions, indexes, pks , foreign keys, trigger existence, privileges etc.

One way to help enforce this is for the DBA to police all scripts and hopefully spot anything thats not right.
The only way that works is to regularly run reports on this data that check for violations. Following an agile approach, I created a Java domain model to hold all database metadata and scripted all the database rules as JUnit tests.
Now, developers dont need to know conventions - they are taught them by the tests and the DBA doesnt need to manually check the db for any convention violations.

No comments: