Database Designer for PostgreSQL

Check Diagram

 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 levelObjects to be verifiedComment
ErrorTable Name Uniquenesschecks the diagram for the uniqueness of each table name within a schema;
WarningTable Name Max LengthPostgreSQL allows only 63 characters in table names and cuts names if they are longer than this;
WarningColumn Definitionchecks if each table within the diagram owns at least one column;
WarningIndex Definitionchecks if each table within the diagram owns at least one index;
WarningPrimary Key Definitionchecks if a primary key is defined for each table within the diagram;
WarningReference Definitionchecks if each table within the diagram is linked with other tables;
ErrorAuto-increment columnschecks 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

ErrorColumn Name Uniquenesschecks diagram tables for the uniqueness of each column name within the table;
WarningColumn Name Max LengthPostgreSQL allows only 63 characters in column names and cuts names if they are longer than this;
WarningAuto-increment Column Definitionchecks if each auto-increment column within a table is a part of a primary key;

Table Indexes

ErrorIndex Name Uniquenesschecks diagram tables for the uniqueness of each index name within the table;
WarningIndex Name Max LengthPostgreSQL allows only 63 characters in index names and cuts names if they are longer than this;
WarningDuplicate Index Columnchecks if each table column is indexed only once;

References

ErrorReference Column Data Typeschecks whether the linked columns are of the same data type for each diagram reference;

Domains

ErrorDomain Name Uniquenesschecks diagram for the uniqueness of each domain name within a schema.

Stored Routine

ErrorStored Routine Name Uniquenesschecks diagram stored procedures and functions for the uniqueness of name within a schema.
WarningStored Routine Name Max LengthPostgreSQL allows only 63 characters in stored routine names and cuts names if they are longer than this;

Views

ErrorView Name Uniquenesschecks diagram stored procedures and functions for the uniqueness of name within a schema.
WarningView Name Max LengthPostgreSQL allows only 63 characters in stored routine names and cuts names if they are longer than this;
ErrorView was created on a not existing tablechecks existence of tables, which are used in the view;
ErrorView was created on a not existing columncheck 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