EPUB | CHM | PDF

How to Find Errors in a Diagram

Top Previous Next

The Check Diagram tool of the Database Designer for PostgreSQL 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 press F4 or select the Diagram | Check Diagram menu item.

Use the Select diagram drop-down list to select the diagram from the list of currently opened diagrams.

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 schema;

Warning "Table Name Max Length"

PostgreSQL allows only 63 characters in table names and cuts names if they are longer than this;

Warning "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 PostgreSQL will not allow such table to be created;

Table Columns

Error "Column Name Uniqueness"

Check diagram tables for the uniqueness of each column name within the table;

Warning "Column Name Max Length"

PostgreSQL allows only 63 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"

PostgreSQL allows only 63 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

Error "Reference Column Data Types"

Check whether the linked columns are of the same data type for each diagram reference;

Domains

Error "Domain Name Uniqueness"

Check diagram for the uniqueness of each domain name within a schema.

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"

PostgreSQL allows only 63 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"

PostgreSQL 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.

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

See also:
Diagram Objects: Table Editor | Column Editor | Reference Editor | Index Editor