Seq nr | Name | Goal | Type▲ | Data source | Last update | License | ... |
---|---|---|---|---|---|---|---|
321 | Definition of a non-minimal superkey instead of a candidate key (based on check constraints) | Candidate key is a minimal superkey, meaning that it is not possible to remove columns from the candidate key without losing its uniqueness property. One should define primary key's and unique constraints based on candidate keys. Find primary key and unique constraints where a proper subset of columns has a check constraint that permits only one value in the column. The candidate key should involve only columns without such constraint. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-04-30 20:25 | MIT License | |
322 | Definition of a non-minimal superkey instead of a candidate key (based on enumeration types) | Candidate key is a minimal superkey, meaning that it is not possible to remove columns from the candidate key without losing its uniqueness property. One should define primary key's and unique constraints based on candidate keys. Find primary key and unique constraints where a proper subset of columns has an enumeration type that permits only one value in the column. The candidate key should involve only columns without such type. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:29 | MIT License | |
323 | Definition of a non-minimal superkey instead of a candidate key (based on key constraints) | Find primary/key unique constraints (sets of columns) that are proper subsets of other primary key/unique constraints of the same table. Candidate key is a minimal superkey, meaning that it is not possible to remove columns from the candidate key without losing its uniqueness property. One should define primary key's and unique constraints based on candidate keys, i.e., the keys should not have redundancy in terms of columns. | Problem detection | system catalog base tables only | 2021-10-16 10:29 | MIT License | |
324 | Definition of a non-minimal superkey instead of a candidate key (based on sequence generators) | Candidate key is a minimal superkey, meaning that it is not possible to remove columns from the candidate key without losing its uniqueness property. One should define primary key's and unique constraints based on candidate keys. Find primary keys and unique constraints where a proper subset of the key is a column with an associated sequence generator. Most certainly such subset contains unique values. Thus, this subset should be the key, not its superset. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-03-07 20:56 | MIT License | |
325 | Definition of a non-minimal superkey instead of a candidate key (based on unique indexes) | Find pairs of non-partial unique indexes where the columns of a index are a proper subset of the columns of another index. Include indexes that support a constraint (primary key, unique, exclude), i.e., these indexes have been automatically created due to the constraint declaration. Exclude the pairs where both participants have been created to support a constraint. Candidate key is a minimal superkey, meaning that it is not possible to remove columns from the candidate key without losing its uniqueness property. One should define keys based on candidate keys, i.e., the keys should not have redundancy in terms of columns. Defining a unique index essentially means defining a key in the table but it is done at the lower level of abstraction. | Problem detection | system catalog base tables only | 2022-10-21 15:56 | MIT License | |
326 | Delimited identifiers | Delimited identifiers (quoted identifiers) are case sensitive. Identifiers of database objects should be case insensitive in order to simplify their management. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-03-18 16:38 | MIT License | |
327 | Derived table names have prefix or suffix | Find the names of views and materialized views that have prefix or suffix. Follow the same naming style as in case of base tables (derived tables are also tables). Thus, if base tables do not have prefixes or suffixes, then derived tables shouldn't have these as well. | Problem detection | system catalog base tables only | 2021-02-25 17:29 | MIT License | |
328 | Derived table on top of another derived table | Do not build multiple levels of derived tables (views and materialized views) because it will hamper evolvability and understandability of the tables. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:29 | MIT License | |
329 | Derived table presents the same data in the same way as a single base table | Find derived tables (views and materialized views) that present data from one base table without adding columns, renaming columns, changing the order of columns, removing columns, or restricting rows. Perhaps something is missing from the subquery of the derived table. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-25 12:15 | MIT License | |
330 | Derived table uses a function to get data from another table | Find views that use a function to get data from another table. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-24 14:36 | MIT License | |
331 | Deterministic (immutable) functions that do not have input parameters | Find deterministic functions that do not have any input parameters. Make sure that it is correct because in general a deterministic function must calculate a value based on input. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-09 19:53 | MIT License | |
332 | Deterministic (immutable) functions that do not return a value | Find deterministic (immutable) functions that do not return a value. This goes against the idea of deterministic functions. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-20 19:33 | MIT License | |
333 | Different foreign key column names in case of referencing the same candidate key | Find the cases when the names of columns in different foreign keys that reference to the same candidate key are different. If different names reflect different roles, then it is legitimate. However, there could also be accidental differences that makes it more difficult to use the database. | Problem detection | system catalog base tables only | 2021-03-12 11:21 | MIT License | |
334 | Different prefixes of a candidate key column and a referencing foreign key column | The naming must be consistent. Find foreign key constraints where the candidate key column and foreign key column names have different prefixes. Thus, for instance, one cannot use USING syntax for joining the tables. | Problem detection | system catalog base tables only | 2021-02-25 17:29 | MIT License | |
335 | Different suffixes of a candidate key column and a referencing foreign key column | The naming must be consistent. Find foreign key constraints where the candidate key column and foreign key column names have different suffixes. Thus, for instance, one cannot use USING syntax for joining the tables. | Problem detection | system catalog base tables only | 2021-02-25 17:29 | MIT License | |
336 | 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 | |
337 | Disabled rules | Identify disabled rules. These should be enabled or dropped, otherwise these are dead code. | Problem detection | system catalog base tables only | 2022-10-21 11:22 | MIT License | |
338 | 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 | |
339 | Disabled user triggers | Identify disabled triggers. These should be enabled or dropped, otherwise these are dead code. | Problem detection | system catalog base tables only | 2021-02-25 17:30 | MIT License | |
340 | Domain based on another domain | Find domains that have been defined based on another domain. Do not specify domains based on existing domains. This would unnecessarily increase dependencies and complexity. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:29 | MIT License |