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 in a bunch of booleans for the sites-article-will-be-published-to (publish_to_site_1, publish_to_site_2 etc.). Assuming the sites are:
- small in number
- will not change over time
- 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. On the other hand, the metaprogramming makes things like this trivial
(1..5).each { |site| do_something(article["publish_to_site_#{site}".to_symbol]) }
If these conditions are actually satisfied, then no, it’s not a terrible idea.
In fact, this is not even denormalization: Denormalization usually means that you are storing some information redundantly, for sake of performance. In your example, since the sites do not have fields themselves, you are not storing stuff redundantly. You are just depriving yourself from the opportunity to store additional fields for the sites in the future (without violating normalization or redesigning your database).
So, this is OK (normalized):
But this is not OK (redundancy):