Sunday, January 4, 2009

Why good database design matters

Everybody has filled out forms that go into a computer. They typically start by asking for your first name, middle name, last name, and address. Once you fill out the form somebody types it into the computer, hopefully correctly. But even with these simple pieces of information problems arise.

Lots of people don't use the first name that appears on their birth certificate. Someone who's legal first name is Gerald might fill out the form using Jerry as their first name. Or they may prefer to be called Mike or Ron.

Lots of people have multiple middle names. Some have no middle name.

A few people in the world don't have a last name. Many people change their last name when they marry. In some cultures people have two last names and may use one or both depending on how formal they are.

Some of the richer people on the planet have multiple addresses. Some people have no fixed address but can get mail sent to a friend.

All of these real-world complexities don't fit onto most forms, and what gets written on the form goes into the computer. Now the problems start. Is Gerald Jones the same person as Jerry Jones already in the computer? Is Ron R. Smith-Klein the same person as Ronald Klein?

Designing a database that can handle real-world complexities takes a lot of thought. Thought takes time. Time costs money. So many businesses take the cheaper route and design a database that handles most of the situations they see and ignore or manually handle the exceptions. As a result the vast majority of the databases on the planet have incorrect data in them. They then spread this information to other databases, which compounds the problems.

Bad database design is why dogs get credit card applications and voter registration cards. Bad database design means people with health insurance get huge bills from hospitals because the name on the hospital form doesn't match the health insurance records. Bad database design prevents people without a permanent address from voting but allows credit card scammers to have 42" plasma TV sets sent to empty houses.

Good database design is hard work, but in my opinion worth it.

3 comments:

Misti said...

I agree completely, and when you run the Universe, my dead cat will no longer be voting. :p

Unknown said...

Actually I was counting on your dead cat's vote to become ruler of the universe. Without her vote I only have 3 votes, and that just isn't enough.

Misti said...

I can promise you two dead cat votes, then.