Filter Queries

Found 997 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
61 Name contains only consonants and digits Find names of database objects that contain only consonants and digits. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 17:18 MIT License View
62 Names of database objects with perhaps too many subcomponents (terms) that consist of only consonants Find names of database objects where the number of subcomponents (terms) that consist of only consonants is bigger than the number of subcomponents that contain at least one vowel. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 17:18 MIT License View
63 Using in some way reserved (in PostgreSQL) SQL keywords as the names of a database object (aggregate view) "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 not cause confusion. Find the distinct names (identifiers) of user-defined objects that are SQL keywords that are not completely unreserved in PostgreSQL, i.e., these either never cannot be used as regular identifiers or cannot be used in case of some type of database objects. In PostgreSQL "there are several different classes of tokens ranging from those that can never be used as an identifier to those that have absolutely no special status in the parser as compared to an ordinary identifier. " (PostgreSQL manual) Moreover, such identifiers are often too general, i.e., do not provide enough information about the named object. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 17:17 MIT License View
64 Using unreserved (in PostgreSQL) SQL keywords as the names of a database object (aggregate view) "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 not cause confusion. Find the distinct names (identifiers) of user-defined objects that are SQL keywords that are completely unreserved in PostgreSQL. In PostgreSQL "there are several different classes of tokens ranging from those that can never be used as an identifier to those that have absolutely no special status in the parser as compared to an ordinary identifier. " (PostgreSQL manual) Although the names are unreserved keywords in PostgreSQL these could be reserved keywords in other systems, which would complicate database migration. Moreover, such identifiers are often too general, i.e., do not provide enough information about the named object. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 17:17 MIT License View
65 Using unreserved (in PostgreSQL) SQL keywords as the names of a database object (detailed view) "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 not cause confusion. Find the names (identifiers) of user-defined objects that are SQL keywords that are completely unreserved in PostgreSQL. In PostgreSQL "there are several different classes of tokens ranging from those that can never be used as an identifier to those that have absolutely no special status in the parser as compared to an ordinary identifier. " (PostgreSQL manual) Although the names are unreserved keywords in PostgreSQL these could be reserved keywords in other systems, which would complicate database migration. Moreover, such identifiers are often too general, i.e., do not provide enough information about the named object. Think as to whether some better name would be possible. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 17:17 MIT License View
66 Perhaps too many different suffixes in the names of database objects that have the same type One should be consistent in naming, including in the use of suffixes. If you use sufix in the name of a database object, then it should refer to the type of the database object. Do not use different suffixes in the names of database objects that have the same type. Find types of database objects in case of which there are different suffixes in different names. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 17:16 MIT License View
67 The usage of double vs singular underscores or spaces in names as separator of name components Improve the readability of names. Find the number of names (identifiers) of user-defined database objects that contain two or more consecutive underscores or spaces as the separator of name components vs. the number of names that contain a single underscore or space to separate name components. Try to be consistent in the usage of underscores. Sofware measure INFORMATION_SCHEMA+system catalog base tables 2024-12-21 17:16 MIT License View
68 Identifiers that explicitly say that they carry no meaning Find identifiers that explicitly say that they carry no meaning. Such identifier is called "unnamed" or "anonymous". Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 17:15 MIT License View
69 Database objects of the same type and case insensitive name in the same container Find database objects with the same type and case insensitive name in the same container. It can only happen if some of the names are case insensitive and others are case sensitive. For instance, the same schema can contain the table "Client" and client Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 17:13 MIT License View
70 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 2024-12-21 16:50 MIT License View
71 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 2024-12-21 16:49 MIT License View
72 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 2024-12-21 16:47 MIT License View
73 Names of database objects (regular identifiers) that contain $ Find names (identifiers) of user-defined database objects that are regular identifiers and contain the $ sign starting from the second position. "Note that dollar signs are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable." (PostgreSQL manual) Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 16:46 MIT License View
74 Perhaps a too long name, which has been automatically shortened Find names (identifiers) of user-defined database objects that are 63 bytes long. This is the longest permitted length of identifiers if the default value of the NAMEDATALEN parameter has not been changed. PostgreSQL shortens too long identifiers automatically. Automatic code modification could break it somewhere. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 16:46 MIT License View
75 Names of database objects that contain a digit Find the names (identifiers) of user-defined database objects that contain at least one digit. Names should be informative. Duplicates should be avoided. Digits in names are a possible sign of duplication of database objects or unclear names. General INFORMATION_SCHEMA+system catalog base tables 2024-12-21 16:45 MIT License View
76 Name starts or ends with spaces Find the names of user-defined database objects (must be delimited identifiers) that start or end with spaces. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 16:45 MIT License View
77 Names of database objects with perhaps too many subcomponents (terms) "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) The number of subcomponents (terms) should not be too big. Find the names (identifiers) of user-defined database objects that perhaps contain too many subcomponents, assuming, that the separator of the components is "_". Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 16:44 MIT License View
78 Names of database objects that contain dollar sign Find names of database objects that contain a dollar sign ($) that is not the first symbol of the name. In PostgreSQL regular identifiers cannot start with $. However, $ can be used in other positions of the name. "Note that dollar signs are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable." (PostgreSQL documentation) Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 16:43 MIT License View
79 Names of database objects that end with an underscore Find names of database objects that end with a underscore. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 16:42 MIT License View
80 The same database object name is used repeatedly in case the same database object type Find what database object names are used more than once in case the objects of the same type. If the names differ from each other only by digits or underscores, then consider these the same name. For instance, if there are base tables Person and Person2 (in the same schema or different schemas), then the query returns the name Person. Make sure that there is no duplication of implementation elements in the database. General INFORMATION_SCHEMA+system catalog base tables 2024-12-21 16:42 MIT License View