Editorials

Code Reviews? What About Database Reviews?

Code Reviews? What About Database Reviews?
I’ve been involved in numerous code reviews – most of the time they’re a huge benefit to the process. You can make suggestions (or take suggestions as the case may be) and learn new ways to approach the work you’re doing. It’s hard to under-state what you can learn and just how helpful those reviews can be.

When was the last time you held a database review? It seems so obvious, but I don’t see many people doing them. It’s a time to stop and make sure you’re putting the right pieces in place in your applications and environment. Some key things should be at the top of your list (IMHO):

– indexes – are they the correct ones, why did you define the ones you did, what is the impact of more, fewer or different index choices?

– keys, foreign keys – heck, it drives the world – make sure they do the job!

– defaults – this is a biggie that I’ve repeatedly seen caught in reviews. Make sure you have the defaults you expect, and that those defaults make sense. One of the things that database reviews can often show up on defaults is that the default works well in the test scenario, but impacts other aspects of your application in unexpected ways. In other words, that default value of 1 might be referenced somewhere else and may, in fact, need to be a 0.

Do you do database reviews in this type of situation? What things do you look for in those reviews?

Please shoot me a note – perhaps we can set up a quick checklist others can use in the review process.

swynk@sswug.org