Database Reference
In-Depth Information
The browseable foreign-table window
Our current
author
tables have very few entries. Thus, to illustrate this mechanism,
we will set the
$cfg['ForeignKeyMaxLimit']
to an artificially low number, 1. Now
in the
Insert
mode for the
book
table, we see a small table-shaped icon for
author_id
.
This icon opens another window, which will present the values of the table
author
and a
Search
input field. On the left, the values are sorted by key value (here, the
author_id
column), and on the right, they are sorted by description.
Choosing one of the values (by clicking either a key value or a description) closes this
window and brings the value back to the
author_id
column.
Referential integrity checks
We discussed the
Operations
subpage and its
Table maintenance
section, in
Chapter 10. For this exercise, we suppose that both the
book
and
author
tables
are not under the control of the InnoDB or PBXT storage engine. If we have
defined an internal relation for the
author
table, a new choice appears for the
book
table—
Check referential integrity
.
A link (
author_id -> author.id
) appears for each defined relation, and clicking it
starts verification. For each row, the presence of the corresponding key in the foreign
table is verified and errors, if any, are reported. If the resulting page reports zero
rows, it is good news!
Search WWH ::
Custom Search