| 361 |
Extension routines in the schema "public" |
Find extensions that routines are in the schema public. |
Problem detection |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 362 |
Prefixes in the names of database objects |
Find for different types of database objects all the prefixes that are used in different names. One should be consistent in naming, including in the use of prefixes. If you use prefix in the name of a database object, then it could refer to the type of the database object. Do not use different prefixes in the names of database objects that have the same type. |
General |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 363 |
Vacuum and analyze status of base tables |
Find for each base table the last time when the table has been vacuumed or analyzed (either manually or automatically). |
General |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 364 |
Coverage by derived tables |
Find for each base table the list of derived tables (both views and materialized views) that refer to the base table. If the database is used through the public database interface (virtual data layer), then, ideally, each table is referred from the subquery of at least one derived table. |
General |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 365 |
Coverage by routines that have the SQL-standard body |
Find for each base table the list of routines (functions and procedures) that refer to the base table. If the database is used through the public database interface (virtual data layer), then, ideally, each table is referred from at least one routine. |
General |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 366 |
Usage of base tables |
Find for each derived table the list of base tables that are used by the derived table. |
General |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 367 |
Domain usage in base tables |
Find for each domain the number of usages in base tables. The less you have managed to reuse domains in case of different columns, the more you have wasted your time by creating the domains. |
General |
INFORMATION_SCHEMA only |
2025-11-07 10:11 |
MIT License |
View |
| 368 |
The number of SQL-language routines with different types of bodies |
Find for each user schema that contain a SQL-language routine how many of these have the body that is string literal and how many have the body (possible starting from PostgreSQL 14) that is parsed at the routine definition time. Try to be consistent, i.e., use the same solution in case of all the routines. |
Sofware measure |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 369 |
Number of underlying tables of derived tables |
Find for each view or materialized view the number of tables based on which the derived table has been directly defined. These tables could be base tables or derived tables. |
Sofware measure |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 370 |
Unused foreign data wrappers |
Find foreign data wrappers that do not have any associated foreign servers. |
Problem detection |
INFORMATION_SCHEMA only |
2025-11-07 10:11 |
MIT License |
View |
| 371 |
Foreign key columns that are associated with a sequence generator |
Find foreign key columns that are associated with a sequence generator. Foreign key values are selected amongst the values that are registered as corresponding primary key/unique key values. Values in the foreign key columns are not directly generated by the system. These values might be system generated indirectly - generated when a row is added to the primary (parent) table. |
Problem detection |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 372 |
Foreign key column has a simple check constraint that is attached directly to the table |
Find foreign key columns that are covered by a simple check constraint, i.e., the constraint involves only one column. Look only constraints that are directly associated with the table, i.e., are not specified through a domain. Perhaps the constraint should be defined on the referenced candidate key column. |
Problem detection |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 373 |
Foreign key columns that have no index |
Find foreign key columns that do not have an index. Foreign key columns are often used for performing join operations. It is useful to index such columns. |
Problem detection |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 374 |
Foreign key columns that do not have an integer or varchar type |
Find foreign key columns that do not have smallint, integer, bigint, or varchar(n) type. These are the most commonly used types in case of key/foreign key columns. Although the use of other types would be perfectly legal as well, make sure that you have selected the best possible data type for each and every column. |
General |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 375 |
Optional foreign key columns |
Find foreign key columns that do not have the NOT NULL constraint. It is better to limit the use of NULLs and optional columns due to the problems that it causes in interpreting the query results, making queries, and enforcing constraints. In addition, one should check as to whether this kind of design is consistent with the multiplicities in the conceptual data model. |
General |
INFORMATION_SCHEMA only |
2025-11-07 10:11 |
MIT License |
View |
| 376 |
Foreign key column has a default value that is not present in the parent table |
Find foreign key columns that have a default value that is not present in the parent table. Identify default values that cause violations of the referential constraints. |
Problem detection |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 377 |
Gratuitous context in the names of foreign key columns |
Find foreign key columns that name contains twice the name of the referenced (primary) table. |
Problem detection |
system catalog base tables only |
2025-11-07 10:12 |
MIT License |
View |
| 378 |
Too generic names (foreign key columns) |
Find foreign key columns with the names like id, identifikaator, code, kood, number, etc. The names should have a prefix or a suffix that describes the nature of relationship with the referenced table or at least referes to the referenced table. These are too generic names. |
Problem detection |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 379 |
Some candidate key values cannot be used as foreign key values |
Find foreign key constraints in case of which some candidate key values cannot be used as foreign key values. Primary key/unique columns and foreign key columns should have the same data type and field size. If, for instance, the primary key column has type INTEGER and foreign key column has type SMALLINT, then one cannot use all the primary key values as foreign key values. |
Problem detection |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 380 |
Inconsistent use of plural and singular in table names in the context of a relationship (English version) |
Find foreign key constraints in case of which the name of one of the tables is in plural and the name of another table is in singular. |
Problem detection |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |