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...
341Domain CHECK constraint name contains table nameFind names of domain CHECK constraints that contain the name of the base that column the domain specifies. Domains are reusable artifacts that one should be able to use in case of defining different base tables. Thus, it is inappropriate to use the name of a particular table in the name of a domain constraint.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
342Domain CHECK constraints with the same nameFind domain check constraint names that are used more than once (within the same schema or in different schemas). Different things should have different names. However, here different constraints have the same name. Also make sure that this is not a sign of duplication of domains.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
343Domain declares the same default value for multiple independent foreign keysFind domains that declare a default value and that are used in case of multiple foreign key constraints that point to different tables. Domains should be used in a manner that does not cause unnecessary coupling of concerns. For instance, let us assume that columns client_state_type_code of table Client (that is used to implement the relationship with table Client_state_type) and worker_state_type_code of table Worker (that is used to implement the relationship with table Worker_state_type) have been defined based on the same domain. It the domain has a default value, then it determines the initial state of both clients and workers. However, it must be possible to determine the initial state independently in case of clients and workers.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
344Domain name and type name are the sameUse different names to avoid confusion.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
345Domain name contains base table nameFind names of domains that contain the name of the table that column the domain specifies. Domains are reusable artifacts that one should be able to use in case of different base tables. Thus, it is inappropriate to use the name of a particular table in the name of the domain.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
346Domains that are associated with a sequence generatorDomains are reusable artifacts. By associating a domain with a sequence generator, one essentially starts to share sequence generators between tables. It may cause a potential performance bottleneck by having a shared resource. By having a shared sequence it is not possible to change properties of sequences of different tables independently, i.e., it increases coupling between tables.Problem detectionINFORMATION_SCHEMA only2021-03-07 21:08MIT License
347Domains with the same name in different schemasDomains are like words that can be used to construct generalized claims about the real world (table predicates). Better not to duplicate the words in the dictionary.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
348Do 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
349Do not assume you must use filesFind cases where you store images and other media as files outside the database and store in the database only paths to the files.Problem detectionINFORMATION_SCHEMA only2021-03-27 16:55MIT License
350Do not assume you must use files (based on user data)Find cases where you store images and other media as files outside the database and store in the database only paths to the files.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-10 12:58MIT License
351Do not clone columns"Split a base table column into multiple columns based on the values in some other column. Each such newly created column has the name, a part of which is a data value from the original tables."(Bill Karwin) Find base tables that have more than one columns with the same type and field size and the difference between the columns are the year or month number at the end of the column name (two or four numbers, preceded by an underscore).Problem detectionINFORMATION_SCHEMA only2022-11-28 15:15MIT License
352Do 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
353Do 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
354Do not create user-defined routines that have the same name as some installed extension routineAvoid creating user-defined routines that have the same name as some extension routine because it may cause confusion.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-10-25 16:14MIT License
355Do not format comma-separated lists (based on column names)Find, based on column names, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table or a foreign table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters.Problem detectionINFORMATION_SCHEMA only2021-03-10 12:57MIT License
356Do not format comma-separated lists (based on default values)Find, based on default values, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table or a foreign table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters.Problem detectionINFORMATION_SCHEMA only2023-12-30 10:59MIT License
357Do not format comma-separated lists (based on user data)Find, based on the data that users have recoreded in a database, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-12 15:02MIT License
358Do not leave out referential constraints (based on composite keys)Try to find missing foreign key constraints. Find columns of base tables that are not covered by any foreign key constraint but belong to a composite key, do not have an associated sequence generator, and have a name that refers to the possibility that these are used to record some kind of codes or id's. Moreover, there must be at least one other base table that has a column with the same name. Such strategy would find missing constraints in tables that implement many-to-many relationship types but which that are not complete "islands" in terms of missing foreign key constraints.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-10-31 19:21MIT License
359Do 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
360Do 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