Simply put, databases store information. You encounter them every day in one way or another, whether searching Amazon.com for new books, or updating your Facebook profile.
A database is like an electronic filing cabinet that stores related information. At home, you might have a filing cabinet that stores the bits and pieces of your life: a folder labeled “Insurance,” for example, in which you keep information about the various insurance policies you carry. Other folders might contain information on phone bills, car service records, and so on. Databases work more or less the same way, as the following sections explain.
Databases use an electronic equivalent to filing folders: tables. A table is a container that holds information about a set of similar items. In the CosmoFarmer online store database, one table stores information on all the products the site sells, for example.
This Products table tracks certain information—the name of the product for sale, its price, a short description, and a few other items. The table stores each piece of information, like price, in a column. All the information for each product (all the columns taken together, in other words) makes up a single record, which the table stores in a row (see Figure 23-8).
Figure 23-8. This diagram shows part of CosmoFarmer’s Products table’s structure, with information for ...