Chapter 3. Relational Database Design

IN THIS CHAPTER

  • Introducing entities, tuples, and attributes

  • Conceptual diagramming vs. SQL DDL

  • Avoiding normalization over-complexity

  • Choosing the right database design pattern

  • Ensuring data integrity

  • Exploring alternative patterns

  • Normal forms

I play jazz guitar—well, I used to play before life became so busy. (You can listen to some of my MP3s on my "about" page on www.sqlserverbible.com.) There are some musicians who can hear a song and then play it; I'm not one of those. I can feel the rhythm, but I have to work through the chords and figure them out almost mathematically before I can play anything but a simple piece. To me, building chords and chord progressions is like drawing geometric patterns on the guitar neck using the frets and strings.

Music theory encompasses the scales, chords, and progressions used to make music. Every melody, harmony, rhythm, and song draws from music theory. For some musicians there's just a feeling that the song sounds right. For those who make music their profession, they understand the theory behind why a song feels right. Great musicians have both the feel and the theory in their music.

Designing databases is similar to playing music. Databases are designed by combining the right patterns to correctly model a specific solution to a problem. Normalization is the theory that shapes the design. There's both the mathematic theory of relational algebra and the intuitive feel of an elegant database.

Designing databases ...

Get Microsoft® SQL Server® 2008 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.