Database Smells, Redneck style!

Your database might be a redneck if it…


  • relies on scheduled jobs to validate or fix referential integrity.
  • requires a regular expression to join tables.
  • uses foreign keys that decide at run-time what table or column they link to.
  • don’t need no steenking related tables. Not as long as text fields allow semi-colons! Array City, baby!
  • has primary keys that are updated more often than Twitter.
  • commits things to memory the same way I learned Spanish. Repetition, repetition, repetition.
  • thinks one-to-one relationships is this new black.
  • uses a date, bit or varchar(8000) as a primary key.
  • has an artificial seed value for identity fields to avoid PK conflicts with its twin database during replication.
  • contains both nulls and empty strings in the same column because they mean different things.
  • has more than one incrementing field per table.
  • thinks, “Constraints are for conformists, man!”
  • like your blog, has a public IP address. Unlike your blog, gets 1,000 hits a day from the Internet.
  • has an index on every column in every table.
  • has an index on one column in every database.
  • has tables with more columns than the parthenon.
  • gives the public role has more back-end access than Clay Aiken
  • contains a plain-text field named “password”, “Social security number”, or “launch codes.”
  • has stored procedures with more string manipulation than a kite flying tournament.
  • recycles identity values in a fruitless effort to save the planet by corrupting data.
  • has tables named by content AND function (EmployeeLookup)
  • may not have an identity column, but it has “identity rows” (OrderItem1,OrderItem2, OrderItem3,…)
  • likes nicknames more than GW. “Hi, I’m CustomerNumber, but my friends call me call me ClientID or CustNo.”
  • can’t let go of it’s old girlfriend, DOS and has fields named “CstInvID” just in case she ever comes back.
  • there’s a party in SA’s pants and everyone’s invited.
  • has gossipy tables that don’t mind their own business. “Harriet, let me tell you about Harriet. She lives on main street, her dad is retired, and she owes $8 in back invoices!”
  • has been sick with the Slammer virus since 2002, but doesn’t tell its partners.
  • forces you to repeat yourself. “Susie got married, can you change her last name to Murphy? Be sure to also update the name on her invoices and customer record.”
  • is full of tables with half of the columns populated 25% of the time because they are irrelevant for 75% of the rows.
  • has columns that only make sense when interpreted by their peers.

Have some to add?

Bring ’em on in the comments. I’ll add them to the article and even credit you with a link to your blog.