| 1001 |
The longest referential paths |
Find the longest referential paths between the tables regardless of the schema that contain the tables. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1002 |
The number of compensating actions of foreign key constraints |
Find the number of compensating actions that are specified in case of foreign key constraints. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1003 |
The number of direct and indirect child tables (foreign keys) |
Find the number of direct and all (direct+indirect) child tables of a base table based on the foreign keys. The result may help to classify the data. If the number of direct children is small but the number of all children is large, then the table probably contains classifiers. If both the number of direct and all children is large, then the table probably contains master data. If the number of all children is small, then the table probably contains transactional data, logs, or descriptive information of main entities. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1004 |
The number of direct and indirect child tables (table inheritance) |
Find the number of direct and all (direct+indirect) child tables of a base table based on the table inheritance. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1005 |
The number of referencing base tables |
Find how many base tables reference to a base table by using foreign keys. The more references there are the more impact the change of the table could have to the overall system. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1006 |
The number of rules by different characteristics |
Find the number of rules by event (SELECT, INSERT, UPDATE, and DELETE) and in total. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1007 |
The number of schema objects by schema, by type, and in total |
Find the number of different types of schema objects in different schemas as well as the total number of schema objects. Show the number of objects that belong to an extension as well as the number of (user-defined) objects that do not belong to an extension. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1008 |
The number of table constraints with the cardinality bigger than one |
Find the number of table constraints with the cardinality bigger than one. Find the number, based on the cardinality, constraint type, and cardinality+constraint type. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1009 |
The number of user-defined rules |
Find the number of rules in a database, excluding the rules that are associated with system catalog tables and rules that are created to support views. Rules can be used to maintain data integrity in a database by causing rejection of incorrect insertions and updates. Therefore, the number of rules in a database gives some indications about the state of enforcing constraints at the database level. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1010 |
The number of user-defined rules by schema and in total |
Find the number of rules in a database in different schemas, excluding the rules that are created to support views. Rules can be used to maintain data integrity in a database by causing rejection of incorrect insertions and updates. Therefore, the number of rules in a database gives an indication about the state of enforcing constraints at the database level. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1011 |
The same CHECK has a different name in different places |
Find the names of table CHECK constraints that have the same Boolean expression but a different naming style in different places (tables). The naming of constraints should be consistent. "If you do something a certain way, do all similar things in the same way." (Robert C. Martin, Clean Code)x |
Problem detection |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1012 |
The same CHECK has a different name in different places (2) |
This query audits the database schema to enforce a uniform naming strategy for CHECK constraints. It identifies inconsistencies where constraints enforcing identical Boolean expressions are named using disparate patterns across different tables. To isolate the naming pattern from specific object identifiers, the query normalizes the constraint names by substituting the actual table name with the generic token TABLE. This allows it to detect violations of the "Clean Code" principle of consistency—flagging cases where the same logical rule is implemented with a specific naming convention in one context (e.g., chk_TABLE_column) but a different convention in another (e.g., TABLE_column_check). |
Problem detection |
system catalog base tables only |
2025-11-27 10:17 |
MIT License |
View |
| 1013 |
The size of base tables and their indexes |
Find the size of base tables without indexes, size of the indexes of the table, total size of the table (including its indexes) and percentage of the index size from the total size. If the size of indexes of a table is relatively high, then check as to whether all the indexes are needed. |
General |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1014 |
The storage size of each index (the system catalog excluded) |
Get overview of disk usage. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1015 |
The storage size of each schema data object (the system catalog excluded) |
Get overview of disk usage by different schema objects that contain user data. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1016 |
The storage size of each table (including indexes) (the system catalog excluded) |
Get overview of disk usage. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1017 |
The total size of all indexes (system catalog excluded) |
|
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1018 |
The total size of all tables (system catalog excluded) |
|
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1019 |
The total storage size of all indexes (the system catalog excluded) |
Get overview of disk usage. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 1020 |
The total storage size of the database (the system catalog included) |
Get overview of disk usage. |
Sofware measure |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |