Databases Reference
In-Depth Information
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
sub-page 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
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 (here,
author_id -> author.id
) appears for each defined relation, and clicking
it starts a verification. For each row, the presence of the corresponding key in the
foreign table is verified, and any errors are reported. If the resulting page reports
zero rows, this is good news!
This operation exists, because for non-InnoDB tables, MySQL does not enforce
referential integrity, and neither does phpMyAdmin. It is perfectly possible, for
example, to import data in the
book
table with invalid values for
author_id
.
Automatic Updates of Metadata
phpMyAdmin keeps the metadata for internal relations synchronized with every
change that is made to the tables via phpMyAdmin. For example, renaming a column
that is part of a relation would make phpMyAdmin rename it also in the metadata
for the relation. The same thing happens when a column or a table is dropped.
Metadata should be manually maintained in case a change in the
structure is done from outside phpMyAdmin.
Search WWH ::
Custom Search