The list of all the queries

Prefixes of base table names

Query goal: Find base tables that name starts with a prefix. Do not use prefixes in case of base table names. Derive the names from the names of entity types. Do not use "_", "t_", "tab_", "t11_" etc as prefixes of a table.
Notes about the query: In case of finding prefixes the query assumes the use of snake case writing style and that the prefix is separated from the rest of the name by an underscore. The query returns false positive results if the table name starts with a short word (like dog or cat) that is not actually a prefix.
Query type: Problem detection (Each row in the result could represent a flaw in the design)
Query reliability: Medium (Medium number of false-positive results)
Query license: MIT License
Fixing suggestion: Rename the table and remove the prefix.
Data source: INFORMATION_SCHEMA only
SQL query: Click on query to copy it

SELECT table_schema, table_name
FROM information_schema.tables
WHERE table_type='BASE TABLE' 
AND table_name~*'^(_|[[:alpha:]]_|(tb|tbl|tab|table|tabel)_|[[:alpha:]][[:digit:]]+_)'
AND table_schema NOT IN (SELECT schema_name
FROM INFORMATION_SCHEMA.schemata
WHERE schema_name<>'public' AND
schema_owner='postgres' AND schema_name IS NOT NULL)
ORDER BY table_schema, table_name;

Collections where the query belongs to

Collection nameCollection description
Find problems about namesA selection of queries that return information about the names of database objects. Contains all the types of queries - problem detection, software measure, and general overview.
Find problems automaticallyQueries, that results point to problems in the database. Each query in the collection produces an initial assessment. However, a human reviewer has the final say as to whether there is a problem or not .

Categories where the query belongs to

Category nameCategory description
NamingQueries of this category provide information about the style of naming.

Reference materials for further reading

Reference
https://www.sqlstyle.guide/

The list of all the queries