4.2. Creating the Catalog Database

The core of an online catalog is a database that stores product information. Essentially, the database is the catalog. The database stores the product names, ordering numbers, description, price, and any other relevant information, such as size, color, and so on.

4.2.1. Designing the Catalog database

Your first design task is to select the information you want to store. What you store depends on the type of product. You need to store any information that a customer might use when deciding which product to purchase. The store owner, who knows the products and what customers need to know, can provide this information along with graphics of the products. Some possible information to store might include

  • Product name: A descriptive name so the customer knows what the product is.

  • Product ID: In most cases, the product name isn't unique, so you usually need to store a product number, a unique number that identifies the product.

  • Product description: A text description of the product.

  • Size: A product might come in sizes. Even when only one size is available, customers need information about the size for some purposes. For instance, you might have only one size coffee table for sale, but the customers still need to know the size so they can figure out whether it will fit in their living rooms.

  • Color: A product might come in several colors.

  • Price: Customers will surely want to know how much the products cost!

  • Product availability: Customers might also like to ...

Get PHP & MySQL® Web Development All-in-One Desk Reference for Dummies® 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.