Databases Reference
In-Depth Information
As the generated queries could be large and take much of the on-screen room, the
$cfg['MaxCharactersInDisplayedSQL'] acts as a limit. Its default value of 1000
should be a good balance between seeing too few and seeing too many of the queries,
especially when doing large imports.
It is important to examine the phpMyAdmin feedback to ascertain the validity of the
operations we make through the interface. This way, we can detect errors like typos
in the names, or creation of a table in the wrong database. phpMyAdmin retrieves
error messages from the MySQL server and displays them on the interface.
Creating our first table
Now that we have a new database, it's time to create a table in it. The example table
we will create is named book .
Choosing the columns
Before creating a table, we should plan the information we want to store. This is
usually done during database design. In our case, a simple analysis leads us to the
following book-related data we want to keep:
• International Standard Book Number (ISBN)
• Title
• Number of pages
• Author identiication
For now, it is not important to have the complete list of columns for our book table.
We will modify it by prototyping the structure now and refining it later. At the end
of the chapter, we will add a second table, author , containing information about
each author.
Creating a table
We have chosen our table name and we know the number of columns. We enter this
information in the Create table dialog and click on Go to start creating the table.
At this point, it does not matter if the number of columns is exactly known, as a
subsequent panel will permit us to add columns while creating the table.
 
Search WWH ::




Custom Search