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

AND
AND
ANDQueries of this category could be used specifically in the learning environment to assess as to whether student projects have filled certain criteria.
ANDFrom where does the query gets its information?
AND
AND

There are 11 queries.

Seq nrNameGoalTypeData sourceLast updateLicense...
1A large number of triggersShow user-defined triggers if there are more than 9 different trigger routine bodies, i.e., different triggers on different tables that do the same thing count as one trigger.GeneralINFORMATION_SCHEMA+system catalog base tables2023-12-25 11:23MIT License
2Are there enough routines that implement database operations?Find user-defined routines that implement database operations (comment refers to an operation) but show these only if there are at least eight such routines. Contracts of database operations are specified in the system analysis documentation. The contracts apply the idea of design by contract in the field of databases.GeneralINFORMATION_SCHEMA+system catalog base tables2021-11-03 20:07MIT License
3Base tables with plenty of dataFind base tables that have 1000 rows or more.Generalsystem catalog base tables only2022-10-21 11:25MIT License
4Exclude constraint to prevent overlapping time periodsFind exclude constraints on base tables with multiple date/timestamp columns that prevent overlapping time periods.GeneralINFORMATION_SCHEMA+system catalog base tables2023-11-07 00:44MIT License
5Insufficient number of user-defined base tablesThere must be at least n (seven in this case) user-defined base tables in the database.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
6Insufficient number of user-defined domainsThere must be at least n (one in this case) user-defined domains in the database each of that must be used in case of at least two columns of base tables.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
7Insufficient number of user-defined foreign tablesThere must be at least n (two in this case) user-defined foreign tables in the database.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
8Insufficient number of user-defined non-trigger routinesThere must be at least n (four in this case) user-defined non-trigger routines in the database.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
9Insufficient number of user-defined triggers+rulesThere must be user-defined triggers and/or rules for at least n (three in this case) tasks in the database. It also means that one should create at least three triggers and/or rules in the database.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-04 11:47MIT License
10Insufficient number of user-defined triggers+rules (based on number of tasks)There must be user-defined triggers and/or rules for at least n (three in this case) tasks in the database.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-04 11:46MIT License
11Insufficient number of user-defined viewsThere must be at least n (four in this case) user-defined views in the database.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License