{"id":2650,"date":"2008-07-21T10:36:00","date_gmt":"2008-07-21T10:36:00","guid":{"rendered":"https:\/\/test.simple-talk.com\/uncategorized\/the-myth-of-over-normalization\/"},"modified":"2017-08-10T12:54:30","modified_gmt":"2017-08-10T12:54:30","slug":"the-myth-of-over-normalization","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/blogs\/the-myth-of-over-normalization\/","title":{"rendered":"The myth of over-normalization"},"content":{"rendered":"<p class=\"MsoNormal\">I&#8217;ve always been suspicious of denormalizing an OLTP database. Denormalisation is a strange activity that is supposed to take place after a database has been normalized, and is assumed to be necessary in order to reduce the number of joins in queries to a tolerable level. C.J. Date is quite clear on this; well, he is slightly less opaque than usual: any denormalization to a level below 5NF is a &#8216;bad thing&#8217; (he says &#8216;contraindicated&#8217;).&#160; <\/p>\n<p class=\"MsoNormal\">In practice, normalization to fifth Normal Form is unusual. Normally, the Database designer reaches for his hat and coat after reaching Boyce\/Codd Normal Form (BCNF), which is 4NF, and few databases I&#8217;ve ever seen are even reliably BCNF. <\/p>\n<p class=\"MsoNormal\">Why does one ever normalize a database? It is often said that it is to avoid logical inconsistencies, and to avoid insertion, delete and update anomalies. Also, to avoid redundancy, or duplication, of data. I think there is more to it than that. It also ensures that your data model makes <i>logical sense<\/i>. If, at the end of the normalization process, you arrive at a set of tables that correspond to simple, easily understood entities, then the chances are that you have got a database model that will sail through the inevitable changes in scope, changes in the application, extensions and so on. If you don&#8217;t, then it is time to tear up your database design and start again. Normalization isn&#8217;t like sprinkling on fairy-dust; it is a way of testing and &#8216;proving&#8217; your design.<\/p>\n<p class=\"MsoNormal\">Too often, denormalization is suggested as the first thing to consider when tackling query performance problems. It is said to be a necessary compromise to be made when a rigorous logical design hits an inadequate database system. As the saying goes, &#8220;Normalize &#8217;til it hurts, then denormalize &#8217;til it works&#8221;. In fact, Denormalization always leads eventually to tears. It complicates updates, deletes and inserts; it renders your database difficult to modify.&#160; Maybe once there was an excuse for a spot of denormalization, but on a recent version of SQL Server or Oracle, with indexed or materialized views, and covering indexes, the performance hit from multiple joins in a query is negligible. If your database is slow, it isn&#8217;t because it is &#8216;over-normalized&#8217;!<\/p>\n<p class=\"MsoNormal\">As always, we&#8217;d like to hear what you think. The best comment, according to our distinguished panel of judges, will receive a $50 Amazon voucher, and three runners-up will get a Simple-Talk gift pack.<\/p>\n<p class=\"MsoNormal\">&#160;&#160;<\/p>\n<p class=\"MsoNormal\">Cheers,<\/p>\n<p class=\"MsoNormal\">Tony.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve always been suspicious of denormalizing an OLTP database. Denormalisation is a strange activity that is supposed to take place after a database has been normalized, and is assumed to be necessary in order to reduce the number of joins in queries to a tolerable level. C.J. Date is quite clear on this; well, he&#8230;&hellip;<\/p>\n","protected":false},"author":200703,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2,47125],"tags":[],"coauthors":[],"class_list":["post-2650","post","type-post","status-publish","format-standard","hentry","category-blogs","category-editorials"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/2650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/200703"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=2650"}],"version-history":[{"count":3,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/2650\/revisions"}],"predecessor-version":[{"id":72063,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/2650\/revisions\/72063"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=2650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=2650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=2650"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=2650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}