{"id":1160,"date":"2015-11-10T13:02:46","date_gmt":"2015-11-10T19:02:46","guid":{"rendered":"https:\/\/clarkcreations.net\/blog\/?p=1160"},"modified":"2015-11-10T13:04:39","modified_gmt":"2015-11-10T19:04:39","slug":"tsql2sday-data-modeling-gone-wrong","status":"publish","type":"post","link":"https:\/\/clarkcreations.net\/blog\/tsql2sday-data-modeling-gone-wrong\/","title":{"rendered":"#TSQL2SDAY \u2013 Data Modeling Gone Wrong"},"content":{"rendered":"<p><a href=\"http:\/\/mickeystuewe.com\/2015\/11\/03\/t-sql-tuesday-72-invitation-data-modeling-gone-wrong\/\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/farm6.staticflickr.com\/5112\/7159832136_fd79d735a4_t.jpg\" alt=\"TSQL2sDay150x150\" width=\"100\" height=\"100\" \/><\/a><\/p>\n<p><span style=\"font-family: Arial; font-size: medium;\">Here we are again, time for TSQL2sDay. This is actually the 72nd one, that is long enough to finance and pay off a car these days. This month our gracious host is none other than Mickey Stuewe (\u00a0 <\/span><a href=\"http:\/\/mickeystuewe.com\/\"><span style=\"font-family: Arial; font-size: medium;\">BLOG<\/span><\/a><span style=\"font-family: Arial; font-size: medium;\">\u00a0 |\u00a0 <\/span><a href=\"https:\/\/twitter.com\/SQLMickey\"><span style=\"font-family: Arial; font-size: medium;\">TWITTER<\/span><\/a><span style=\"font-family: Arial; font-size: medium;\">\u00a0 ) and she\u2019s asked us to tell\u00a0 a story about Data Modeling Gone Wrong.<\/span> <span style=\"font-family: Arial; font-size: medium;\">I have to say that I really no nothing about a data model going wrong. Now hold on I am not done yet. You are wondering WTH?! is this girl still sick? Has she lost her marbles? I\u2019ve never had these issues because:<\/span><\/p>\n<ul>\n<li><span style=\"font-family: Arial; font-size: medium;\">Reasons<\/span><\/li>\n<li><span style=\"font-family: Arial; font-size: medium;\">Applications<\/span><\/li>\n<li><span style=\"font-family: Arial; font-size: medium;\">Egos<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Reasons<\/h3>\n<p><span style=\"font-family: Arial; font-size: medium;\">First of all, you have to admit that something has gone wrong for a problem to exist. Now I know that my other two reasons can still fall into this category but we\u2019ll save them for later. Reasons can be that you\u2019ve grown or aged yourself into a black hole of data model hell. Here is an example.<\/span> \u00a0 <span style=\"font-family: Arial; font-size: medium;\">When I worked in product insurance (read cell phones and everything else your carrier tries to sell you) the systems were designed way back in the 80\u2019s. When building a system like that I am sure no one knew that by the end of 2014 more than 7 billion phones would be used around the world. So like any good developer\/architect\/designer, the primary key was\u2026.wait for it\u2026\u2026\u2026cell phone number. When I first started with ABC, phone numbers were not getting recycled for about 3 years. That means if you disconnected service your old number collected dust for 3 years. When I left on average that was about 3 weeks. The other side of this coin is all of the carriers did the same thing and every device they sell you with connectivity has a phone number. This creates issues on 2 levels. First your PK getting recycled is unthinkable and second how do you tie things together for single accounts, how do you create a family plan? Wasn\u2019t a bad model when it started but sure ended up that way. <\/span><\/p>\n<h3>Applications<\/h3>\n<p><span style=\"font-family: Arial; font-size: medium;\">I am 100% certain some of the worst data models I have ever seen were provided by an application or written by an application developer. Trying to keep all your relationships inside the application so I can\u2019t possibly know what is going on in your database is just crazy talk. So why do application developers design databases? Because we let them. In the course of my career I have only met 1 application (java) developer who had a clue about databases. Currently my husband works with .net devs who design databases and do cute things in customer tables like only including FULL NAME as a column. I assume, that with all things this boils down to time, money and clearly a management lack of understanding. I give people a lot of slack for making mistakes, being new at something and having not fully embraced the engine. <\/span><\/p>\n<h3>Egos<\/h3>\n<p><span style=\"font-family: Arial; font-size: medium;\">Remember when I said you have to admit something has gone wrong for a problem to exist? Well, sometimes egos get in the way. You know there is that one guy who nods his head \u201cyes\u201d to every manager request; they love him, they promote him and they let him be on all the biggest projects. I have worked with a DBA Dev that was trying to prove how great they were so they over-normalized a database to death. Great news: when deploying stored procedures you were not allowed more than 10 joins; it took 6 just to get a customer name and address. Then there is the \u201cit\u2019s not my problem\u201d problem. This happens when all anyone cares about is fast writes to the database so everything is designed to accept dumps of XML. When providing new services there will be a need to report at a minimum it\u2019s growth rate and no one has mentioned to the business that getting data out of they fancy new system will suck, and no one wants to pay for a data mart. Generally I heard \u201cwell they can pay for a reporting database later\u201d or \u201cguess they should have thought of that.\u201d For me, it is always a sad day when an EGO is running the team, creating the new system or, hell, just breathing in my air space. The stakeholders don\u2019t know what you don\u2019t tell them.<\/span> \u00a0 <span style=\"font-family: Arial; font-size: medium;\">Really I\u2019ve never seen anything out right die due to poor design, but I have seen a few things that make me shake my head in wonder. <\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<\/p>\n<p>Here we are again, time for TSQL2sDay. This is actually the 72nd one, that is long enough to finance and pay off a car these days. This month our gracious host is none other than Mickey Stuewe ( BLOG | TWITTER ) and she\u2019s asked us to tell a story about Data Modeling Gone Wrong. I have to say that I really no nothing about a data model going wrong. Now hold on I am not done yet. You are wondering WTH?! is this girl still sick? Has she lost her marbles? I\u2019ve never had these issues because:<\/p>\n<p> Reasons Applications Egos <\/p>\n<p>&nbsp;<\/p>\n<p> Reasons <\/p>\n<p>First of all, you have to <span style=\"color:#777\"> . . . &rarr; Read More: <a href=\"https:\/\/clarkcreations.net\/blog\/tsql2sday-data-modeling-gone-wrong\/\">#TSQL2SDAY \u2013 Data Modeling Gone Wrong<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[267,239,178],"tags":[294,308],"class_list":["post-1160","post","type-post","status-publish","format-standard","hentry","category-data-modeling","category-sql-server","category-tsql2sday","tag-data-modeling","tag-tsql2sday","odd"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/clarkcreations.net\/blog\/wp-json\/wp\/v2\/posts\/1160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clarkcreations.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clarkcreations.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clarkcreations.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clarkcreations.net\/blog\/wp-json\/wp\/v2\/comments?post=1160"}],"version-history":[{"count":0,"href":"https:\/\/clarkcreations.net\/blog\/wp-json\/wp\/v2\/posts\/1160\/revisions"}],"wp:attachment":[{"href":"https:\/\/clarkcreations.net\/blog\/wp-json\/wp\/v2\/media?parent=1160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clarkcreations.net\/blog\/wp-json\/wp\/v2\/categories?post=1160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clarkcreations.net\/blog\/wp-json\/wp\/v2\/tags?post=1160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}