EPUB | CHM | PDF

Check Diagrams

Top Previous Next

The Check Diagram tool of the Database Designer for MySQL allows you to check your database diagram for most typical errors and defects. The result of the check goes in a well structured form, using which you can easily bring your diagram to correspondence with the common standards of database modeling.

To open the Check Diagram dialog use the Check Diagram ( check-model ) item on Diagram tab of the Ribbon or press F4.

dialog-check-diagram

Use the Select diagram drop-down list to select the diagram from the list of currently opened diagrams. Current opened diagram is selected by default.

The tree list below allows you to select what warnings and errors should be taken into account during the check. All warnings and errors are divided into categories, which correspond to the diagram objects. Remove selection from the warning/error or from the whole category to exclude it from the check.

These are the descriptions for all available warnings and errors.

Table

Error "Table Name Uniqueness"
Check the diagram for the uniqueness of each table name within a diagram.

Warning "Table Name Max Length"
MySQL allows only 64 characters in table names and cuts names if they are longer than this.

Error "Column Definition"
Check if each table within the diagram owns at least one column.

Warning "Index Definition"
Check if each table within the diagram owns at least one index.

Warning "Primary Key Definition"
Check if a primary key is defined for each table within the diagram.

Warning "Reference Definition"
Check if each table within the diagram is linked with other tables.

Error "Auto-increment columns"
Check if each table within the diagram has no more than one auto-increment column, as otherwise MySQL will not allow such table to be created.

Error "Trigger Times and Events"
Check if every trigger in each table within diagram has unique Time and Event combination.

Table Columns

Error "Column Name Uniqueness"
Check diagram tables for the uniqueness of each column name within the table.

Warning "Column Name Max Length"
MySQL allows only 64 characters in column names and cuts names if they are longer than this.

Warning "Auto-increment Column Definition"
Check if each auto-increment column within a table is a part of a primary key.

Table Indexes

Error "Index Name Uniqueness"
Check diagram tables for the uniqueness of each index name within the table.

Warning "Index Name Max Length"
MySQL allows only 64 characters in index names and cuts names if they are longer than this.

Warning "Duplicate Index Column"
Check if each table column is indexed only once.

References

Warning "Reference Table Type"
Check if both linked tables use storage engine that supports references (for example InnoDB or Falcon) for each diagram reference.

Error "Reference Column Data Types"
Check whether the linked columns are of the same data type for each diagram reference.

Error "Reference Column does not exists"
Check an existence of referenced column in parent table for each diagram reference.

Error "Reference Name uniqueness"
Check diagram references for uniqueness of each reference name.

Error "Check "SET NULL" FK-action for NOT NULL column"
MySQL does not allow SET NULL action for foreign keys that reference column marked with NOT NULL attribute.

Domains

Error "Domain Name Uniqueness"
Check diagram for the uniqueness of each domain name within a diagram.

Stored Routine

Error "Stored Routine Name Uniqueness"
Check diagram stored procedures and functions for the uniqueness of name within a schema.

Warning "Stored Routine Name Max Length"
MySQL allows only 64 characters in stored routine names and cuts names if they are longer than this

Views

Error "View Name Uniqueness"
Check diagram stored procedures and functions for the uniqueness of name within a schema.

Warning "View Name Max Length"
MySQL allows only 63 characters in stored routine names and cuts names if they are longer than this.

Error "View was created on a not existing table"
Check existence of tables, which are used in the view.

Error "View was created on a not existing column"
check existence of table columns, which are used in the view.

After you click OK the check process will be displayed within the Output window and the result of the check will be displayed within the Result window in the same categorized view as described above.

dialog-check-result-list

Double-click on a warning or an error in the list opens the editor window for the appropriate object (Table Editor, View Editor, Domain Manager and so on).

See also:
Interface User Guide: Docking Windows
Diagram Objects: Table Editor | Column Editor | Domain Manager | Reference Editor | Index Editor | Stored Routine Editor | Trigger Editor | View Editor