Chapter 16. WORKING WITH MULTIPLE TABLES

In Chapter 14, I explained that an important principle of working with a relational database was the need to break larger units, such as addresses or names, into their component elements and store them in separate columns. Another equally important principle is to get rid of columns that contain repetitive data and move them to a separate table. As long as each record has a primary key to identify it, records in separate tables can be linked by storing the primary key from one table as a reference in the other. This is known as creating a foreign key.

The advantage of doing this is that it eliminates inconsistency. Let's say you're creating a product catalog, you might spell a company name in different ways. ...

Get The Essential Guide to Dreamweaver CS3 with CSS, Ajax, and PHP 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.