Seq nr | Name | Goal | Type | Data source | Last update▼ | License | ... |
---|---|---|---|---|---|---|---|
361 | The number of SQL-language routines with different types of bodies | Find for each user schema that contain a SQL-language routine how many of these have the body that is string literal and how many have the body (possible starting from PostgreSQL 14) that is parsed at the routine definition time. Try to be consistent, i.e., use the same solution in case of all the routines. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2022-12-02 11:33 | MIT License | |
362 | Perhaps primary key columns could be renamed | Find the names of simple primary key columns that name does not follow the pattern | Problem detection | system catalog base tables only | 2022-12-01 14:34 | MIT License | |
363 | Names of the password columns | Find names of columns of base tables, views, and materialized views that contain passwords. Make sure that the naming is consistent, | General | INFORMATION_SCHEMA+system catalog base tables | 2022-11-30 15:04 | MIT License | |
364 | Columns that have the same name as their domain/type | Find the columns that name is the same as the name of the type of the column or the domain of the column. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-11-30 13:04 | MIT License | |
365 | Do not clone columns | "Split a base table column into multiple columns based on the values in some other column. Each such newly created column has the name, a part of which is a data value from the original tables."(Bill Karwin) Find base tables that have more than one columns with the same type and field size and the difference between the columns are the year or month number at the end of the column name (two or four numbers, preceded by an underscore). | Problem detection | INFORMATION_SCHEMA only | 2022-11-28 15:15 | MIT License | |
366 | Columns that have the same name as some domain/type | Use different names to avoid confusion. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-11-28 14:47 | MIT License | |
367 | A setter does not update a table | Find user-defined non-trigger SQL and PL/pgSQL routines that name starts with "set" (but not with "setting") but do not contain a UPDATE statement. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-11-27 18:35 | MIT License | |
368 | 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 | |
369 | Frequency of table name lengths based on the table type | Find in case of base tables, materialized views, and views the number of tables based on the length of the table name. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2022-11-23 01:09 | MIT License | |
370 | Frequency of column name lengths based on the table type | Find in case of base tables, materialized views, and views the number of columns based on the length of the column name. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2022-11-22 14:43 | MIT License | |
371 | Potential duplication of sequence generators | Do not create unnecessary sequence generators. | Problem detection | INFORMATION_SCHEMA only | 2022-11-21 11:01 | MIT License | |
372 | 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 | |
373 | Names of the columns of derived tables that have been given by the system | Find columns of derived tables that name has been given by the system. The creators of the table should specify the name themselves to avoid ugly names and nasty surprises. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-11-15 16:48 | MIT License | |
374 | Constraints with the same name within the same schema and constraint type | Find names of foreign key constraints that are used within the same schema more than once. Find names of check constraints that are used within the same schema more than once. Find names of constraint triggers that are used within the same schema more than once. Different things should have different names. But here different constraints have the same name. Also make sure that this is not a sign of duplication. | Problem detection | system catalog base tables only | 2022-11-15 16:43 | MIT License | |
375 | Table constraints with the same name (constraints connected directly with a base table or a foreign table) | Find base table and foreign table constraint names that are used in a database more than once (possibly in different schemas or in case of different types of constraints). Different things should have different names. But here different constraints have the same name. Also make sure that this is not a sign of duplication. | Problem detection | system catalog base tables only | 2022-11-15 16:43 | MIT License | |
376 | Prefixes of base table names | Find base tables that name starts with a prefix. Do not use prefixes in case of base table names. Derive the names from the names of entity types. Do not use "_", "t_", "tab_", "t11_" etc as prefixes of a table. | Problem detection | INFORMATION_SCHEMA only | 2022-11-15 16:32 | MIT License | |
377 | Inconsistent naming of comment columns | Find columns of tables that start with the word comment or komment but end differently (excluding numbers). Return result only if there is more than one naming variant of such columns in the database. For instance, a column has the name "comment" but another "comments". | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-11-15 14:09 | MIT License | |
378 | Gratuitous context in the names of non-foreign key and non-candidate key columns | Find the names on base table columns that are not a part of a candidate key and a foreign key and that contain the name of the table. Exclude very general column names (for instance, nimi, nimetus, kommentaar, kirjeldus, name, comment, description). In case of these using the table name in the column name is not a problem because it simplifies writing the queries based on the tables. In this case one does not have to rename the columns in the query result. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-11-15 13:39 | MIT License | |
379 | Table inheritance (path view) | Find in case of each base table that participates in a table inheritance hierarchy the path to the table from the top-level table. Use table inheritance carefully because, for instance, certain constraints are not inherited and must be redefined on child tables. Also make sure that the identifier of each child table in an inheritance hierarchy is a hyponym of the identifier of its parent table. | General | system catalog base tables only | 2022-11-13 16:13 | MIT License | |
380 | Patterns of the Boolean expressions of simple CHECK constraints | Find patterns of the Boolean expressions of simple CHECK constraints (involve only one column). Do not solve the same task in different places differently. The same rule could be implemented with CHECK constraints that have different Boolean expressions. "If you do something a certain way, do all similar things in the same way." (Robert C. Martin, Clean Code) | General | INFORMATION_SCHEMA+system catalog base tables | 2022-11-13 16:06 | MIT License |