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.


11 Responses

  1. Note: I removed the book link after realizing how much it made the article look like an infomercial.

    My original intent was to credit the source of a couple of the points I made. If you are interested, the book is “Refactoring Databases: Evolutionary Database Design” by Scott Ambler and Pramodkumar J. Sadalage.

  2. Tell it straight: was this whole article just an excuse to make the Parthenon joke, and that awful, awful, awful Hellas pun?

    • I thought the Clay Aiken joke was more memorable. Plus I had to get the affiliate link in for the Greek National Tourism Organization. j/k.

      Sorry about the pun, when you have Greek in-laws these things happen.

  3. […] Your database might be a redneck if. […]

  4. Thanks for the great laugh, and solid set of database no, no’s

    I didn’t see anything about the Stored Procedures that actually take longer to execute than a standard query and lock the entire database before commit.

    I ran into those on a site that sold paper products. Took a bonfire to get it fixed.

  5. Your database might be a redneck if…
    * The database is set to full recovery model, but has never had the transaction log backed up
    * The database has never had a full backup
    *There ARE regular backups scheduled, but amazing is set to overwrite the same backup file each time… which is located on the same drive as the data files, and the log files, and the tempdb data and log files.

  6. How soon will you update your blog? I’m interested in reading some more information on this issue.

  7. […] final note. It is a definite database smell for an application to be joining tables on long text fields and will likely be the source of some […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: