Seq nr | Name | Goal | Type | Data source | Last update▼ | License | ... |
---|---|---|---|---|---|---|---|
401 | Chains of ON DELETE CASCADE | Find all referential paths (chains of of parent-child tables that are associated through foreign key constraints) where all foreign key constraints have ON DELETE CASCADE compensating actions. Be careful with too long chains. | General | system catalog base tables only | 2022-10-29 20:04 | MIT License | |
402 | Number of rows in base tables | Find the number of rows in base tables. | General | system catalog base tables only | 2022-10-27 19:44 | MIT License | |
403 | System-generated domain CHECK constraint names | Find the names of domain CHECK constraints that have been system-generated. Names should follow the same style. If there is a mix of system-generated and user-defined names, then the style is most probably different. | Problem detection | INFORMATION_SCHEMA only | 2022-10-27 15:44 | MIT License | |
404 | Logical size of a schema | The schema size is the sum of the sizes of all tables in the schema. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2022-10-21 16:18 | MIT License | |
405 | Logical size of a table | The table size is the sum of the total size of the simple columns and the total size of the complex columns in the table. In case of SQL databases large base tables in terms of number of columns could be a side effect of the problems with cloned columns or multiple columns for the same attribute. A base table with a low normalization level, which is meant to hold data that corresponds to multiple entity types has typically also relatively large number of columns compared with other base tables. Thus, the normalization level of base tables with a large number of columns should be checked as well. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2022-10-21 16:17 | MIT License | |
406 | Recursive rules that directly modify their home table | Do not cause potentially infinite loops. Recursive rules would fire itself over and over again. Although the system is able to detect these after executing a data modification statement it is better to avoid creating these altogether. | Problem detection | system catalog base tables only | 2022-10-21 15:59 | MIT License | |
407 | Optional base table columns that participate in a UNIQUE constraint or index | Find optional base table columns that participate in a UNIQUE constraint or index. Each base table has one or more candidate keys. One of these is usually selected to be the primary key, other are called alternate keys. To enforce an alternate key one should define a UNIQUE constraint and determine that all the key columns are mandatory (NOT NULL) just like the primary key columns are mandatory. Make sure that the NOT NULL constraint is not missing on these columns. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-10-21 15:57 | MIT License | |
408 | Definition of a non-minimal superkey instead of a candidate key (based on unique indexes) | Find pairs of non-partial unique indexes where the columns of a index are a proper subset of the columns of another index. Include indexes that support a constraint (primary key, unique, exclude), i.e., these indexes have been automatically created due to the constraint declaration. Exclude the pairs where both participants have been created to support a constraint. Candidate key is a minimal superkey, meaning that it is not possible to remove columns from the candidate key without losing its uniqueness property. One should define keys based on candidate keys, i.e., the keys should not have redundancy in terms of columns. Defining a unique index essentially means defining a key in the table but it is done at the lower level of abstraction. | Problem detection | system catalog base tables only | 2022-10-21 15:56 | MIT License | |
409 | Empty tables | Find base tables where the number of rows is zero. If there are no rows in a table, then it may mean that one hasn't tested constraints that have been declared to the table or implemented by using triggers. It could also mean that the table is not needed because there is no data that should be registered in the table. | Problem detection | system catalog base tables only | 2022-10-21 15:55 | MIT License | |
410 | Privileges on the database and its schemas, domains, types, languages, sequences, foreign data wrappers, and foreign servers that have been granted to a superuser | Find privileges on the database and its schemas, domains, types, languages, sequences, foreign data wrappers, and foreign servers that have been granted to a superuser. Superuser can do anything in the database and thus does not need the privileges. The result is a sign that perhaps the executed GRANT statements were incorrect (wrong username) or the grantee later got superuser status (that it shouldn't have). | Problem detection | system catalog base tables only | 2022-10-21 15:53 | MIT License | |
411 | The number of user-defined rules by schema and in total | Find the number of rules in a database in different schemas, excluding the rules that are created to support views. Rules can be used to maintain data integrity in a database by causing rejection of incorrect insertions and updates. Therefore, the number of rules in a database gives an indication about the state of enforcing constraints at the database level. | Sofware measure | system catalog base tables only | 2022-10-21 11:29 | MIT License | |
412 | Base tables with plenty of data | Find base tables that have 1000 rows or more. | General | system catalog base tables only | 2022-10-21 11:25 | MIT License | |
413 | Disabled rules | Identify disabled rules. These should be enabled or dropped, otherwise these are dead code. | Problem detection | system catalog base tables only | 2022-10-21 11:22 | MIT License | |
414 | The number of user-defined rules | Find the number of rules in a database, excluding the rules that are associated with system catalog tables and rules that are created to support views. Rules can be used to maintain data integrity in a database by causing rejection of incorrect insertions and updates. Therefore, the number of rules in a database gives some indications about the state of enforcing constraints at the database level. | Sofware measure | system catalog base tables only | 2022-10-21 11:19 | MIT License | |
415 | Optional non-foreign key base table columns that participate in a UNIQUE constraint or index | Find optional base table columns that participate in a UNIQUE constraint or index but do not participate in a foreign key constraint. Each base table has one or more candidate keys. One of these is usually selected to be the primary key, other are called alternate keys. To enforce an alternate key one should define a UNIQUE constraint and determine that all the key columns are mandatory (NOT NULL) just like the primary key columns are mandatory. Make sure that the NOT NULL constraint is not missing on these columns. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-10-21 10:45 | MIT License | |
416 | Names of constraints (directly connected to a base table) and non-unique indexes that do not contain the associated column name | Find constraints that are perhaps badly named. Find names of constraints (directly connected to a base table) and non-unique indexes that do not contain the associated column name. | Problem detection | system catalog base tables only | 2022-10-21 10:41 | MIT License | |
417 | Base tables that have more than five indexes | Find base tables that have more than five indexes. Indexes can be used to increase the speed of queries (SELECT statements). However, the amount of indexes shouldn't be too large. Otherwise it may reduce the speed of operations that are used to modify data. | Problem detection | system catalog base tables only | 2022-10-21 10:33 | MIT License | |
418 | Foreign key references to a unique index columns not a unique key columns | Find foreign key constraints that reference to the columns that are covered by a unique index not a unique key. | Problem detection | system catalog base tables only | 2022-10-21 10:30 | MIT License | |
419 | Duplicate non-fuction based unique indexes | Find pairs of non-function based unique indexes that cover the same set of columns. Include indexes that support a constraint (primary key, unique, exclude), i.e., these indexes have been automatically created due to the constraint declaration. For instance, it helps us to find unique indexes that have been defined to already unique columns. | Problem detection | system catalog base tables only | 2022-10-21 10:17 | MIT License | |
420 | Base tables that have no uniqueness requirement for rows whatsoever | Find base tables without any unique constraints and primary key as well as any unique index, whether it is created explicitly by a developer or automatically by the DBMS. The only legitimate reason of such a table is if it is an abstract table that is used to define common columns of subtables. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-10-21 10:16 | MIT License |