In a recent article on the blog I link to most, Jeff Atwood took the time to discuss database normalization and its rather blurry scale of reason. As usual, I found myself agreeing with Jeff and questioning a few of my own practices in database design. This is something I encourage all my peers to do, especially those who don’t spend much time contemplating the rules by which you program.

Now, when I say that I agree with the fact that normalization logic is blurred, that doesn’t mean that I abandon it. Quite the opposite, I’m actually kind of a fanatic about getting information nomalized, at least up to about 4NF….because beyond that I think it gets a little masonic, if you know what I mean. But I can also see the reasons that one has for denormalization.  Tools are the biggest one that I deal with because many applications from Oracle and reporting tools cannot deal with complex joins, intricate keys, or other common tricks. There are also speed issues that would get you to commit flattening and other acts of database treason.

The big deal here isn’t the fact that these practices are right or wrong (which they often are…clearly), but rather that there is a lack of openness on the topic in the CS curriculum and among the ‘elite programming circles’. When I got to my first serious development job I saw that people were designing tables with an apparent ignorance to the “Laws of the RDBMS”. It didn’t take me any time to throw my nose up and strut by like a upstart schoolgirl passing a pack of teenage smokers.

The reality is that young developers can’t come out of college thinking that they hold the keys to the ‘Normal Universe’ just because they took a database class or two.  No, you cut your teeth on your first 5 gut-wrenching projects, and at that point you earn the rights to sidestep a database design or two, but not before. It’s not black and white and it certainly has little to do with mathematics that you may have been taught. I’m not saying the math and theory isn’t important or even necessary to get to that point. I’m just saying that your decisions on who to marry comes less from the math knowledge that adding 1 and 1 returns 2, and more about the experience you gain in what works and what doesn’t after that first step.

Now that I’ve compared database design to marriage, theoretical mathematicians to freemasons, and myself to a snobby schoolgirl, it’s time to say that this isn’t the end of this. In fact it’s just the beginning. Hopefully I’ll have a few posts for you on breaking down the illusions that I’ve struggled with in the real world of database applications.

*Two things: 1) Normalcy, especially in the physical universe, doesn’t exist. 2)Just because compared DB laws to smoking and then some laws are breakable doesn’t mean you should go smoke. If you’re of age and you want to fine, but it’s a gross habit folks. Just like ignorance of design patterns. And you don’t want to be loke those freaks, do you?

Posted on July 22nd, 2008 | filed under programming | Trackback |

One Comments

  1. Laramie:

    I enjoyed your analogies, and the fact that you compared yourself to an “upstart schoolgirl!” A plus that it is at least semi-understandable for us non-computer folk!

    Happpy now?

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>