Databases Reference
In-Depth Information
We then click
Save
, and the definition is saved in phpMyAdmin's infrastructure. To
remove the relation, we just come back to the screen, select the double-dash choice,
and hit
Save
.
Defining the Display Field
The primary key of our
author
table is the
author_id
, which is a unique number
that we made up just for key purposes. Another field in our table represents the
authors: the name. It would be interesting to see the author's name as an informative
description of each row of the
book
table. This is the purpose of the
display field
.
We should normally define a display field for each table that participates in a relation
as a foreign table.
We will see how this information is displayed in the
Benefits of the Defined Relations
section. We now go to the Relation view for the
author
table (which is the foreign
table in this case) and specify the display field. We choose
name
as the display field
and click
Save
:
Search WWH ::
Custom Search