If we are using scripts/create_tables_mysql_4_1_2+.sql, we have to remove
these lines:
CREATE DATABASE IF NOT EXISTS `phpmyadmin`
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
USE phpmyadmin;
We are now ready to execute the script. There are two ways of doing this:
As we already have the script in our editor, we can just copy the lines and
paste them in the query box of the SQL sub-page.
Another way is to use the technique shown in Chapter 8 (Importing Structure
and Data), with the SQL sub-page and the file selector. We select the
create_tables.sql script that we just modified.
??? ???
Chapter 11
[ 177 ]
After the creation, the left panel shows us the special pma_ tables along with our
normal tables:
The last step is to adjust all the parameters in config.inc.php that relate to
relational features. Except for the database name in the pmadb parameter, we use the
default values mentioned in the comments inside the file:
$cfg['Servers'][$i]['pmadb'] = 'marc_book';
Defining Relations with the Relation View
After the installation of the linked-tables infrastructure, there are now more options
available in the Database view and the Table view. We will now examine a new link
in the Table view: Relation view. This view is used to:
Define the relations of the current table to other tables
Choose the display field
Because our goal here is to create a relation between the book table (which contains
the author ID) and the author table (which describes each author by an ID), we start
on the Table view for the book table and click the Relation view link.
Pages:
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177