Seq nr | Name | Goal | Type | Data source | Last update▼ | License | ... |
---|---|---|---|---|---|---|---|
101 | Routine for reading data uses another routine to read some data | Find routines that only read data but invoke some other routine to read some more data. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-10 17:10 | MIT License | |
102 | Different ways how to find default timestamp values | Find all the default values of base table, view, and foreign table columns that are expressions invoking a function that returns a timestamp. Do it only if there are different expressions, i.e., there could be possible inconsistencies. | Problem detection | INFORMATION_SCHEMA only | 2023-12-08 16:08 | MIT License | |
103 | ON DELETE CASCADE is not needed (based on classifier tables) | Find foreign key constraints with ON DELETE CASCADE compensating action that refer to classifier (reference data) tables. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-08 14:52 | MIT License | |
104 | All foreign key constraints | Enforce referential integrity in database. Find all referential integrity (foreign key) constraints. | General | system catalog base tables only | 2023-12-07 12:48 | MIT License | |
105 | Explicit locking is missing (2) | Find user-defined routines that have a subquery in a DELETE or UPDATE statement without the FOR UPDATE clause. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-06 12:15 | MIT License | |
106 | Perhaps is not a snake case - date, time, or by 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 "date", "time", "by" 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-06 12:12 | MIT License | |
107 | Too generic names (parameters) (there is a parameter with a more specific name in the routine) | Find parameter names in case of which the same routine has another parameter with the same mode but with more specific name, i.e., the name contains the parameter name in the end or in the beginning. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-06 12:03 | MIT License | |
108 | Perhaps is not snake_case - Boolean-indicating prefix without underscore | Find names of types, domains, columns, and parameters that perhaps do not use the snake_case naming style because the name starts with "is", "has", or "on" that is not followed by an underscore. Prefer snake_case over PascalCase and camelCase in names. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-06 11:46 | MIT License | |
109 | Some data modification functions return a value and some not | Find as to whether there are data modification routines that return a value as well as data modification routines that do not return a value. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-29 16:47 | MIT License | |
110 | Incorrect use of non-deterministic functions in CHECK constraints | Do not create a constraint in case of which data that satisfied a constraint c at the registration time suddenly does not satisfy it any more as the time goes by. Find all the check constraints that use non-deterministic functions (now, current_timestamp, localtimestamp, current_date, current_time) in a way that makes this situation possible. Fort instance, localtimestamp(0)>end_date is an example of such constraint. | Problem detection | INFORMATION_SCHEMA only | 2023-11-29 14:59 | MIT License | |
111 | Prefer Polymorphism to If/Else or Switch/Case (2) | Find routines with multiple raise exception commands. Perhaps it has multiple tasks and it violates the separation of concerns and single responsibilities principles. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-29 13:39 | MIT License | |
112 | Prefer Polymorphism to If/Else or Switch/Case | Find routines with IF/ELSE or SWITCH/CASE statements. If your routine has a multipart IF/CASE statement, then perhaps it has multiple tasks and it violates the separation of concerns and single responsibilities principles. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-29 13:31 | MIT License | |
113 | Updating or deleting data in a routine without restricting rows | Find user-defined routines that contain UPDATE or DELETE statement but do not contain any WHERE clause, meaning that at least one UPDATE or DELETE operation influences all the rows of a table. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-29 13:21 | MIT License | |
114 | Stating the obvious (2) | Find the names of database objects where the name of the database object contains a part of the name of the object type. For instance, the query finds base tables, were the name contains fragments _base, base_, _table, or table_. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-26 17:04 | MIT License | |
115 | Columns for registration and update times | Find base table columns that based on the names and data types are meant for registering registration time or update time. Make sure that the columns have the same properties. | General | INFORMATION_SCHEMA only | 2023-11-26 16:51 | MIT License | |
116 | Registration/modification time is not mandatory | Find columns that contain registration or modification time but are optional. | Problem detection | INFORMATION_SCHEMA only | 2023-11-26 16:51 | MIT License | |
117 | 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 | |
118 | Constraint-supporting UNIQUE indexes with the same leading column | Find indexes that support a uniqueness constraint and have the same leading column. | General | system catalog base tables only | 2023-11-26 16:01 | MIT License | |
119 | Overlapping non-function based indexes that have the same leading column with the same operator class | Find non-function based indexes (both unique and non-unique) that duplicate each other because their first column is identical and the operator class that is used in case of the first column is identical. Include unique indexes that support a constraint (primary key, unique, exclude), i.e., these indexes have been automatically created due to the constraint declaration. | Problem detection | system catalog base tables only | 2023-11-26 15:59 | MIT License | |
120 | Lifecycle not initiated | Find non-primary key and non-unique base table foreign key columns that name refers to the possibility that these are used to register references to a state classifier. The column must belong to a foreign key and does not have a default value. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-26 15:40 | MIT License |