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...
581The number of tables based on the number of columnsFind how many tables with a certain range of the number of columns there are in the database.Sofware measureINFORMATION_SCHEMA+system catalog base tables2021-03-25 11:17MIT License
582Inconsistent data type usage in case of registering a dateFind as to whether there are multiple different types used in case of columns that are meant for registering dates.Problem detectionINFORMATION_SCHEMA only2021-03-21 18:32MIT License
583Inconsistent data type usage in case of registering sums of moneyFind as to whether both the numeric type and integer types are used in case of columns that are meant for register data about prices.Problem detectionINFORMATION_SCHEMA only2021-03-21 18:32MIT License
584Perhaps the type of a base table column/domain should be temporal (deadlines)Find base table columns that name refers to the possibility that there are registered deadlines but the column does not have a temporal type.Problem detectionINFORMATION_SCHEMA only2021-03-21 17:00MIT License
585Base table column of sums of money does not have a numeric type (based on column names)Find base table columns that name refers to the possibility that these are used to register prices/sums of money. Find columns that do not have a numeric type.Problem detectionINFORMATION_SCHEMA only2021-03-21 11:45MIT License
586Base table column of sums of money has too big or small scaleFind base table columns that name refers to the possibility that these are used to register data about prices/sums of money. Find the columns that have decimal type but have a too big (bigger than six) or a too small scale (zero). The selection of field size must be precise and should take into account the possible data in the column.Problem detectionINFORMATION_SCHEMA only2021-03-21 11:45MIT License
587Columns of base tables that hold truth values but do not have a default value (non-Boolean columns)Find non-foreign key columns of base tables that probably (based on the column name) contain values that represent truth values but do not have a default value. There are only two truth values - TRUE and FALSE - in case of two-valued logic. It could be possible to select one of these as the default value in case of the columns.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-20 14:08MIT License
588Columns of base tables that hold truth values but do not restrict the permitted values (non-Boolean columns)Find non-foreign key columns of base tables that probably (based on the column name) contain values that represent truth values but do not have a have a check constraint. The constraint should restrict the permitted values with values that represent truth values TRUE and FALSE.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-20 14:07MIT License
589Three-valued logic (non-Boolean columns)Find non-foreign key columns of base tables that probably (based on the column name) contain values that represent truth values but do not have NOT NULL constraint. Use two-valued logic (TRUE, FALSE) instead of three-valued logic (TRUE, FALSE, UNKNOWN). Because NULL in a Boolean column means unknown make all the columns mandatory.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-20 14:07MIT License
590The number of base table columns by type categoryFind the number of base table columns based on the category of data type that the columns have.Sofware measureINFORMATION_SCHEMA only2021-03-20 12:27MIT License
591Perhaps an unnecessary default value (the empty string or a string that consists of only whitespace) of a base table column/domainFind table columns and domains with the default value that is the empty string or a string that consists of only whitespace (for instance, newlines, spaces).Problem detectionINFORMATION_SCHEMA only2021-03-20 11:42MIT License
592Potentially a classifier table is missing (based on field sizes)Find columns that are not covered by a primary key, unique, and foreign key constraint but have a textual type with the maximum field size 3 or less and where the column name does not refer to names or comments. Return only data about these columns where there is no table with a similar name. Return data only about tables that could be referenced from more than one table.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-18 20:08MIT License
593Do not create multiple columns for the same attributeFind base tables that implement recording multivalued attribute values with the help of repeating group of columns. Find base tables that have more than one columns with the same type and field size and the difference between the columns are the numbers in the column names (column1, column2, etc.).Problem detectionINFORMATION_SCHEMA only2021-03-18 15:57MIT License
594Do not clone tablesFind cases where a base table has been split horizontally into multiple smaller base tables based on the distinct values in one of the columns of the original table. Each such newly created table has the name, a part of which is a data value from the original tables. Find base tables that have the same columns (column name, column order, data type) and the difference between the tables are the numbers in the table names (table1, table2, etc.).Problem detectionINFORMATION_SCHEMA only2021-03-18 14:43MIT License
595Do not leave out the referential constraints (based on classifiers)Find non-key and non-foreign columns of base tables with a textual column and small field size in case of which there is a table with the name that is similar to the column name. Perhaps the table is a classifier table and the column should have a foreign key constraint referencing to the table.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-18 11:14MIT License
596Do not leave out the referential constraints (based on adjacency list design)Try to find missing foreign key constraints. Find non-key and non-foreign key columns of base tables that do not have an associated sequence generator, and that name refers to the possibility that the column holds parent identifiers.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-18 11:13MIT License
597All supertablesFind all the base tables that serve as supertables in the inheritance hierarchiesSofware measuresystem catalog base tables only2021-03-14 17:07MIT License
598Do not use FLOAT Data TypeFind base table columns that have FLOAT, REAL, or DOUBLE PRECISION type. "The data types real and double precision are inexact, variable-precision numeric types. On all currently supported platforms, these types are implementations of IEEE Standard 754 for Binary Floating-Point Arithmetic (single and double precision, respectively), to the extent that the underlying processor, operating system, and compiler support it." (PostgreSQL documentation) Do not use the approximate numeric types FLOAT, REAL, and DOUBLE PRECISION in order to present fractional numeric data. Due to the use of the IEEE 754 standard the results of calculations with the values, which have one of these types, can be inexact because out of necessity some numbers must be rounded to a value, which is very close. "Comparing two floating-point values for equality might not always work as expected." (PostgreSQL documentation)Problem detectionINFORMATION_SCHEMA only2021-03-12 15:41MIT License
599Do 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
600Disabled 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