Seq nr | Name | Goal | Type | Data source | Last update▼ | License | ... |
---|---|---|---|---|---|---|---|
361 | Simple primary keys that column name does not contain the table name | Find simple primary keys that column name does not contain the table name. The naming should be clear and consistent. | Problem detection | system catalog base tables only | 2023-03-19 10:35 | MIT License | |
362 | Do not use approach that one size fits all (primary key columns) | Find base base tables have the simple primary key that contains the column with the (case insensitive) name id and an integer type. In addition, the primary key values are generated automatically by the system by using a sequence generator. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-03-18 20:58 | MIT License | |
363 | Very similar column names | Find the pairs of table columns that name is different only by one symbol and that have the same type and/or domain. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-03-18 20:25 | MIT License | |
364 | 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 | |
365 | Perhaps a too generic foreign key column name | Find the names of foreign key columns that are too generic. The expressive names of table columns allow database users better and more quickly understand the meaning of data in the database. A person could participate in a process or be associated with an object due to different reasons. Thus, foreign key column names like isik_id, person_id, tootaja_id, worker_id etc. are too generic. The name should refer (also) to the reason why the person is connected. | Problem detection | system catalog base tables only | 2023-03-15 18:27 | MIT License | |
366 | Unnamed parameters | Find unnamed parameters in PL/PGSQL routines that do not declare aliases for parameters and in SQL routines. Avoid unnamed parameters because dependency on position in case of referencing the parameters makes evolving the code more difficult. In case of unnamed parameters - if one changes the order of parameters in the routine signature, then one has to change the body of the routine in order to use correct references. The bigger is the number of parameters in a routine the more the unnamed parameters make it more difficult to understand the routine. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-03-15 18:16 | MIT License | |
367 | SQL function does not return a value | Find SQL functions that do not return a value (return VOID) but the SQL statement in the function has RETURNING clause. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-02-27 17:28 | MIT License | |
368 | Too generic names (parameters) | Find the names of parameters that are too generic. The routines work with data/information. Thus, it is not a good style to use generic words like data, information, parameter, etc. In the names of parameters. Moreover, avoid too generic parameter names like: id, tyyp, kood, aeg, kp,type, code, time, date, fk, pk, param. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-01-20 14:08 | MIT License | |
369 | Parameter name is the same as the name of a used column | If the name of a routine parameter and the name of a column of a table that is used in the routine are the same, then it makes it more difficult to understand the code. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-01-20 13:54 | MIT License | |
370 | Parameter name is the same as the name of a used column (ver 2) | If the name of a routine parameter and the name of a column of a table that is used in the routine are the same, then it makes it more difficult to understand the code. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-01-20 13:54 | MIT License | |
371 | Patterns of the names of columns of simple primary keys | Find the patterns of the names of columns of simple primary keys. Make sure that the naming is consistent. Ideally, the names should indicate as to whether the column is a surrogate or a natural key column. PostgreSQL 14 added primary keys, unique constraints, and foreign keys to system catalogs. Thus the query was modified to exclude the results from the system catalog. | General | system catalog base tables only | 2023-01-20 13:40 | MIT License | |
372 | Too generic names (foreign key columns) | Find foreign key columns with the names like id, identifikaator, code, kood, number, etc. The names should have a prefix or a suffix that describes the nature of relationship with the referenced table or at least referes to the referenced table. These are too generic names. | Problem detection | system catalog base tables only | 2023-01-20 12:37 | MIT License | |
373 | Too generic names (candidate key columns) | Find candidate key columns with the names like id, identifikaator, code, kood, number, etc. The names should have a prefix or a suffix. These are too generic names. | Problem detection | system catalog base tables only | 2023-01-20 12:35 | MIT License | |
374 | Comments of schemas, sequences, types, domains, domain constraints, and event triggers | Find all the comments that have been added with a COMMENT statement to schemas, sequences, types, domains, and event triggers. | General | system catalog base tables only | 2023-01-19 15:04 | MIT License | |
375 | Too short or missing comments of derived tables and routines | Find views, materialized views, and user-defined routines that do not have a comment at all or the comment is shorter than twice the length of the object name, or the comment states that it is missing (TODO). You should give information to future developers and maintainers of the system (including the future version of yourself). Do not just repeat the name in the comment (with perhaps some rewording). | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-01-19 12:56 | MIT License | |
376 | Comments of non-derived tables | Find comments of non-derived tables (base tables, foreign tables, and partitioned tables) that are registered in the system catalog witht a COMMENT statement. Find also comments on their associated objects (columns, constraints, indexes, triggers, rules). Make sure that the comments give relevant, useful, and correct information. | General | system catalog base tables only | 2023-01-19 12:30 | MIT License | |
377 | Comments of derived tables | Find comments of derived tables (views and materialized views) that are registered in the system catalog witht a COMMENT statement. Find also comments on their associated objects (columns, triggers, rules). Make sure that the comments give relevant, useful, and correct information. | General | system catalog base tables only | 2023-01-19 12:14 | MIT License | |
378 | 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 | |
379 | Check as to wheteher the names of tables are in the plural or in the singular form (English version) | Check as to wheteher the names of tables are in the plural or in the singular form. Make sure that you are consistent in naming. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-01-16 01:09 | MIT License | |
380 | Check as to wheteher the names of tables are in the plural or in the singular form (English version) (aggregate view) | Check as to wheteher the names of tables are in the plural or in the singular form. Make sure that you are consistent in naming. Show the number of tables that name is in plural or in singular by table type. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2023-01-16 01:09 | MIT License |