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.
#441. Domain candidates
INFORMATION_SCHEMA+system catalog base tablesFind column descriptions that are candidates for describing a domain.
#442. Domain CHECK constraints with the same name
INFORMATION_SCHEMA onlyFind domain check constraint names that are used more than once (within the same schema or in different schemas). Different things should have different names. However, here different constraints have the same name. Also make sure that this is not a sign of duplication of domains.
#443. Domain declares the same default value for multiple independent foreign keys
INFORMATION_SCHEMA+system catalog base tablesFind domains that declare a default value and that are used in case of multiple foreign key constraints that point to different tables. Domains should be used in a manner that does not cause unnecessary coupling of concerns. For instance, let us assume that columns client_state_type_code of table Client (that is used to implement the relationship with table Client_state_type) and worker_state_type_code of table Worker (that is used to implement the relationship with table Worker_state_type) have been defined based on the same domain. It the domain has a default value, then it determines the initial state of both clients and workers. However, it must be possible to determine the initial state independently in case of clients and workers.
#444. Domain name and type name are the same
INFORMATION_SCHEMA+system catalog base tablesUse different names to avoid confusion.
#445. Domain name contains base table name
INFORMATION_SCHEMA onlyFind names of domains that contain the name of the table that column the domain specifies. Domains are reusable artifacts that one should be able to use in case of different base tables. Thus, it is inappropriate to use the name of a particular table in the name of the domain.
#446. Domains that are associated with a sequence generator
INFORMATION_SCHEMA onlyDomains are reusable artifacts. By associating a domain with a sequence generator, one essentially starts to share sequence generators between tables. It may cause a potential performance bottleneck by having a shared resource. By having a shared sequence it is not possible to change properties of sequences of different tables independently, i.e., it increases coupling between tables.
#447. Domains with the same name in different schemas
INFORMATION_SCHEMA onlyDomains are like words that can be used to construct generalized claims about the real world (table predicates). Better not to duplicate the words in the dictionary.
#448. Domain usage in base tables
INFORMATION_SCHEMA onlyFind for each domain the number of usages in base tables. The less you have managed to reuse domains in case of different columns, the more you have wasted your time by creating the domains.
#449. Do not always depend on one's parent
system catalog base tables onlyFind where a hierarchical structure is implemented in a base table by adding a foreign key that refers to a candidate key of the same table.
#450. Do not always depend on one's parent - column names are ot sufficiently different
system catalog base tables onlyFind where a hierarchical structure is implemented in a base table by adding a foreign key that refers to a candidate key of the same table. Find only cases where the candidate key and foreign key column names are very similar (Levenshtein distance shorter than four).
#451. Do not always depend on one's parent (INFORMATION_SCHEMA)
INFORMATION_SCHEMA onlyFind where a hierarchical structure is implemented in a base table by having a foreign key that refers to a candidate key of the same table. This design is called adjacency list.
#452. Do not assume you must use files
INFORMATION_SCHEMA onlyFind cases where you store images and other media as files outside the database and store in the database only paths to the files.
#453. Do not assume you must use files (based on user data)
INFORMATION_SCHEMA+system catalog base tablesFind cases where you store images and other media as files outside the database and store in the database only paths to the files.
#454. Do not clone columns
INFORMATION_SCHEMA only"Split a base table column into multiple columns based on the values in some other column. Each such newly created column has the name, a part of which is a data value from the original tables."(Bill Karwin) Find base tables that have more than one columns with the same type and field size and the difference between the columns are the year or month number at the end of the column name (two or four numbers, preceded by an underscore).
#455. Do not clone tables
INFORMATION_SCHEMA onlyFind cases where a base table has been split horizontally into multiple smaller base tables based on the distinct values in one of the columns of the original table. Each such newly created table has the name, a part of which is a data value from the original tables. Find base tables that have the same columns (column name, column order, data type) and the difference between the tables are the numbers in the table names (table1, table2, etc.).
#456. Do not create multiple columns for the same attribute
INFORMATION_SCHEMA onlyFind base tables that implement recording multivalued attribute values with the help of repeating group of columns. Find base tables that have more than one columns with the same type and field size and the difference between the columns are the numbers in the column names (column1, column2, etc.).
#457. Do not create user-defined routines that have the same name as some installed extension routine
INFORMATION_SCHEMA+system catalog base tablesAvoid creating user-defined routines that have the same name as some extension routine because it may cause confusion.
#458. Do not format comma-separated lists (based on column names)
INFORMATION_SCHEMA onlyFind, based on column names, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table or a foreign table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters.
#459. Do not format comma-separated lists (based on default values)
INFORMATION_SCHEMA onlyFind, based on default values, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table or a foreign table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters.
#460. Do not format comma-separated lists (based on user data)
INFORMATION_SCHEMA+system catalog base tablesFind, based on the data that users have recoreded in a database, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters.
| # | Name(activate to sort ascending) | Goal(activate to sort ascending) | Type(activate to sort ascending) | Data source(activate to sort ascending) | Last update(sorted descending, activate to sort ascending) | License | Actions |
|---|---|---|---|---|---|---|---|
| 441 | Domain candidates | Find column descriptions that are candidates for describing a domain. | General | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 442 | Domain CHECK constraints with the same name | Find domain check constraint names that are used more than once (within the same schema or in different schemas). Different things should have different names. However, here different constraints have the same name. Also make sure that this is not a sign of duplication of domains. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 443 | Domain declares the same default value for multiple independent foreign keys | Find domains that declare a default value and that are used in case of multiple foreign key constraints that point to different tables. Domains should be used in a manner that does not cause unnecessary coupling of concerns. For instance, let us assume that columns client_state_type_code of table Client (that is used to implement the relationship with table Client_state_type) and worker_state_type_code of table Worker (that is used to implement the relationship with table Worker_state_type) have been defined based on the same domain. It the domain has a default value, then it determines the initial state of both clients and workers. However, it must be possible to determine the initial state independently in case of clients and workers. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 444 | Domain name and type name are the same | Use different names to avoid confusion. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 445 | Domain name contains base table name | Find names of domains that contain the name of the table that column the domain specifies. Domains are reusable artifacts that one should be able to use in case of different base tables. Thus, it is inappropriate to use the name of a particular table in the name of the domain. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 446 | Domains that are associated with a sequence generator | Domains are reusable artifacts. By associating a domain with a sequence generator, one essentially starts to share sequence generators between tables. It may cause a potential performance bottleneck by having a shared resource. By having a shared sequence it is not possible to change properties of sequences of different tables independently, i.e., it increases coupling between tables. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 447 | Domains with the same name in different schemas | Domains are like words that can be used to construct generalized claims about the real world (table predicates). Better not to duplicate the words in the dictionary. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 448 | Domain usage in base tables | Find for each domain the number of usages in base tables. The less you have managed to reuse domains in case of different columns, the more you have wasted your time by creating the domains. | General | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 449 | Do not always depend on one's parent | Find where a hierarchical structure is implemented in a base table by adding a foreign key that refers to a candidate key of the same table. | General | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 450 | Do not always depend on one's parent - column names are ot sufficiently different | Find where a hierarchical structure is implemented in a base table by adding a foreign key that refers to a candidate key of the same table. Find only cases where the candidate key and foreign key column names are very similar (Levenshtein distance shorter than four). | Problem detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 451 | Do not always depend on one's parent (INFORMATION_SCHEMA) | Find where a hierarchical structure is implemented in a base table by having a foreign key that refers to a candidate key of the same table. This design is called adjacency list. | General | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 452 | Do not assume you must use files | Find cases where you store images and other media as files outside the database and store in the database only paths to the files. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 453 | Do not assume you must use files (based on user data) | Find cases where you store images and other media as files outside the database and store in the database only paths to the files. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 454 | Do not clone columns | "Split a base table column into multiple columns based on the values in some other column. Each such newly created column has the name, a part of which is a data value from the original tables."(Bill Karwin) Find base tables that have more than one columns with the same type and field size and the difference between the columns are the year or month number at the end of the column name (two or four numbers, preceded by an underscore). | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 455 | Do not clone tables | Find cases where a base table has been split horizontally into multiple smaller base tables based on the distinct values in one of the columns of the original table. Each such newly created table has the name, a part of which is a data value from the original tables. Find base tables that have the same columns (column name, column order, data type) and the difference between the tables are the numbers in the table names (table1, table2, etc.). | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 456 | Do not create multiple columns for the same attribute | Find base tables that implement recording multivalued attribute values with the help of repeating group of columns. Find base tables that have more than one columns with the same type and field size and the difference between the columns are the numbers in the column names (column1, column2, etc.). | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 457 | Do not create user-defined routines that have the same name as some installed extension routine | Avoid creating user-defined routines that have the same name as some extension routine because it may cause confusion. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 458 | Do not format comma-separated lists (based on column names) | Find, based on column names, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table or a foreign table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 459 | Do not format comma-separated lists (based on default values) | Find, based on default values, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table or a foreign table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 460 | Do not format comma-separated lists (based on user data) | Find, based on the data that users have recoreded in a database, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) |