Filter Queries
Found 1053 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.
#581. The number and percentage of base tables without keys
INFORMATION_SCHEMA onlyFind the extent in which repeating rows are permitted in the database. Find the number and percentage (from the total number of base tables) of base tables that do not have the PRIMARY KEY constraint and also do not have any UNIQUE constraints.
#582. The longest referential paths
system catalog base tables onlyFind the longest referential paths between the tables regardless of the schema that contain the tables.
#583. Names of database objects that contain a digit
INFORMATION_SCHEMA+system catalog base tablesFind 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.
#584. Stating the obvious (column names)
INFORMATION_SCHEMA onlyFind the names of columns where the name of the column contains a part of the name of the data type of the column. For instance, the query finds columns, were the name contains fragments integer_ or _integer.
#585. System-generated table constraint names (constraints that involve one column)
system catalog base tables onlyFind 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.
#586. Perhaps 0 instead of o
INFORMATION_SCHEMA+system catalog base tablesFind the names of database objects where 0 sign is perhaps used instead of o.
#587. Names of database objects with perhaps too many digits
INFORMATION_SCHEMA+system catalog base tablesFind the names of database objects where more than half the signs are digits.
#588. Stating the obvious (2)
INFORMATION_SCHEMA+system catalog base tablesFind the names of database objects where the name of the database object contains a part of the name of the object type. For instance, the query finds base tables, were the name contains fragments _base, base_, _table, or table_.
#589. Naming of declarative base table constraints
INFORMATION_SCHEMA+system catalog base tablesFind the names of declarative base table constraints. Naming of constraints must be consistent. For instance, do not mix system-defined and user-defined names.
#590. Naming of tables
INFORMATION_SCHEMA+system catalog base tablesFind the names of different types (base table, foreign table, view, materialized view) of tables. Naming of tables must be consistent. For instance, do not mix names in plural and singular form within the same table type.
#591. System-generated domain CHECK constraint names
INFORMATION_SCHEMA onlyFind the names of domain CHECK constraints that have been system-generated. 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.
#592. Perhaps a too generic foreign key column name
system catalog base tables onlyFind the names of foreign key columns that are too generic. The expressive names of table columns allow database users better and more quickly understand the meaning of data in the database. A person could participate in a process or be associated with an object due to different reasons. Thus, foreign key column names like isik_id, person_id, tootaja_id, worker_id etc. are too generic. The name should refer (also) to the reason why the person is connected.
#593. Too generic names (parameters)
INFORMATION_SCHEMA+system catalog base tablesFind the names of parameters that are too generic. The routines work with data/information. Thus, it is not a good style to use generic words like data, information, parameter, etc. In the names of parameters. Moreover, avoid too generic parameter names like: id, tyyp, kood, aeg, kp,type, code, time, date, fk, pk, param.
#594. Perhaps primary key columns could be renamed
system catalog base tables onlyFind the names of simple primary key columns that name does not follow the pattern
#595. The same CHECK has a different name in different places
system catalog base tables onlyFind the names of table CHECK constraints that have the same Boolean expression but a different naming style in different places (tables). The naming of constraints should be consistent. "If you do something a certain way, do all similar things in the same way." (Robert C. Martin, Clean Code)x
#596. Name starts or ends with spaces
INFORMATION_SCHEMA+system catalog base tablesFind the names of user-defined database objects (must be delimited identifiers) that start or end with spaces.
#597. Consistency of using generic column names in candidate key columns that are not foreign key columns
INFORMATION_SCHEMA+system catalog base tablesFind the names on base table columns that are a part of a candidate key but not a foreign key and contain a generic word (nimi, nimetus, kommentaar, kirjeldus, name, comment, description, etc.). Make sure that naming of these is consistent, i.e., such names always contain the table name or never contain the table name.
#598. Consistency of using generic column names in non-candidate key columns that are also not foreign key columns
INFORMATION_SCHEMA+system catalog base tablesFind the names on base table columns that are not a part of a candidate key and a foreign key and contain a generic word (nimi, nimetus, kommentaar, kirjeldus, name, comment, description, etc.). Make sure that naming of these is consistent, i.e., such names always contain the table name or never contain the table name.
#599. The same name is used in different contexsts
INFORMATION_SCHEMA+system catalog base tablesFind the names that are used in case of different types of elements
#600. The number and percentage of base tables where all the non-primary key columns are optional
INFORMATION_SCHEMA onlyFind the number and percentage of base tables where all the non-primary key columns are optional
| # | Name | Goal (sorted ascending) | Type | Data source | Last update | License | Actions |
|---|---|---|---|---|---|---|---|
| 581 | The number and percentage of base tables without keys | Find the extent in which repeating rows are permitted in the database. Find the number and percentage (from the total number of base tables) of base tables that do not have the PRIMARY KEY constraint and also do not have any UNIQUE constraints. | Sofware measure | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 582 | 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 | MIT (opens in new tab) | View (opens in new tab) | |
| 583 | 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 | MIT (opens in new tab) | View (opens in new tab) | |
| 584 | Stating the obvious (column names) | Find the names of columns where the name of the column contains a part of the name of the data type of the column. For instance, the query finds columns, were the name contains fragments integer_ or _integer. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 585 | 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 | MIT (opens in new tab) | View (opens in new tab) | |
| 586 | Perhaps 0 instead of o | Find the names of database objects where 0 sign is perhaps used instead of o. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 587 | Names of database objects with perhaps too many digits | Find the names of database objects where more than half the signs are digits. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 588 | Stating the obvious (2) | Find the names of database objects where the name of the database object contains a part of the name of the object type. For instance, the query finds base tables, were the name contains fragments _base, base_, _table, or table_. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 589 | Naming of declarative base table constraints | Find the names of declarative base table constraints. Naming of constraints must be consistent. For instance, do not mix system-defined and user-defined names. | General | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 590 | Naming of tables | Find the names of different types (base table, foreign table, view, materialized view) of tables. Naming of tables must be consistent. For instance, do not mix names in plural and singular form within the same table type. | General | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 591 | System-generated domain CHECK constraint names | Find the names of domain CHECK constraints that have been system-generated. 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 | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 592 | Perhaps a too generic foreign key column name | Find the names of foreign key columns that are too generic. The expressive names of table columns allow database users better and more quickly understand the meaning of data in the database. A person could participate in a process or be associated with an object due to different reasons. Thus, foreign key column names like isik_id, person_id, tootaja_id, worker_id etc. are too generic. The name should refer (also) to the reason why the person is connected. | Problem detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 593 | Too generic names (parameters) | Find the names of parameters that are too generic. The routines work with data/information. Thus, it is not a good style to use generic words like data, information, parameter, etc. In the names of parameters. Moreover, avoid too generic parameter names like: id, tyyp, kood, aeg, kp,type, code, time, date, fk, pk, param. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 594 | Perhaps primary key columns could be renamed | Find the names of simple primary key columns that name does not follow the pattern |
Problem detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 595 | The same CHECK has a different name in different places | Find the names of table CHECK constraints that have the same Boolean expression but a different naming style in different places (tables). The naming of constraints should be consistent. "If you do something a certain way, do all similar things in the same way." (Robert C. Martin, Clean Code)x | Problem detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 596 | 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 | MIT (opens in new tab) | View (opens in new tab) | |
| 597 | Consistency of using generic column names in candidate key columns that are not foreign key columns | Find the names on base table columns that are a part of a candidate key but not a foreign key and contain a generic word (nimi, nimetus, kommentaar, kirjeldus, name, comment, description, etc.). Make sure that naming of these is consistent, i.e., such names always contain the table name or never contain the table name. | General | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 598 | Consistency of using generic column names in non-candidate key columns that are also not foreign key columns | Find the names on base table columns that are not a part of a candidate key and a foreign key and contain a generic word (nimi, nimetus, kommentaar, kirjeldus, name, comment, description, etc.). Make sure that naming of these is consistent, i.e., such names always contain the table name or never contain the table name. | General | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 599 | The same name is used in different contexsts | Find the names that are used in case of different types of elements | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 600 | The number and percentage of base tables where all the non-primary key columns are optional | Find the number and percentage of base tables where all the non-primary key columns are optional | Sofware measure | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) |