Seq nr | Name | Goal | Type | Data source | Last update▼ | License | ... |
---|---|---|---|---|---|---|---|
421 | Base tables where uniqueness is achieved by using only unique indexes | Find base tables where uniqueness is achieved by using only unique indexes, i.e., there is at least one unique index but no uniqueness constraints (PRIMARY KEY, UNIQUE, EXCLUDE) | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-10-21 01:54 | MIT License | |
422 | Base tables with the biggest number of rows | Find the base tables that belong to the top 5 in terms of the number of rows in the table. There should be test data in the tables. | General | system catalog base tables only | 2022-10-21 01:48 | MIT License | |
423 | Base tables where all the unique columns are optional | Find the base tables where all the unique columns are optional. In such tables there can be rows without values that identify these rows. In this case there can be rows in the table where the values that should identify the row are missing. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-10-21 01:47 | MIT License | |
424 | Update prevention may prevent legal updates | Find triggers that try prevent updating data in a certain column but prevent also certain legal updates - updates that write to a field a value that was in the field before the update. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-07-07 13:12 | MIT License | |
425 | Perhaps the column type should be UUID | Find base table columns that do not have uuid type but the name of the column refers to the possibility that the values in the column are uuid's. | Problem detection | INFORMATION_SCHEMA only | 2022-06-09 15:07 | MIT License | |
426 | Do not specify a list of values in a table column definition | Find cases where the list of valid data values in the column is specified in the column definition (in addition to specifying the type of the column) by using, for instance, check constraints or enumerated types. The check constraint is either associated directly with a table or is associated with a domain. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-06-09 14:30 | MIT License | |
427 | IS NULL check is probably not needed | Find CHECK constraints that refer only to mandatory columns but the Boolean expression has IS NULL condition. | Problem detection | INFORMATION_SCHEMA only | 2022-06-09 13:57 | MIT License | |
428 | Password is unique | Find columns that potentially contains passwords and that participate in a unique constraint or index | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-06-09 13:21 | MIT License | |
429 | Base table column of comments/descriptions has an incorrect data type or maximum character length | Find base table columns that name refers to the possibility that these are used to register comments/descriptions. Find the columns where the data type is not VARCHAR and TEXT or in case of VARCHAR the maximum number of permitted characters is smaller than 1000. In case of determining field sizes choose a size that permits registration of all possible legal values. | Problem detection | INFORMATION_SCHEMA only | 2022-05-01 13:39 | MIT License | |
430 | ON UPDATE CASCADE is not needed (based on surrogate keys) | Find foreign key constraints that reference to a candidate key that is a surrogate key, i.e., its values are generated by the system by using sequence generators. Do not use ON UPDATE CASCADE in case of foreign keys that reference to surrogate keys. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-04-30 18:39 | MIT License | |
431 | ON UPDATE CASCADE is perhaps missing (based on the compensating actions of other foreign key constraints) | Find inconsistencies of using ON UPDATE CASCADE in case of foreign key constraints. An example of inconsistency is that there are two foreign key constraints in different tables that refer to the same table and its candidate key. One of the constraints has ON UPDATE CASCADE compensating action one does not. ON UPDATE CASCADE usage should be consistent, otherwise it does not allow us to change key values in the primary table. More generally, there is a set of foreign key constraints F that refer to a candidate key of table T. It cannot be the case that a proper non-empty subset of these foreign keys have ON UPDATE CASCADE compensatory action. Either all the constraints in F should have it or none of it should have it (depending on circumstances). | Problem detection | system catalog base tables only | 2022-04-30 18:39 | MIT License | |
432 | ON UPDATE CASCADE is probably missing (based on the properties of the referenced column) | Find the foreign key constraints that do not have ON UPDATE CASCADE and that referenced key is a simple key that has an integer type, is not covered by another foreign key, and does not have an associated sequence generator, i.e., the foreign key references a simple natural key. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-04-30 18:39 | MIT License | |
433 | CHECK constraint cardinality is zero | Write correct constraints. Usually the constraint expression should refer to at least one column. A domain constraint expression should refer to the stub VALUE. For instance, the constraint CHECK(1=0) that is associated with a table T would prevent adding any rows to T. The value of the Boolean expression of this constraint is always FALSE. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-04-22 17:06 | MIT License | |
434 | Boolean column for gender | Find base table columns that have Boolean type and based on the column name are meant for recording data about gender. | Problem detection | INFORMATION_SCHEMA only | 2022-04-18 00:57 | MIT License | |
435 | Many-to-many relationship types that do not have additional attributes | Find base tables that implement many-to-many relationship types that do not permit repeating relationships. More specifically find tables that have two or more foreign keys and all the columns of the table are either foreign key columns or a surrogate key column. It could be that during the system analysis a mistake has been made and some attributes of the entity type that represents the relationship type have not been discovered. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-01-21 10:48 | MIT License | |
436 | ROW level BEFORE triggers that do not return a row if a check succeeds | Find ROW level BEFORE triggers that check a condition based on other rows, raise an exception but do not return the row if the condition check succeeds, i.e., exception is not raised. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-12-31 17:29 | MIT License | |
437 | PUBLIC has TEMPORARY privilege in the database | Find as to whether PUBLIC (all current and future users) has TEMPORARY privilege in the database. PUBLIC gets the privilege by default. | Problem detection | system catalog base tables only | 2021-12-31 15:52 | MIT License | |
438 | Excessive privileges on databases, schemas, domains, types, languages, foreign data wrappers, and foreign servers | Find excessive privileges on databases, schemas, domains, collations, sequences, foreign data wrappers, and foreign servers that are probably not needed by a typical application. | Problem detection | system catalog base tables only | 2021-12-31 14:40 | MIT License | |
439 | Unnecessary usage privileges of PUBLIC | PostgreSQL gives by default some privileges to all the present and future database users (PUBLIC). Find usage privileges of collations, domains, foreign data wrappers, foreign servers, and sequences that have been given to PUBLIC. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-12-31 13:53 | MIT License | |
440 | Trigger routines with TG_OP variable that are not associated with a suitable trigger | Automatically defined TG_OP variable in a trigger function has data type text. Its value is a string of INSERT, UPDATE, DELETE, or TRUNCATE telling for which operation the trigger was fired. Find the routines that according to the TG_OP value must react to a certain operation but the routine is not associated with any triggers that are fired by the operation. For instance, the routine specifies reaction to DELETE operation but the routine is not associated with any DELETE trigger. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-12-25 01:26 | MIT License |