| Goal | This query identifies user-defined database objects—specifically tables, columns, routine parameters, multi-column CHECK constraints, domains, and custom types—whose names contain the coordinating conjunctions "and" (English) or "ja" (Estonian), either separated by underscores (_and_, _ja_) or written in camelCase/PascalCase (...And..., ...Ja...). The presence of a conjunction in an identifier typically indicates that a single database object is overloaded with multiple concepts or responsibilities:
Names where "and" or "ja" merely defines the lower and upper bounds of a single range (such as between_1_and_10 or vahemikus_3_ja_6) are excluded, as they describe one cohesive interval rule rather than multiple concepts. |
|---|---|
| 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) |
| Data Source | INFORMATION_SCHEMA+system catalog |
| SQL Query |
|
Fixing Suggestion
Decompose overloaded database objects: split non-atomic columns (e.g.,
phone_and_email) to satisfy 1NF, break bundled CHECK constraints into individual named rules for clearer error diagnostics, and separate merged entities into distinct tables. If the conjunction simply forms an idiomatic name for a single concept, rename the object or ignore the warning. Collections
This query belongs to the following collections:
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 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:
Comfortability of database evolution
Queries of this category provide information about the means that influence database evolution.
Naming
Queries of this category provide information about the style of naming.
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 |
|---|---|
| Comfortability of database evolution | Queries of this category provide information about the means that influence database evolution. |
| Naming | Queries of this category provide information about the style of naming. |
| 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. |