SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


But, but, but, my data is clean!


But, but, but, my data is clean!

Author
Message
GilaMonster
GilaMonster
SSC Guru
SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)

Group: General Forum Members
Points: 370590 Visits: 46956
Comments posted to this topic are about the item But, but, but, my data is clean!

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Tom Gillies
Tom Gillies
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1047 Visits: 317
Gail, I don't know if I would call this example of dirty data "weird" or "worrying" but it was certainly odd. We called it "The Curse of IVAN YEARS".

In the early years of online trading, I was Test Manager on a project which built a website for a company which sold records and CDs etc. To test the online title search we imported the titles catalogue from the production system. (By-the-way, in the old production data, all the titles were UPPER CASE.) The testers noticed that every so often the system would find titles which looked like this "ALBUM TITLE IVAN YEARS". The album title was correct, but sometimes at the very end it would have the text "IVAN YEARS"! We investigated and found that the "IVAN YEARS" bit was in the original production data, so it wasn't a bug, but it puzzled everyone, including the Customer. There were 100s of these records randomly scattered over the database, all "...IVAN YEARS". We all wondered who or what IVAN YEARS was.

In odd moments I investigated the problem and eventually found the cause. Lets say the album title column was char(80). In one (but only one!) of the maintenance screens in a green screen system, the album title field was (say) char(60). It turned out that for a time the data input people had been in the habit of not creating new records, but copying an old one AND BLANKING OUT THE TITLE! (it saved them quite a lot of keying). Unfortunately, what they didn't know was that the screen they were using had the 60 char field, and their favourite record was titled "I can't remember...SULLIVAN YEARS"! and char 60 fell on the second "L" of SULLIVAN! Every time they copied one of these records they were creating a title with an invisible (to them) "IVAN YEARS" at the end. The customer wasn't Amazon, but if you go there, you can still find CDs which (correctly) end ".... Sullivan Years" because that was a popular series of records.

The root cause of the problem was a mis-match in field length between the database and the screen combined with a slightly dubious, but innocent practice in data-entry. The solution was a _carefully tested_ data-fix update done at about the same time as we converted the text in the database from UPPER CASE to Mixed Case. As dirty data goes, it was harmless, but it had me puzzled for quite a while!

Tom GilliesLinkedIn ProfileAbout Me
Tom Gillies
Tom Gillies
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1047 Visits: 317
On a less flippant note, Chris Date (among others) has argued that database systems should explicitly prohibit anything which is not allowed. That increases work in the short term, but decreases the possibility of putting rubbish into the database.

Of course, it's quite hard to devise something which would prevent nonsense like "IVAN YEARS" getting into a "description field". Unless you can parse the field for meaning (and some legitimate album and book titles are not standard English) the I'm not sure how you can do it.

Tom GilliesLinkedIn ProfileAbout Me
Jim P.
Jim P.
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2637 Visits: 2215
My SW company was bought by another SQ company about 18 months ago. So we had to build a system to extract data from the old DB to the new one. It's SW to track residents in nursing homes. As part of it we have converted over 600 clients so far. We found a large problem in how the the development created the front end. They allowed the end user to put new vendors, relative contacts types, education levels, religions, etc. on the fly. There is an option to limit who can do that, but is turned off by default. Crying

So we have gotten DBs that have 175 relation contacts with 25 being different ways to spell or abbreviate daughter. The race codes have countries of origin. There was one that had 125 education levels. The vendor or doctor will be repeated 5 times. w00t

Where if the user had to go to a central place to add/modify the setups the users would have probably looked at the preset lists before making a change.



----------------
Jim P.

A little bit of this and a little byte of that can cause bloatware.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)

Group: General Forum Members
Points: 370590 Visits: 46956
I would agree with Chris Date on that. Yes, it's up-front work, but in my opinion everything that can be validated in a DB should be.
I love arguing this one with devs, so much 'agile' nonsense sometimes. :-D "Creating validation in the database is a violation of the DRY principal"
One dev (few years ago) with that initial attitude came back a couple weeks later: "I checked the DB, found that I had a bug in the app which was letting incorrect values through. I've fixed the bug and added some DB validations."

Description fields, like comment fields are hard, they are free text. I suspect your problem was more a data type mismatch than a validation issue per se.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Tom Gillies
Tom Gillies
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1047 Visits: 317
@Gail, I think you have the right classification there. If anything, the cause was a "type mismatch". You can't really say that "IVAN YEARS" was invalid, only that it was nonsense in the context it was found.

@Jim, Yes, I've come across situations like that too. Data migrations are a time when the dirty data gets found. They are also a time when dirty data gets created too. I agree with your suggestion that lookup tables are a good thing. Anywhere that a screen has a field which says or implies "Type of..." and the entry is not something pre-determined or constrained makes me suspicious. Of course, thinking that way is one thing, convincing other people is quite another.;-)

Tom GilliesLinkedIn ProfileAbout Me
jscott 89861
jscott 89861
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 6
I have been a consultant/developer/database analyst for many years and the thing that gets me most riled up is a user putting data into fields like *do not use* . However, as much 'power' as we think we have as developer's and DBAs the real power lies with our clients who say they don't want us to require fields or restrict entries... etc. Since they are the one's paying the bills if they insist they do not want this I cannot add the things I would need to add to restrict this type of thing. And, no matter what I added I could not prevent them from using someone's middle name as a 'do not use' indicator. They look at me like I am a little strange when I get so upset when I see these things. w00t
dogramone
dogramone
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1277 Visits: 3883
I agree with jscott, the customer creates a lot of these problems. How often do you deliver a quote to add some additional fields and the customer says, "we have these four fields that aren't in use so we'll just re purpose those. But there is some legacy data already there that they don't want cleansed or to pay for some re-names. Aver here in Australia the role of the data analyst is almost non-existant as developers can do that job during build. And with ORM taking over ... I use to specialise in data migration projects but there just aren't the jobs so I have had to change track. Such a shame as we all know you only capture data to use it and if it isn't fit for purpose how can it be used?



andrew gothard
andrew gothard
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4212 Visits: 6039
GilaMonster (6/21/2014)

I love arguing this one with devs, so much 'agile' nonsense sometimes. :-D "Creating validation in the database is a violation of the DRY principal"


The concept's not nonsense - their interpretation is.
My response to that is usually along the lines of;
1) Microsoft has already written this. Why are you repeating their work - they've spent 10's of millions if not hundreds on sorting this, why are you spending resources on trying to write functionality that's there. So, don't repeat work that's already done.
2) Where in the Agile Manifesto does it suggest data quality and accuracy don't matter - I missed thaht bit
3) For anything else that we add later you're going to have to re-implement this, meaning you're going to have to repeat yourself, and increase technical debt. Unless you've ignored YAGNI, of course.

plus if applicable. "Remember system X?"

I'm a DBA.
I'm not paid to solve problems. I'm paid to prevent them.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)SSC Guru (370K reputation)

Group: General Forum Members
Points: 370590 Visits: 46956
andrew gothard (6/23/2014)
GilaMonster (6/21/2014)

I love arguing this one with devs, so much 'agile' nonsense sometimes. :-D "Creating validation in the database is a violation of the DRY principal"


The concept's not nonsense - their interpretation is.


True, I should have been clearer.
My problem isn't with agile, it's with people who incorrectly use agile to justify poor coding practices.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search