Specifications

| customers |
| order_items |
| orders |
+-----------------+
5 rows in set (0.06 sec)
You can also use show to see a list of databases by typing
mysql> show databases;
You can see more information about a particular table, for example, books, using DESCRIBE:
mysql> describe books;
MySQL will display the information you supplied when creating the database:
+--------+------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+------------+------+-----+---------+-------+
| isbn | char(13) | | PRI | | |
| author | char(30) | YES | | NULL | |
| title | char(60) | YES | | NULL | |
| price | float(4,2) | YES | | NULL | |
+--------+------------+------+-----+---------+-------+
4 rows in set (0.05 sec)
These commands are useful to remind yourself of a column type, or to navigate a database that
you didnt create.
MySQL Identifiers
There are four kinds of identifiers in MySQLdatabases, tables, and columns, which were
familiar with, and aliases, which well cover in the next chapter.
Databases in MySQL map to directories in the underlying file structure, and tables map to
files. This has a direct effect on the names you can give them. It also affects the case sensitivity
of these namesif directory and filenames are case sensitive in your operating system, data-
base and table names will be case sensitive (for example, in UNIX), otherwise they wont (for
example, under Windows). Column names and alias names are not case sensitive, but you cant
use versions of different cases in the same SQL statement.
As a side note, the location of the directory and files containing the data will be wherever it
was set in configuration. You can check the location on your system by using the mysqladmin
facility as follows:
mysqladmin variables
Creating Your Web Database
C
HAPTER 8
8
CREATING YOUR
WEB DATABASE
199
11 7842 CH08 3/6/01 3:38 PM Page 199