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 level
Objects to be verified
Comment
Error
Table Name Uniqueness
checks 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
checks if each table within the diagram owns at least one column;
Warning
Index Definition
checks if each table within the diagram owns at least one index;
Warning
Primary Key Definition
checks if a primary key is defined for each table within the diagram;
Warning
Reference Definition
checks if each table within the diagram is linked with other tables;
Error
Auto-increment columns
checks 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
checks 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
checks if each auto-increment column within a table is a part of a primary key;
Table Indexes
Error
Index Name Uniqueness
checks 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
checks if each table column is indexed only once;
References
Error
Reference Column Data Types
checks whether the linked columns are of the same data type for each diagram reference;
Domains
Error
Domain Name Uniqueness
checks diagram for the uniqueness of each domain name within a schema.
Stored Routine
Error
Stored Routine Name Uniqueness
checks 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
checks 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
checks 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.