Filter Queries

Found 1050 queries.

  • All the queries about database objects contain a subcondition to exclude from the result information about the system catalog.
  • Although the statements use SQL constructs (common table expressions; NOT in subqueries) that could cause performance problems in case of large datasets it shouldn't be a problem in case of relatively small amount of data, which is in the system catalog of a database.
  • Statistics about the catalog content and project home in GitHub that has additional information.

# Name Goal Type Data source Last update License
1001 Simple check constraints with multiple tasks Find simple check constraints, i.e., check constraints that cover one column that seem to have multiple tasks. The corresponding code smell in case of cleaning code is "G30: Functions Should Do One Thing". (Robert C. Martin, Clean Code) Problem detection system catalog base tables only 2025-11-07 10:11 MIT License View
1002 Simple primary keys that column name does not contain the table name Find simple primary keys that column name does not contain the table name. The naming should be clear and consistent. Problem detection system catalog base tables only 2025-11-07 10:11 MIT License View
1003 System-generated table constraint names (constraints that involve one column) Find the names of database constraints that have been system-generated. Additional restrictions are that the constraints must involve only one column and are associated directly with a table (not through a domain). Names should follow the same style. If there is a mix of system-generated and user-defined names, then the style is most probably different. Problem detection system catalog base tables only 2025-11-07 10:11 MIT License View
1004 Table constraints with the cardinality bigger than one Find constraints that involve more than one columns. Check as to whether the names follow a common style or not. General system catalog base tables only 2025-11-07 10:11 MIT License View
1005 Table constraints with the same name (constraints connected directly with a base table or a foreign table) Find base table and foreign table constraint names that are used in a database more than once (possibly in different schemas or in case of different types of constraints). 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 detection system catalog base tables only 2025-11-07 10:11 MIT License View
1006 Table inheritance Find inheritance between base tables. Use table inheritance carefully because, for instance, certain constraints are not inherited and must be redefined on child tables. General system catalog base tables only 2025-11-07 10:11 MIT License View
1007 Table inheritance (path view) Find in case of each base table that participates in a table inheritance hierarchy the path to the table from the top-level table. Use table inheritance carefully because, for instance, certain constraints are not inherited and must be redefined on child tables. Also make sure that the identifier of each child table in an inheritance hierarchy is a hyponym of the identifier of its parent table. General system catalog base tables only 2025-11-07 10:11 MIT License View
1008 Tables that have associated user triggers Find information about tables that are associated with triggers. General system catalog base tables only 2025-11-07 10:11 MIT License View
1009 Temporal function in a simple check constraint is inconsistent with the column type Find base table columns with a check constraint that refers to a temporal function (current_timestamp, localtimestamp, current_date, or now) that return type is inconsistent with the data type of the column. Problem detection system catalog base tables only 2025-11-07 10:11 MIT License View
1010 The expression of a check constraint that is associated with a domain needs type conversion Find check constraints of domains where the Boolean expression invokes an operation that does not match with the data type of the domain. Problem detection system catalog base tables only 2025-11-07 10:11 MIT License View
1011 The longest referential paths Find the longest referential paths between the tables regardless of the schema that contain the tables. Sofware measure system catalog base tables only 2025-11-07 10:11 MIT License View
1012 The number of compensating actions of foreign key constraints Find the number of compensating actions that are specified in case of foreign key constraints. Sofware measure system catalog base tables only 2025-11-07 10:11 MIT License View
1013 The number of direct and indirect child tables (foreign keys) Find the number of direct and all (direct+indirect) child tables of a base table based on the foreign keys. The result may help to classify the data. If the number of direct children is small but the number of all children is large, then the table probably contains classifiers. If both the number of direct and all children is large, then the table probably contains master data. If the number of all children is small, then the table probably contains transactional data, logs, or descriptive information of main entities. Sofware measure system catalog base tables only 2025-11-07 10:11 MIT License View
1014 The number of direct and indirect child tables (table inheritance) Find the number of direct and all (direct+indirect) child tables of a base table based on the table inheritance. Sofware measure system catalog base tables only 2025-11-07 10:11 MIT License View
1015 The number of referencing base tables Find how many base tables reference to a base table by using foreign keys. The more references there are the more impact the change of the table could have to the overall system. Sofware measure system catalog base tables only 2025-11-07 10:11 MIT License View
1016 The number of rules by different characteristics Find the number of rules by event (SELECT, INSERT, UPDATE, and DELETE) and in total. Sofware measure system catalog base tables only 2025-11-07 10:11 MIT License View
1017 The number of schema objects by schema, by type, and in total Find the number of different types of schema objects in different schemas as well as the total number of schema objects. Show the number of objects that belong to an extension as well as the number of (user-defined) objects that do not belong to an extension. Sofware measure system catalog base tables only 2025-11-07 10:11 MIT License View
1018 The number of table constraints with the cardinality bigger than one Find the number of table constraints with the cardinality bigger than one. Find the number, based on the cardinality, constraint type, and cardinality+constraint type. Sofware measure system catalog base tables only 2025-11-07 10:11 MIT License View
1019 The number of user-defined rules Find the number of rules in a database, excluding the rules that are associated with system catalog tables and rules that are created to support views. Rules can be used to maintain data integrity in a database by causing rejection of incorrect insertions and updates. Therefore, the number of rules in a database gives some indications about the state of enforcing constraints at the database level. Sofware measure system catalog base tables only 2025-11-07 10:11 MIT License View
1020 The number of user-defined rules by schema and in total Find the number of rules in a database in different schemas, excluding the rules that are created to support views. Rules can be used to maintain data integrity in a database by causing rejection of incorrect insertions and updates. Therefore, the number of rules in a database gives an indication about the state of enforcing constraints at the database level. Sofware measure system catalog base tables only 2025-11-07 10:11 MIT License View