| Goal | This query checks whether columns storing standardized data—such as email addresses, phone numbers, IP addresses, postal codes, physical addresses, and file paths—have inconsistent field sizes across different tables. Identifying these discrepancies helps maintain a uniform database schema. |
|---|---|
| Notes | The query considers both column names in English and Estonian. Missing field size, i.e., unilimited field size is considered as a separate field size. |
| Type | Problem detection (Each row in the result could represent a flaw in the design) |
| Reliability | Medium (Medium number of false-positive results) |
| License | MIT (opens in new tab) |
| Fixing Suggestion | If there are specific requirements that tell otherwise use consistent field sizes. |
| Data Source | INFORMATION_SCHEMA only |
| SQL Query |
|
Collections
This query belongs to the following collections:
Find problems about base tables
A selection of queries that return information about the data types, field sizes, default values as well as general structure of base tables. Contains all the types of queries - problem detection, software measure, and general overview
Find problems automatically
Queries, that results point to problems in the database. Each query in the collection produces an initial assessment. However, a human reviewer has the final say as to whether there is a problem or not .
| Name | Description |
|---|---|
| Find problems about base tables | A selection of queries that return information about the data types, field sizes, default values as well as general structure of base tables. Contains all the types of queries - problem detection, software measure, and general overview |
| Find problems automatically | Queries, that results point to problems in the database. Each query in the collection produces an initial assessment. However, a human reviewer has the final say as to whether there is a problem or not . |
Categories
This query is classified under the following categories:
Field size
Queries of this category provide information about the maximum size of values that can be recorded in column fields
Inconsistencies
Queries of this catergory provide information about inconsistencies of solving the same problem in different places.
Result quality depends on names
Queries of this category use names (for instance, column names) to try to guess the meaning of a database object. Thus, the goodness of names determines the number of false positive and false negative results.
| Name | Description |
|---|---|
| Field size | Queries of this category provide information about the maximum size of values that can be recorded in column fields |
| Inconsistencies | Queries of this catergory provide information about inconsistencies of solving the same problem in different places. |
| Result quality depends on names | Queries of this category use names (for instance, column names) to try to guess the meaning of a database object. Thus, the goodness of names determines the number of false positive and false negative results. |