Jul 28, 2008 / nhibernate ~ .net
Is OR/M is encouraging DB normalization?

Earlier in my career, we often discussed if normalization was a GOOD IDEA for our projects. The opinions were varied:

  • I kind of do normalization by accident.
  • What's normalization?
  • I always normalize, but draw the line at composite keys.
  • I don't really do normalization, I just produce a data model that's easy to code to.
  • Normalization is academic.
  • Normalization is a pain in the ass.
  • If I normalize my data model, it might not perform, so I'll play it safe.

This makes me chuckle a bit now. I always liked normalized data structures, but agreed they were a pain.

Normalization was never really bad, it was just about tooling. If you were working with old skool ASP or VB back in 2001, then coding to 3NF schemas was a tedious job.

Things have changed. The quality and quantity of data access tools in the Microsoft/.NET space is actually making it much easier to code to normalized schemas. In fact, they might even encourage it. I'm talking mostly about the OR/M tools here (NHibernate, for example), but I know that other tools like the DataSet, SubSonic, iBatis etc offer similar benefits.

So, here I am 7 years into my career, and loving the fact that the world has changed. I used to associate complex data structures with coding pain, and now good tools make it a walk in the park. Hurrah!

You may also like...