Seq nr | Name▲ | Goal | Type | Data source | Last update | License | ... |
---|---|---|---|---|---|---|---|
1 | Columns with JSON, JSONB, or XML type | Find columns with JSON, JSONB, or XML type. Each columns should have the most appropriate data type. | General | INFORMATION_SCHEMA+system catalog base tables | 2020-11-19 17:01 | MIT License | |
2 | 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 | |
3 | Derived tables that present data in json or xml format | Find views and materialized views that present data in json or xml format. Instead of recording data in this format in base tables one could generate the data value on the fly based on data that has been recorded in base tables. | General | INFORMATION_SCHEMA+system catalog base tables | 2020-11-06 14:51 | MIT License | |
4 | Do not always depend on one's parent | Find where a hierarchical structure is implemented in a base table by adding a foreign key that refers to a candidate key of the same table. | General | system catalog base tables only | 2021-03-12 15:36 | MIT License | |
5 | Do not always depend on one's parent - column names are ot sufficiently different | Find where a hierarchical structure is implemented in a base table by adding a foreign key that refers to a candidate key of the same table. Find only cases where the candidate key and foreign key column names are very similar (Levenshtein distance shorter than four). | Problem detection | system catalog base tables only | 2022-11-26 17:19 | MIT License | |
6 | Do not always depend on one's parent (INFORMATION_SCHEMA) | Find where a hierarchical structure is implemented in a base table by having a foreign key that refers to a candidate key of the same table. This design is called adjacency list. | General | INFORMATION_SCHEMA only | 2021-03-07 10:57 | MIT License | |
7 | JSON type instead of JSONB type | "In general, most applications should prefer to store JSON data as jsonb, unless there are quite specialized needs, such as legacy assumptions about ordering of object keys." (https://www.postgresql.org/docs/current/datatype-json.html) | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
8 | ON DELETE SET NULL is probably missing | Find implementations of the adjacency list design pattern, where the corresponding foreign key columns are optional but the foreign key constraint does not have ON DELETE SET NULL compensating action. Implement adjacency list correctly. | Problem detection | system catalog base tables only | 2021-02-25 17:29 | MIT License | |
9 | Perhaps a relationship should be irreflexive | Enforce all the constraints. A binary relation is called irreflexive, if it does not relate any element to itself. | Problem detection | system catalog base tables only | 2021-02-25 17:29 | MIT License | |
10 | Recursive relationships with the same source and target | Find incorrectly implemented adjacency lists. | Problem detection | system catalog base tables only | 2021-02-25 17:30 | MIT License | |
11 | The number of derived table columns with an array, a user-defined, XML, JSON, or JSONB type | Find the number of derived table columns with json, xml, array, or user-defined types. Such columns may contain data that has been aggregated/composed based on values in base tables. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2023-01-14 20:22 | MIT License |