Denormalize for Simplicity: Ungood idea?

Posted by yar on Stack Overflow See other posts from Stack Overflow or by yar
Published on 2010-05-20T13:21:55Z Indexed on 2010/05/20 13:30 UTC
Read the original article Hit count: 217

Filed under:

After reading this question, I've learned that denormalization is not a solution for simplicity. What about this case?

I have news-articles which have a list of sites-article-will-be-published-to. The latter can be expressed in normalized fashion either by table and a many-to-many relationship (via a cross-table, I think). But the simple solution is to just throw a bunch of booleans for the sites-article-will-be-published-to. Assuming the sites are:

  1. small in number
  2. will not change over time
  3. have no fields themselves, except a name

Is this still a terrible idea? The many-to-many relationship seems somewhat cumbersome, but I've done it before in cases like this (and it seemed cumbersome).

Note: I'm doing this in Rails, where it's not that painful.

© Stack Overflow or respective owner

Related posts about denormalization