Databases Reference
In-Depth Information
Another step is necessary in order to see the consequences of a missing index
during the exercise. We go back to the
Structure
for the
book
table and remove the
combined index we created on
author_id
and
language
columns.
The foreign key system in
InnoDB
maintains integrity between the related tables.
Hence, we cannot add a non-existent author ID to the
book
table. In addition, actions
are programmable when
DELETE
or
UPDATE
operations are performed on the master
table (in our case,
book
).
Opening the
book
table on its
Structure
page and entering the
Relation view
, now
displays a different page:
This page provides us the following information:
• There is an internal relation deined for
author_id
to the
author
table.
• No
InnoDB
relations are defined yet.
• We will be able to remove the internal relation, when the same relation has
been defined in
InnoDB
. Indeed, hovering over the question mark next to
Internal relations
displays the following message:
An internal relation is
not necessary when a corresponding FOREIGN KEY relation exists
. So, it
will be better to remove it.
Search WWH ::
Custom Search