17.06.2013 Views

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 8: Being Normal: Normalization and Other Basic Design Issues<br />

This will essentially evaluate each character that the user is trying to enter in the PartNo column of our<br />

table. The first character will have to be 0 through 9 , the second A through Z (an alpha), and the next<br />

four will again have to be numeric digits (the 0 through 9 thing again). We just enter this into the text<br />

box labeled Expression. In addition, we’re going to change the default name for our constraint from<br />

CK_Products to CKPartNo, as shown in Figure 8-33.<br />

That didn’t take us too long — and we now have our first database that we designed!!!<br />

This was, of course, a relatively simple model — but we’ve now done the things that make up perhaps<br />

90 percent or more of the actual data architecture.<br />

Summary<br />

Figure 8-33<br />

Database design is a huge concept, and one that has many excellent books dedicated to it as their sole<br />

subject. It is essentially impossible to get across every database design notion in just a chapter or two.<br />

In this chapter, I have, however, gotten you off to a solid start. We’ve seen that data is considered normalized<br />

when we take it out to the third normal form. At that level, repetitive information has been<br />

eliminated and our data is entirely dependent on our key — in short, the data is dependent on: “The key,<br />

the whole key, and nothing but the key.” We’ve seen that normalization is, however, not always the right<br />

answer — strategic de-normalization of our data can simplify the database for users and speed reporting<br />

performance. Finally, we’ve looked at some non-normalization related concepts in our database design,<br />

plus how to make use of the built-in diagramming tools to design our database.<br />

In our next chapter, we will be taking a very close look at how <strong>SQL</strong> <strong>Server</strong> stores information and how to<br />

make the best use of indexes.<br />

259

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!