Databases Reference
In-Depth Information
Figure 8-8
In summary, denormalizing a structure should be carefully considered. Remember that the purpose of
normalization is to minimize data anomalies. Therefore, as you denormalize a structure, it becomes more
susceptible to those anomalies.
WrapUp
A few more words about normalization are in order. In applications of any size, there's usually one
or more DBAs and developers. These two groups have very different opinions concerning normaliza-
tion. Generally speaking, the more normalized a database is, the more difficult it is to program against.
Let's face it: programming against one table is easier than programming against three. Therefore, some
developers advocate less normalized forms of data structures.
Please realize that making a developer's job easier is not the goal. The goal is to make a high performance
database structure that is durable and scalable.
Also realize that application design and database design are two different but interconnected activities.
Relational database design is founded on the mathematical principles of set theory. Application design
is founded on object-oriented principles. These foundations are not the same. In fact, this difference
has become known as the object-relational impedance mismatch. The Wiley publication Agile Database
Techniques by Scott Ambler explores this topic in great detail. The point is that when designing a robust,
durable system both application designers and database designers share an equal part in delivering a
successful product. This means that application designers should not dictate database structures, and
equally true database designers should not dictate object design.
DefiningColumns
The next step in maximizing data quality concerns defining columns. Issues such as data types, nullabil-
ity, primary and foreign key constraints, as well as several others are covered in this section.
DataTypes
One of the most important aspects of designing a database is choosing the correct data type for the
columns. This may seem trivial, but choosing the right type can make a huge difference in storage and
processing requirements. The goal is to maximize the number of rows that can fit onto one data page.
There are a few points to remember when it comes to choosing the correct data type.
Search WWH ::




Custom Search