Seq nr | Name | Goal | Type | Data source▲ | Last update | License | ... |
---|---|---|---|---|---|---|---|
141 | Perhaps the type of a base table column/domain should be numeric (based on default values) | Specify for each column/domain a right data type that takes into account expected values in the column/domain. Find base table columns and domains that have a textual type but the default value that represents a number (for instance, '100', '2', or '0.22'). Exclude columns about formats. | Problem detection | INFORMATION_SCHEMA only | 2023-12-30 10:59 | MIT License | |
142 | Perhaps the type of a base table column/domain should be temporal (based on default values) | Find base table columns and domains that have a textual type but the default value that represents a temporal value (either a static value or invocation of a function that returns such value). Specify for each column/domain a right data type that takes into account expected values in the column/domain. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
143 | Perhaps the type of a base table column/domain should be temporal (deadlines) | Find base table columns that name refers to the possibility that there are registered deadlines but the column does not have a temporal type. | Problem detection | INFORMATION_SCHEMA only | 2021-03-21 17:00 | MIT License | |
144 | Perhaps the type of a base table column/domain should be VARCHAR (based on column names) | Find base table columns that have CHAR type, where character maximum length is bigger than 1 and the name of the column does not refer to the possibility that the column holds some kind of codes or flags or hash values. | Problem detection | INFORMATION_SCHEMA only | 2023-11-12 10:48 | MIT License | |
145 | Perhaps the type of a base table column should be an integer type (based on column names) | Find columns of base tables where the name of the column has prefix or suffix "id" or has the name "id" but the column does not have an integer type or uuid type. A convention is to use the phrase "id" in the names of surrogate key columns. | Problem detection | INFORMATION_SCHEMA only | 2023-11-08 13:31 | MIT License | |
146 | Perhaps the type of a base table column should be XML, JSON, or JSONB (based on column names) | Find base table columns that name refers to the possibility that these are used to register XML/JSON values. Find the columns that do not have an appropriate data type (xml, json, jsonb). One shouldn't use columns with a textual type to register such data. | Problem detection | INFORMATION_SCHEMA only | 2021-03-28 15:30 | MIT License | |
147 | Perhaps too many subconditions in a CHECK constraint | Find check constraints of base table and foreign table columns that are either associated with more than one column and have at least one AND operation or are associated with exactly one column and have two or more AND operations. | Problem detection | INFORMATION_SCHEMA only | 2024-01-01 12:23 | MIT License | |
148 | Permitting in a column only empty strings and strings that consist of whitespace characters | Find table CHECK constraints that permit in a column only empty strings or strings that consist of only whitespace characters. | Problem detection | INFORMATION_SCHEMA only | 2021-12-19 15:10 | MIT License | |
149 | Phone number column has an incorrect data type | Find the columns where the name reffers to the possibility that the column contains phone numbers but the type of the column is not VARCHAR or TEXT. | Problem detection | INFORMATION_SCHEMA only | 2021-03-27 19:00 | MIT License | |
150 | Potential duplication of sequence generators | Do not create unnecessary sequence generators. | Problem detection | INFORMATION_SCHEMA only | 2022-11-21 11:01 | MIT License | |
151 | Potentially missing default values of base table columns | Find columns of base tables without a default value that are either Boolean columns that based on the name seem to implement a state machine or temporal columns that based on the name seem to keep registration or update time. These columns often have a default value. | Problem detection | INFORMATION_SCHEMA only | 2023-11-15 17:03 | MIT License | |
152 | Potentially unused sequence generators | Find sequence generators that are not associated with any column through the default value mechanism. Please note, that it is also possible to refer to a sequence generator from a routine or from an application. If these are indeed not used, then these should be dropped, otherwise these are dead code. | Problem detection | INFORMATION_SCHEMA only | 2021-03-07 20:56 | MIT License | |
153 | Precision of a timestamp or a time column is too big | Find columns with a timestamp or a time type where the precision (the permitted maximum number of fractional sections) is bigger than the precision in the default value of the column. | Problem detection | INFORMATION_SCHEMA only | 2023-11-02 17:29 | MIT License | |
154 | Prefixes of base table names | Find base tables that name starts with a prefix. Do not use prefixes in case of base table names. Derive the names from the names of entity types. Do not use "_", "t_", "tab_", "t11_" etc as prefixes of a table. | Problem detection | INFORMATION_SCHEMA only | 2022-11-15 16:32 | MIT License | |
155 | Preventing strings that consist of only spaces instead of strings that consist of only whitespace characters | Find columns of base tables and foreign tables where one uses a check constraint to prevent values that consist of only spaces. Make sure that this is the correct constraint and there is no need to prevent values that consist of only whitespace characters. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:29 | MIT License | |
156 | Publicly accessible system catalog tables | Find privileges to use system catalog base tables or views that have been granted to public. | General | INFORMATION_SCHEMA only | 2023-11-24 14:56 | MIT License | |
157 | Reference to the numeric type is too imprecise, i.e., precision and scale are missing | Find base table columns that have the DECIMAL/NUMERIC type, but do not have precision and scale specified. "Specifying: NUMERIC without any precision or scale creates a column in which numeric values of any precision and scale can be stored, up to the implementation limit on precision. A column of this kind will not coerce input values to any particular scale, whereas numeric columns with a declared scale will coerce input values to that scale." | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
158 | Referential degree of a schema | Referential degree of a schema is defined as the number of foreign keys in the database schema. | Sofware measure | INFORMATION_SCHEMA only | 2020-11-13 11:30 | MIT License | |
159 | 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 | |
160 | Registration/modification time is not automatically set | Find columns of base tables that name and type suggest that the column should contain the row registration time or last modify time but the column does not have a default value. | Problem detection | INFORMATION_SCHEMA only | 2021-03-28 17:36 | MIT License |