Common design mistakes
The previous modules in this course described the logical design, physical design, and, to a lesser extent, implementation stages of the DBLC. This module offers a number of insights into the overall design process by identifying common design mistakes and providing tips on how to avoid them.
After you have completed this module, you should be able to:
- List the four areas of common design mistakes
- Describe mistakes associated with business objects and business rules
- Describe mistakes associated with columns
- Describe mistakes associated with constraints and keys
- Describe mistakes associated with relationships
and referential integrity
- Describe mistakes associated with international issues
- Interpret the statement: "There are no wrong databases, just useless ones."
Lack of Preparation
Database design is often one of the first steps in development. It is only natural for developers to want to rush ahead and get some
serious coding done. That gives them something to show management to prove that they are developing software.
Writing application software that maps to the ERD models is more fun than working on plans, designs, use cases, documentation, and all the other things that you need to do before you can roll up your sleeves and get to work.
Before you start cranking out tables and code, you need to do your homework. Some of the things
you need to do before you start wiring up the database include:
- Make sure you understand the problem.
- Write requirements documents to state the problem.
- Build use cases to see if you have solved the problem.
- Design a solution.
- Test the design to see if it satisfies the use cases.
- Document everything.
Database Design and Theory
This is part of preparation but is so important and under-appreciated that deserves its own section. Many
developers think of documentation as busy work or a chore to keep managers who have no real talents
off their backs while they build elegant data structures of intricate beauty and complexity.
I confess that occasionally that’s a handy attitude, but the real purpose of documentation is to keep
everyone on the project focused on the same goals.
The documentation should tell people where the project is headed. It should spell out the project’s design decisions so everyone knows how the pieces
will fit together.
If the documentation is weak, different people will make different and often contradicting assumptions.
Eventually those assumptions will collide and you’ll have to resolve the conflict. That will require developers
to go back and fix work that they made under the wrong assumptions. That leads to more work,
more errors, and copious bickering over whose fault it was.
The real fault was poor documentation.
The next lesson lists the four areas of common design mistakes.
Items in a business environment that are related, and about which data need to be stored (e.g., customers, products, orders, etc.)
A set of rules or conditions describing the business polices that apply to the data stored on a company databases.
Part of the structure of a database table; also known as a field or, during early database design, as an attribute.
If the same attribute occurs in more than one table, a relationship exists between those two tables.
The means of maintaining the integrity of data between one or more tables that relate to each other--in other words, that a column of data in a table has a null or matching value in a corresponding table. Referential integrity is usually enforced with foreign keys.
 international issues:
Database design considerations based on other countries differing data standards, alphabets, and writing systems.