This section provides configuration options that affect the Modeling functionality in MySQL Workbench.
Use the When Deleting Physical Model Figures in
Diagram section to determine the behavior when deleting
objects from the EER diagram canvas. Choose Ask
and whenever you delete an object, you will be asked whether you
wish to remove the object from an EER diagram only or also from
the catalog. The Keep Database Object in
Catalog is the safest option. You also have the option
of deleting the object from both the EER diagram and the catalog.
If you choose the Ask option, a confirmation
dialog box opens only when you are deleting an object from an
EER Diagram. When deleting in the MySQL Model view, there is
no confirmation dialog window
and the delete action always removes the object from the
catalog.
There are a variety of ways to delete an object from an EER
canvas: using the eraser tool; choosing a
pop-up menu item; using the delete key; and by choosing the delete
option from the Edit menu. In each case, the
action performed by the delete key is determined by the option
chosen from the When Deleting Physical Model Figures in
Diagram section.
Use the Model tab to set the default value for various object names and the primary key data type. The following table shows the object names and their default values.
| Object Name | Default Value |
|---|---|
PK Column Name | id%table% |
PK Column Type | INT |
Column Name | %table%col |
Column Type | VARCHAR(45) |
FK Name | fk%stable_%dtable% |
Foreign Key Column Name | %table%_%column% |
ON UPDATE | NO ACTION |
ON DELETE | NO ACTION |
Associative Table Name | %stable%_has_%dtable% |
The PK Column Name, PK Column Type, Column Name, and Column Type values are the defaults used by the table editor, and only function on Microsoft Windows and Mac OS X. The others are the default names used when using the relationship tools on an EER diagram.
Within object values items enclosed by percentage signs are variables. Their meanings are as follows:
%table%: The table associated with the
object
%stable%: The source table associated with
the object
%dtable%: The destination table associated
with the object
%column%: The column associated with the
object
Legitimate values for the foreign key update or delete rules are:
RESTRICT
CASCADE
SET NULL
NO ACTION (default)
For more information about these actions, see Section 7.7.1.3.4, “The Foreign Keys Tab”.

User Comments
Add your own comment.