CHAPTER 4

image

The Database

. . . database design in general is still mostly an artistic endeavor, not a scientific one . . .

—C. J. Date, Date on Database

UNIONs are usually not well optimized. . . . If possible, use UNION ALL instead.

—Joe Celko's SQL Programming Style

Never specify ALL.

—C. J. Date, SQL and Relational Theory

It seems that database design is an art and SQL technique is a matter of opinion. In this chapter I try to give you some guidelines that will help you with the art. You’ll also get my opinions about SQL. As you’ll learn, I’m not an SQL aficionado like Joe Celko, and certainly not a theoretician like Chris Date. I do ...

Get Expert PHP and MySQL: Application Design and Development 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.