Databases Reference
In-Depth Information
We can then proceed to recreate it. To do this, we start by clicking on the
Create
relation
icon:
The cursor then takes the form of a short message saying
Select referenced key
. In
our case, the referenced key is the
id
column of the
author
table; so we bring the
cursor on this column and click on it. A validation is done, ensuring that we chose a
primary or unique key.
Next, having changed the cursor to
Select foreign key
, we bring it to the
author_id
column of the
book
table and click on it again. This confirms the creation of the
relation. Currently, the interface does not permit the creation of compound keys
(having more than one column).
Defining foreign key relations
The procedure to delete or define a relation between
InnoDB
or
PBXT
tables is the
same as that for internal relations. The only exception is that at the time of creation,
a different confirmation panel appears enabling us to specify the
on delete
and
on
update
actions.
Search WWH ::
Custom Search