Seq nr | Name | Goal▲ | Type | Data source | Last update | License | ... |
---|---|---|---|---|---|---|---|
941 | Cycle in a hierarchy | There should not be cycles in hierarchies meaning that the parent must always be specified. In this case a parent must reference to a child or to itself, otherwise it cannot be registered. | Problem detection | system catalog base tables only | 2021-02-25 17:30 | MIT License | |
942 | PL/pgSQL functions without the RETURN clause | The return value of a function cannot be left undefined. If control reaches the end of the top-level block of the function without hitting a RETURN statement, a run-time error will occur. This restriction does not apply to functions with output parameters and functions returning void, however. In those cases a RETURN statement is automatically executed if the top-level block finishes. It also does not apply to trigger functions that only task is to raise an exception. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-10-29 11:13 | MIT License | |
943 | Duplicate CHECK constraints that are connected to a domain | The same domain should not have multiple CHECK constraints with exactly the same Boolean expression. Do remember that the same task can be solved in SQL usually in multiple different ways. Thus, the exact copies are not the only possible duplication. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
944 | Duplicate CHECK constraints that are connected directly to a table | The same table should not have multiple CHECK constraints with exactly the same Boolean expression. Do remember that the same task can be solved in SQL usually in multiple different ways. Thus, the exact copies are not the only possible duplication. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
945 | Logical size of a schema | The schema size is the sum of the sizes of all tables in the schema. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2022-10-21 16:18 | MIT License | |
946 | Disabled system triggers (i.e., disabled enforcement of constraints) | These triggers should be enabled because otherwise some important functionality regarding constraints like enforcing referential integrity does not work. | Problem detection | system catalog base tables only | 2021-03-12 15:06 | MIT License | |
947 | Logical size of a table | The table size is the sum of the total size of the simple columns and the total size of the complex columns in the table. In case of SQL databases large base tables in terms of number of columns could be a side effect of the problems with cloned columns or multiple columns for the same attribute. A base table with a low normalization level, which is meant to hold data that corresponds to multiple entity types has typically also relatively large number of columns compared with other base tables. Thus, the normalization level of base tables with a large number of columns should be checked as well. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2022-10-21 16:17 | MIT License | |
948 | Pointlessly returned value | The value that is returned by a function should depend on something. If you do not have anything meaningful to return (for instance, the function always returns true, false, NULL, or the same number), then write VOID instead of the return type. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-11-04 15:01 | MIT License | |
949 | Referential degree of tables | This metric represents the number of foreign keys in a base table. | Sofware measure | INFORMATION_SCHEMA only | 2021-03-12 11:07 | MIT License | |
950 | Perhaps too many input parameters | Too many parameters (in this case four or more) could be a sign of not separating concerns and having a routine that has more than one task. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-19 15:07 | MIT License | |
951 | FILLFACTOR is probably too small | Too small fillfactor wastes storage space. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-11-02 10:43 | MIT License | |
952 | Wrong comment - trigger function does not implement a database operation | Trigger functions should not contain references to database operations. Perhaps the trigger implements ensuring some invariant of the operation but it does not implement the operation itself. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
953 | The number of user-defined triggers by schema, by type, and in total | Triggers can be used to maintain data integrity in a database by causing rejection of data that does not conform to certain rules. Therefore, the number of triggers in a database gives an indication about the state of enforcing constraints at the database level. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2020-11-06 14:51 | MIT License | |
954 | The number of user-defined triggers | Triggers can be used to maintain data integrity in a database by causing rejection of data that does not conform to certain rules. Therefore, the number of triggers in a database gives some indications about the state of enforcing constraints at the database level. The query does not count internal triggers. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2020-11-06 14:51 | MIT License | |
955 | Do not leave out the referential constraints (islands) | Try to find missing foreign key constraints. Find base tables that do not participate in any referential constraint (as the referenced table or as the referencing table). These tables are like "islands" in the database schema. | Problem detection | system catalog base tables only | 2021-03-10 12:20 | MIT License | |
956 | Do not leave out the referential constraints (based on column names) (2) | Try to find missing foreign key constraints. Find columns of base tables that are not a part of any primary key, unique, and foreign key constraint, but have a name that reffers to the possibility that these are used to record references to a user. Exclude columns that have the default value CURRENT_USER or SESSION_USER. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-30 10:29 | MIT License | |
957 | Do not leave out the referential constraints (based on column names) | Try to find missing foreign key constraints. Find columns of base tables that are not a part of any primary key, unique, and foreign key constraint, do not have an associated sequence generator, but have a name that reffers to the possibility that these are used to record some kind of codes or id's. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-26 16:35 | MIT License | |
958 | Do not leave out referential constraints (based on composite keys) | Try to find missing foreign key constraints. Find columns of base tables that are not covered by any foreign key constraint but belong to a composite key, do not have an associated sequence generator, and have a name that refers to the possibility that these are used to record some kind of codes or id's. Moreover, there must be at least one other base table that has a column with the same name. Such strategy would find missing constraints in tables that implement many-to-many relationship types but which that are not complete "islands" in terms of missing foreign key constraints. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-10-31 19:21 | MIT License | |
959 | Do not leave out the referential constraints (based on adjacency list design) | Try to find missing foreign key constraints. Find non-key and non-foreign key columns of base tables that do not have an associated sequence generator, and that name refers to the possibility that the column holds parent identifiers. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-03-18 11:13 | MIT License | |
960 | Do not leave out the referential constraints (pairs of tables) | Try to find missing foreign key constraints. Find pairs of base table columns that have the similar name, perhaps the same type, and that are not associated through a foreign key relationship. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:29 | MIT License |