THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

John Paul Cook

White elephant gift exchange for DBAs

In the holiday season, white elephant gift exchanges are somewhat popular in the workplace. This is a really great definition from Wikipedia: "the term white elephant refers to a gift whose maintenance cost exceeds its usefulness." Now that definitely describes some databases I've seen!

We can do a white elephant gift exchange of worst schemas. Here's my white elephant constructed of snippets from real production databases:

create table [table] (

   [column] varchar(1)  --think Hungarian notation without abbreviations

 , [count] decimal(10,0)  --integer value that might someday be 3 billion

 , replicationId varchar(40)  --this was for storing a uniqueidentifier

 , acomodation varchar(50)  --can we add spellcheck to SSMS, please?

 , seperationStatus varchar(50)  --odd how many columns match the default length

 , worseThanEAV xml


Do you hate brackets? I do! I really hate brackets when people use them to allow keywords and reserved words to be used for other purposes. I can see someone specifying decimal(10,0) instead of int, but other evidence made me suspect that the person didn't understand data types at all. Object names that are misspellings of ordinary words tend to cause the literate members of the staff to make errors. Don't you wonder about the design of a database in which most varchar columns are the same as the default width?

I really liked the varchar(1) that I saw in a table definition. I can't wait to hear the justification for that.

There was a recent blog post on EAV and quite a bit of discussion on that topic. The xml data type is a good companion to discussions about EAV. If you just can't quite finish your data model, be it third normal form or EAV (notice that the word normal is never used with the abbreviation EAV - ponder than one for a bit), you can always organize your data as XML and cram it into a table.


Published Wednesday, November 25, 2009 9:30 PM by John Paul Cook

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS



GrumpyOldDBA said:

and one of my favourites    IsDeleted bit null,

November 30, 2009 10:55 AM

Leave a Comment


About John Paul Cook

John Paul Cook is a database and Azure specialist in Houston. He previously worked as a Data Platform Solution Architect in Microsoft's Houston office. Prior to joining Microsoft, he was a SQL Server MVP. He is experienced in SQL Server and Oracle database application design, development, and implementation. He has spoken at many conferences including Microsoft TechEd and the SQL PASS Summit. He has worked in oil and gas, financial, manufacturing, and healthcare industries. John is also a Registered Nurse currently studying to be a psychiatric nurse practitioner. Contributing author to SQL Server MVP Deep Dives and SQL Server MVP Deep Dives Volume 2. Connect on LinkedIn

This Blog



Privacy Statement