Prev | Current Page 169 | Next

Marc Delisle

"Mastering phpMyAdmin 2.11 for Effective MySQL Management"

This message can be seen when moving the mouse
over the small bulb light. In fact, phpMyAdmin advises us that the internal
relation is not necessary when it also exists in InnoDB, so it would be better
to remove it.
ON DELETE and ON UPDATE options are available for InnoDB relations.
The page might also tell us that our MySQL version is not up to date. (It needs to
be 4.0.13 or later.) If we have a version prior to 4.0.13, we won't be able to remove
a relation defined in InnoDB, due to a lack of support for the ALTER TABLE ??¦ DROP
FOREIGN KEY statement. This is why phpMyAdmin could be giving us this friendly
(and crucial!) advice.
In the possible choices for the related key, we see the keys defined in all InnoDB
tables of the same database. (Creating a cross-database relation is currently not
supported in phpMyAdmin.) We even see the keys defined in the current table,
because self-referring relations are possible. We now remove the internal relation for
the author_id field and hit Save. We would like to add an InnoDB-type relation for
the author_id field, but we cannot??”we see the No index defined! message on this
line. This is because foreign key definitions in InnoDB can be done only if both fields
are defined as indexes.
Other conditions regarding constraints are explained in the MySQL
manual; please refer to http://dev.


Pages:
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181