PHP/MySQL : Creating a MySQL Table
Jean-Guillaume Birot
Preparing the Database
Before creating the database, we need to do some planning. First of all, we will create a
table. A table represents an entity, i.e. a set of attributes or objects.
For our first table, we will deal with magazine articles. Each entity instance, i.e. each article, will be defined by a set
of attributes that will form our table columns. And each article will occupy a table row.
Here is the list of attributes that define an article:
- A unique identification number that will individually identify each article of the database.

- A title.

- An author name.

- A short introductory paragraph, which will be used in summary pages.

- A short descriptive paragraph, which will be used to briefly describe the article.

- The body of the text, i.e. the content of the article.

- The name of an image file to illustrate the article.

- A topic chosen from a list (Current Events, Music, etc.).

- An article category, also chosen from a list.

- A creation or last modification date.

- A variable of the yes or no type, to specify whether or not the article should be displayed (in the summary, for instance).
