Databases Explained (in Five Minutes or Less)

A database is like an electronic filing cabinet that stores related information. You encounter them every day, whether charging a dinner on a credit card or calling Moviefone to get local movie listings. At home, you might have a low-tech database in the form of a filing cabinet containing folders for insurance statements, phone bills, car service records, and so on.

Tables and Records

Databases have an electronic equivalent to filing folders: tables. A table is a container for information about a set of similar items.

In the Cosmo Farmer classified ads database, a table stores information on a list of classified ads. It tracks the names of the products for sale, their prices, short descriptions, and a few other items. Each piece of information, like price, is stored in a column. All the information for each ad (all the columns taken together, in other words) make up a single record, which is stored in a row (see Figure 21-7).

This diagram shows the structure of the Ads table, in which four records are stored. Each row in a table represents a single record or item, while each piece of information for a record is stored in a single field or column.

Figure 21-7.  This diagram shows the structure of the Ads table, in which four records are stored. Each row in a table represents a single record or item, while each piece of information for a record is stored in a single field or column.

If you were designing a database, you’d try to model a table on some real-world item you needed to track. In a database for generating invoices for your business, you might have a ...

Get Dreamweaver MX: The Missing Manual now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.