Seq nr | Name | Goal | Type | Data source | Last update▼ | License | ... |
---|---|---|---|---|---|---|---|
41 | Extension routines in the schema "public" | Find extensions that routines are in the schema public. | General | system catalog base tables only | 2024-01-04 11:56 | MIT License | |
42 | Insufficient number of user-defined triggers+rules | There must be user-defined triggers and/or rules for at least n (three in this case) tasks in the database. It also means that one should create at least three triggers and/or rules in the database. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-04 11:47 | MIT License | |
43 | Insufficient number of user-defined triggers+rules (based on number of tasks) | There must be user-defined triggers and/or rules for at least n (three in this case) tasks in the database. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-04 11:46 | MIT License | |
44 | Different tasks of triggers | Find different tasks that are solved by using triggers, i.e., different triggers on the same table or different tables that do the same thing are considered to solve one task. | General | INFORMATION_SCHEMA+system catalog base tables | 2024-01-04 00:53 | MIT License | |
45 | Columns with BOOLEAN type that do have a good name | The prefic of the name should be "is_" or "has_" or "can_" (in English) or "on_" (in Estonian). Worse: agreed, kinnitatud. Better: is_agreement, on_kinnitatud. | General | INFORMATION_SCHEMA+system catalog base tables | 2024-01-03 09:56 | MIT License | |
46 | Columns with BOOLEAN type that do not have a good name | The phrase "is_" or "has_" or "can_" (in English) or "on_" (in Estonian) should be used in the name - preferably in the beginning. Worse: agreed, kinnitatud. Better: contract_is_agreed, leping_on_kinnitatud. Perhaps the best: is_contract_agreed or is_agreement, on_leping_kinnitatud, on_kinnitatud. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-03 09:56 | MIT License | |
47 | Inconsistent naming of columns with BOOLEAN type | Find as to whether some columns with the type Boolean start with a prefix ("is", "has", "can", "on") and some do not. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-03 09:54 | MIT License | |
48 | Names of columns with the type BOOLEAN | The naming of BOOLEAN columns must be consistent. For the better readability the names of such columns could have prefix "is_" (in English) or "on_" (in Estonian) | General | INFORMATION_SCHEMA+system catalog base tables | 2024-01-03 09:41 | MIT License | |
49 | Perhaps the type of a base table column should be BOOLEAN (based on column names) | Find base table columns that based on the name seem to hold truth values. Find columns that name starts with "is_" or "has_" or "can_" or "on_" and that do not have Boolean type. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-03 09:41 | MIT License | |
50 | Perhaps the type of a parameter should be BOOLEAN (based on parameter names) | Find routine parameters that based on the name seem to hold truth values. Find parameters that name starts with "is_" or "has_" or "can_" or "on_" and that do not have Boolean type. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-03 00:10 | MIT License | |
51 | Base table columns permitting empty strings and strings that consist of only whitespace characters (2) | Find non-foreign key columns of base tables that have a textual type and do not have a simple CHECK constraint (i.e., a constraint that involves only one column) that seems to prohibit empty strings and strings that consist of only whitespace as well as a simple CHECK constraint that specifies permitted symbols. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-02 16:52 | MIT License | |
52 | 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 | |
53 | Perhaps incorrect column name (based on default values) | Find columns of base tables that have the default value CURRENT_USER or SESSION_USER but the name of the column does not refer to the fact that it contains usernames. | Problem detection | INFORMATION_SCHEMA only | 2024-01-01 12:14 | MIT License | |
54 | Simple check constraints with multiple tasks | Find simple check constraints, i.e., check constraints that cover one column that seem to have multiple tasks. The corresponding code smell in case of cleaning code is "G30: Functions Should Do One Thing". (Robert C. Martin, Clean Code) | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-01 11:42 | MIT License | |
55 | All table CHECK constraints that cover at leat one column | Find all CHECK constraints (except NOT NULL) that are associated with a base table or a foreign table column. It is useful to enforce as many constraints at database level as possible. In this way one improves data quality as well as gives extra information to the database users (including the DBMS engines, development environments, and applications). | General | INFORMATION_SCHEMA only | 2024-01-01 11:27 | MIT License | |
56 | Perhaps is not snake_case - id, code, key, or nr is not preceded by an underscore | Find names that perhaps do not use the snake_case naming style because the name ends with the phrase "id", "uuid", "code", "kood", "key", or "nr" that is not preceded by an underscore. Prefer snake_case over PascalCase and camelCase in names. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-31 11:17 | MIT License | |
57 | Multiple tables share the same state classifier | Find cases where multiple tables share the same state classifier. For each main entity type one should create a separate state classifier table. Even if the classifier values are the same in case of two entity types for now these may become different in the future. Having a shared state classifier table usually means very simplistic state machines (states active and inactive) that could point to the gaps in analysis. | Problem detection | system catalog base tables only | 2023-12-30 15:51 | MIT License | |
58 | Perhaps last update time trigger is missing | Find base tables that have a column for last update time but the table does not have associated before update row level trigger for changing the last update time. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-30 15:22 | MIT License | |
59 | Perhaps an overcomplicated constraint expression that compares the result of a Boolean expression with a Boolean value | Find table and domain CHECK constraints that compare the result of a Boolean expression with a Boolean value. If you can choose between two logically equivalent Boolean expressions choose the more simple expression. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-30 11:57 | MIT License | |
60 | Inconsistent use of session_user and current_user functions | Find as to whether both functions session_user and current_user are used in the database. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-30 11:37 | MIT License |