Seq nr | Name▲ | Goal | Type | Data source | Last update | License | ... |
---|---|---|---|---|---|---|---|
781 | Tables without columns | Do not have in a database elements that are not useful. PostgreSQL permits tables with no columns. Such tables can be used to implement Boolean variables (tables TABLE_DEE and TABLE_DUM). On the other hand, such tables might be a result of database evolution, where developers have not noticed that they have dropped all the columns of a table or have not noticed that they have created such a table in the first place. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:29 | MIT License | |
782 | Tables with the same name in different schemas | Find tables with the same name in different schemas. Make sure that this is not a duplication. | General | INFORMATION_SCHEMA+system catalog base tables | 2021-11-10 15:40 | MIT License | |
783 | Temporal function in a simple check constraint is inconsistent with the column type | Find base table columns with a check constraint that refers to a temporal function (current_timestamp, localtimestamp, current_date, or now) that return type is inconsistent with the data type of the column. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-08 21:43 | MIT License | |
784 | Textual columns that have a secondary index but the operator class for the column does not support pattern matching | Find indexed textual columns where the indexing does not consider the possibility of pattern-based search. Such columns do not have an index where the used operator class makes the index suitable for use by queries involving pattern matching expressions. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-07 11:52 | MIT License | |
785 | TG_ARGV is missing | Write correct code. If you pass arguments to a trigger function, then the function should use the arguments. TG_ARGV[]: "Data type array of text; the arguments from the CREATE TRIGGER statement. The index counts from 0. Invalid indexes (less than 0 or greater than or equal to tg_nargs) result in a null value." (PostgreSQL documentation) | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
786 | The expression of a check constraint that is associated with a domain needs type conversion | Find check constraints of domains where the Boolean expression invokes an operation that does not match with the data type of the domain. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:29 | MIT License | |
787 | The expression of a simple check constraint that is associated directly with a column needs type conversion | Find check constraints that involve one column and are associated directly with a table where the Boolean expression invokes an operation that does not match with the data type of the column. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:29 | MIT License | |
788 | The generator of surrogate key values can output the same value more than once | Find surrogate keys where the generator can output the same value more than once. Key values must be unique, i.e., at some point the generator will prevent adding new rows to the table. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-03-08 00:40 | MIT License | |
789 | The generic names (columns) (aggregate view) | Find the too generic column names and the number of their occurrences. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-01-15 10:34 | MIT License | |
790 | The generic names (columns) (aggregate view)(2) | Find the number of too generic base table and view column names. Do not differentiate between base table and view columns to determine what name is generic. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2023-01-18 16:42 | MIT License | |
791 | The longest names of database objects | Find the TOP 3 longest (identifiers) names of user-defined objects. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-03-18 17:22 | MIT License | |
792 | The longest names of database objects by object type | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the TOP 3 longest (identifiers) names of user-defined objects by their type. These could be the first candidates of renaming in order to give to database objects better names. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2023-03-17 01:09 | MIT License | |
793 | The longest referential paths | Find the longest referential paths between the tables regardless of the schema that contain the tables. | Sofware measure | system catalog base tables only | 2020-11-14 15:42 | MIT License | |
794 | The maximum number of characters may be missing | Perhaps the character maximum length has been omitted accidentally, i.e., one wrote VARCHAR instead of VARCHAR(n) where n is the maximum permitted number of characters in the field value. VARCHAR and TEXT are synonyms. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:29 | MIT License | |
795 | The name of the base table that implements a binary relationship type does not explain the meaning of the relationship | Find base tables that implement a binary relationship type (have two foreign keys) and the name of the table consist of the names of tables that this (intermediate) table connect. The names should be derived from the domain. For instance, instead of name Course_Lecturer it is better to have name Teaching. | Problem detection | system catalog base tables only | 2023-03-18 17:58 | MIT License | |
796 | The name of the routine does not match with the action of the routine | Find user-defined non-trigger SQL and PL/pgSQL routines where the beginning of the name of the routine indicates a certain action inside the routine (INSERT, UPDATE, or DELETE) but there is no such statement in the routine body. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-11-19 14:37 | MIT License | |
797 | The number and percentage of base tables where all the non-primary key columns are optional | Find the number and percentage of base tables where all the non-primary key columns are optional | Sofware measure | INFORMATION_SCHEMA only | 2020-11-08 19:57 | MIT License | |
798 | The number and percentage of base tables without CHECK constraints | Find the extent in which data integrity is checked at the database level. Find the number and percentage of base tables that do not have any associated CHECK constraints. | Sofware measure | INFORMATION_SCHEMA only | 2020-11-08 19:15 | MIT License | |
799 | The number and percentage of base tables without keys | Find the extent in which repeating rows are permitted in the database. Find the number and percentage (from the total number of base tables) of base tables that do not have the PRIMARY KEY constraint and also do not have any UNIQUE constraints. | Sofware measure | INFORMATION_SCHEMA only | 2020-11-08 19:16 | MIT License | |
800 | The number and percentage of different names of database objects | Names should be expressive. Find the number of different names used in a database as well as the number of named database objects, and the percentage of different names from all the names. Names should be expressive. Different objects should have different names. The smaller the percentage the less descriptive are the names in the database. Find the number of different names (identifiers) of user-defined database objects and compare it with the total number of database objects. The values could be used to compare different databases. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2023-03-18 17:12 | MIT License |