Filter Queries
Found 1056 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 the relatively small amount of data in the system catalog of a database.
#981. Frequency of name components of database objects
INFORMATION_SCHEMA+system catalog base tables"Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find, what are the most popular components of the names (identifiers) of user-defined database objects, assuming, that the separator of the components is "_".
#982. Frequency of table name lengths based on the table type
INFORMATION_SCHEMA+system catalog base tablesThis query provides a statistical analysis of identifier length across the schema. It calculates a frequency distribution by grouping base tables, views, and materialized views based on the character length of their names. The result is a count of how many objects exist for each distinct name length, which can be used to audit naming conventions or identify outliers.
#983. Frequent names of database objects
INFORMATION_SCHEMA+system catalog base tables"Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the names (identifiers) of user-defined database objects that occur at least twice as frequently as a name occurs in average. Also make sure that there is no duplication in play.
#984. Frequent names of database objects by object type
INFORMATION_SCHEMA+system catalog base tables"Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the names (identifiers) of user-defined database objects that occur at least twice as frequently as a name occurs in average in case of the particular type of database objects. Also make sure that there is no duplication in play.
#985. Logical size of a schema
INFORMATION_SCHEMA+system catalog base tablesThe schema size is the sum of the sizes of all tables in the schema.
#986. Logical size of a table
INFORMATION_SCHEMA+system catalog base tablesThe table size is the sum of the total size of the simple columns and the total size of the complex columns in the table. In case of SQL databases large base tables in terms of number of columns could be a side effect of the problems with cloned columns or multiple columns for the same attribute. A base table with a low normalization level, which is meant to hold data that corresponds to multiple entity types has typically also relatively large number of columns compared with other base tables. Thus, the normalization level of base tables with a large number of columns should be checked as well.
#987. Median and average number of subcomponents in the names of database objects
INFORMATION_SCHEMA+system catalog base tables"Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the median and average (arithmetic mean) number of subcomponents in the names of user-defined database objects. The values could be used to compare different databases.
#988. Median and average of the length of names of database objects
INFORMATION_SCHEMA+system catalog base tables"Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the median length and average (arithmetic mean) length of the names (identifiers) of user-defined database objects. The values could be used to compare different databases.
#989. Median and average of the length of names of database objects by the object type
INFORMATION_SCHEMA+system catalog base tables"Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the median length and average (arithmetic mean) length of the names (identifiers) of user-defined database objects by the object type. The values could be used to compare different databases.
#990. Name does not contain any vowels (aggregate view)
INFORMATION_SCHEMA+system catalog base tablesFind aggregate information about the names of database objects that do not contain any vowels.
#991. Names of database objects that perhaps end with a sequence number (aggregate view)
INFORMATION_SCHEMA+system catalog base tablesThis query provides a statistical overview of a potential naming convention issue by counting the number of user-defined database object identifiers that terminate in one or two numerical digits. This naming pattern is a design smell, often indicating bad database structure or semantic ambiguity. Instead of listing each individual name, the query returns an aggregate count, which is useful for quickly assessing the overall prevalence of this issue within the schema and tracking remediation progress over time.
#992. Number of columns covered with constraints
INFORMATION_SCHEMA+system catalog base tablesFor different types of constraints find the number of columns covered with constraints of such type.
#993. Number of derived tables that aggregate data
INFORMATION_SCHEMA+system catalog base tablesFind the number of derived tables that aggregate data.
#994. Number of system-generated and user-defined constraint names by constraint type (constraints that involve more than one column)
system catalog base tables onlyFind the number of system-generated constraint names by constraint type. 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.
#995. Number of system-generated and user-defined constraint names by constraint type (constraints that involve one column)
system catalog base tables onlyFind the number of system-generated constraint names by constraint type. 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.
#996. Number of tables covered by derived tables
INFORMATION_SCHEMA+system catalog base tablesFind the number of base tables, the number of base tables that are referred from at least one derived table (view or materialized view), the number of base tables that are referred from at least one view, and the number of base tables that are referred from at least one materialized view. If the database is used through the public database interface (virtual data layer), then, ideally, each table is referred from the subquery of at least one derived table.
#997. Number of underlying tables of derived tables
INFORMATION_SCHEMA+system catalog base tablesFind for each view or materialized view the number of tables based on which the derived table has been directly defined. These tables could be base tables or derived tables.
#998. Number of used tables
INFORMATION_SCHEMA+system catalog base tablesFind statistics about how many derived tables have how many different underlying tables.
#999. Number of using views
INFORMATION_SCHEMA+system catalog base tablesFind statistics about how many base tables have how many derived tables that use these tables.
#1000. Number of views with and without security barrier
INFORMATION_SCHEMA+system catalog base tablesFind the number of views, the number of views with and without security barrier setting, and the names of views with and without the security barrier setting.
| # | Name(activate to sort ascending) | Goal(activate to sort ascending) | Type(sorted ascending, activate to sort descending) | Data source(activate to sort ascending) | Last update(activate to sort ascending) | License | Actions |
|---|---|---|---|---|---|---|---|
| 981 | Frequency of name components of database objects | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find, what are the most popular components of the names (identifiers) of user-defined database objects, assuming, that the separator of the components is "_". | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 982 | Frequency of table name lengths based on the table type | This query provides a statistical analysis of identifier length across the schema. It calculates a frequency distribution by grouping base tables, views, and materialized views based on the character length of their names. The result is a count of how many objects exist for each distinct name length, which can be used to audit naming conventions or identify outliers. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 983 | Frequent names of database objects | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the names (identifiers) of user-defined database objects that occur at least twice as frequently as a name occurs in average. Also make sure that there is no duplication in play. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 984 | Frequent names of database objects by object type | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the names (identifiers) of user-defined database objects that occur at least twice as frequently as a name occurs in average in case of the particular type of database objects. Also make sure that there is no duplication in play. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 985 | Logical size of a schema | The schema size is the sum of the sizes of all tables in the schema. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 986 | Logical size of a table | The table size is the sum of the total size of the simple columns and the total size of the complex columns in the table. In case of SQL databases large base tables in terms of number of columns could be a side effect of the problems with cloned columns or multiple columns for the same attribute. A base table with a low normalization level, which is meant to hold data that corresponds to multiple entity types has typically also relatively large number of columns compared with other base tables. Thus, the normalization level of base tables with a large number of columns should be checked as well. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 987 | Median and average number of subcomponents in the names of database objects | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the median and average (arithmetic mean) number of subcomponents in the names of user-defined database objects. The values could be used to compare different databases. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 988 | Median and average of the length of names of database objects | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the median length and average (arithmetic mean) length of the names (identifiers) of user-defined database objects. The values could be used to compare different databases. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 989 | Median and average of the length of names of database objects by the object type | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the median length and average (arithmetic mean) length of the names (identifiers) of user-defined database objects by the object type. The values could be used to compare different databases. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 990 | Name does not contain any vowels (aggregate view) | Find aggregate information about the names of database objects that do not contain any vowels. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 991 | Names of database objects that perhaps end with a sequence number (aggregate view) | This query provides a statistical overview of a potential naming convention issue by counting the number of user-defined database object identifiers that terminate in one or two numerical digits. This naming pattern is a design smell, often indicating bad database structure or semantic ambiguity. Instead of listing each individual name, the query returns an aggregate count, which is useful for quickly assessing the overall prevalence of this issue within the schema and tracking remediation progress over time. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 992 | Number of columns covered with constraints | For different types of constraints find the number of columns covered with constraints of such type. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 993 | Number of derived tables that aggregate data | Find the number of derived tables that aggregate data. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 994 | Number of system-generated and user-defined constraint names by constraint type (constraints that involve more than one column) | Find the number of system-generated constraint names by constraint type. 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. | Sofware measure | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 995 | Number of system-generated and user-defined constraint names by constraint type (constraints that involve one column) | Find the number of system-generated constraint names by constraint type. 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. | Sofware measure | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 996 | Number of tables covered by derived tables | Find the number of base tables, the number of base tables that are referred from at least one derived table (view or materialized view), the number of base tables that are referred from at least one view, and the number of base tables that are referred from at least one materialized view. If the database is used through the public database interface (virtual data layer), then, ideally, each table is referred from the subquery of at least one derived table. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 997 | Number of underlying tables of derived tables | Find for each view or materialized view the number of tables based on which the derived table has been directly defined. These tables could be base tables or derived tables. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 998 | Number of used tables | Find statistics about how many derived tables have how many different underlying tables. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 999 | Number of using views | Find statistics about how many base tables have how many derived tables that use these tables. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 1000 | Number of views with and without security barrier | Find the number of views, the number of views with and without security barrier setting, and the names of views with and without the security barrier setting. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) |