Catalog of PostgreSQL queries for finding information about a PostgreSQL database and its design problems

AND
AND
AND
ANDFrom where does the query gets its information?
AND
AND

There are 961 queries.

Seq nrNameGoalTypeData sourceLast updateLicense...
821Constraints with the same name within the same schema and constraint typeFind 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 detectionsystem catalog base tables only2022-11-15 16:43MIT License
822Cycle in a hierarchyThere should not be cycles in hierarchies meaning that the parent must always be specified. In this case a parent must reference to a child or to itself, otherwise it cannot be registered.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
823Database can be accessed through PUBLIC privilegesFind as to whether the database access by users (applications) can take place thanks to PUBLIC privileges, i.e., find as to whether PUBLIC (all current and future users) has CONNECT privilege in the database. PUBLIC gets the privilege by default.Problem detectionsystem catalog base tables only2022-10-31 10:19MIT License
824Deferrable constraintsFind all deferrable constraints.Generalsystem catalog base tables only2021-10-08 11:25MIT License
825Deferrable foreign key constraint with a RESTRICT compensating actionFind deferrable foreign key constraint with ON UPDATE RESTRICT or ON DELETE RESTRICT compensating action. Referential actions are carried out before, and are not part of, the checking of a referential constraint. Deferring a referential constraint defers the checking of the of the constraint (a ) but does not defer the referential actions of the referential constraint. In PostgreSQL the essential difference between NO ACTION and RESTRICT is that NO ACTION allows the check to be deferred until later in the transaction, whereas RESTRICT does not. Thus RESTRICT could result with the failure of data modification where in case of NO ACTION the modification would succeed.Problem detectionsystem catalog base tables only2021-10-08 11:29MIT License
826Definition of a non-minimal superkey instead of a candidate key (based on key constraints)Find primary/key unique constraints (sets of columns) that are proper subsets of other primary key/unique constraints of the same table. 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 primary key's and unique constraints based on candidate keys, i.e., the keys should not have redundancy in terms of columns.Problem detectionsystem catalog base tables only2021-10-16 10:29MIT License
827Definition 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 detectionsystem catalog base tables only2022-10-21 15:56MIT License
828Depth of referential tree of a schemaDepth of referential tree of a database schema is the longest referential path between the tables in this schema (Piattini et al., 2001). In other words, it is the biggest value among the DRT(T) values of all the tables of the schema.Sofware measuresystem catalog base tables only2020-11-14 15:28MIT License
829Depth of relational tree of a tableDepth of relational tree of a table T (DRT(T)) is defined by Piattini et al. (2001) as "the longest referential path between tables, from the table T to any other table in the schema". The result may help to classify the data. If the depth is 0, then probably the table contains classifers. Tables with the largest depth probably contain some extra information about main entities.Sofware measuresystem catalog base tables only2020-11-14 16:13MIT License
830Derived table names have prefix or suffixFind the names of views and materialized views that have prefix or suffix. Follow the same naming style as in case of base tables (derived tables are also tables). Thus, if base tables do not have prefixes or suffixes, then derived tables shouldn't have these as well.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
831Different foreign key column names in case of referencing the same candidate keyFind the cases when the names of columns in different foreign keys that reference to the same candidate key are different. If different names reflect different roles, then it is legitimate. However, there could also be accidental differences that makes it more difficult to use the database.Problem detectionsystem catalog base tables only2021-03-12 11:21MIT License
832Different prefixes of a candidate key column and a referencing foreign key columnThe naming must be consistent. Find foreign key constraints where the candidate key column and foreign key column names have different prefixes. Thus, for instance, one cannot use USING syntax for joining the tables.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
833Different suffixes of a candidate key column and a referencing foreign key columnThe naming must be consistent. Find foreign key constraints where the candidate key column and foreign key column names have different suffixes. Thus, for instance, one cannot use USING syntax for joining the tables.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
834Different tasks of rulesFind different tasks that are solved by using rules, i.e., different rules on the same table or different tables that do the same thing are considered to solve one task.Generalsystem catalog base tables only2024-01-14 16:10MIT License
835Disabled rulesIdentify disabled rules. These should be enabled or dropped, otherwise these are dead code.Problem detectionsystem catalog base tables only2022-10-21 11:22MIT License
836Disabled system triggers (i.e., disabled enforcement of constraints)These triggers should be enabled because otherwise some important functionality regarding constraints like enforcing referential integrity does not work.Problem detectionsystem catalog base tables only2021-03-12 15:06MIT License
837Disabled user triggersIdentify disabled triggers. These should be enabled or dropped, otherwise these are dead code.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
838Do not always depend on one's parentFind 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.Generalsystem catalog base tables only2021-03-12 15:36MIT License
839Do not always depend on one's parent - column names are ot sufficiently differentFind 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 detectionsystem catalog base tables only2022-11-26 17:19MIT License
840Do not leave out the referential constraints (islands)Try to find missing foreign key constraints. Find base tables that do not participate in any referential constraint (as the referenced table or as the referencing table). These tables are like "islands" in the database schema.Problem detectionsystem catalog base tables only2021-03-10 12:20MIT License