| Goal | Find base table columns with Boolean type that name refers to the possibility that these are used to register as to whether an entity is currently in active state or not. Find the base tables that have exactly one Boolean column. During the system design one should find all the possible states of an entity type that influence the behavior of the information system. Data as to whether an entity is in one of these states should be in the database. Having only two states - active/inactive - is sometimes a too big simplification. |
|---|---|
| Notes | The query considers both column names in English and Estonian. |
| 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 only |
| SQL Query |
|
Categories
This query is classified under the following categories:
Boolean data
Queries of this category provide information about truth-values data that is kept in the database.
Comfortability of database evolution
Queries of this category provide information about the means that influence database evolution.
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.
State machine
Queries of this category provide information about registration of states of entities in a database.
Validity and completeness
Queries of this category provide information about whether database design represents the world (domain) correctly (validity) and whether database design captures all the information about the world (domain) that is correct and relevant (completeness).
| Name | Description |
|---|---|
| Boolean data | Queries of this category provide information about truth-values data that is kept in the database. |
| Comfortability of database evolution | Queries of this category provide information about the means that influence database evolution. |
| 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. |
| State machine | Queries of this category provide information about registration of states of entities in a database. |
| Validity and completeness | Queries of this category provide information about whether database design represents the world (domain) correctly (validity) and whether database design captures all the information about the world (domain) that is correct and relevant (completeness). |
Further reading and related materials:
| Reference |
|---|
| L. Silverston ja P. Agnew, „The Data Model Resource Book, Volume 3: Universal Patterns for Data Modeling,“ Chichester, John Wiley & Sons Ltd, 2009. Level 1 status pattern. |
| https://softwareengineering.stackexchange.com/questions/214940/how-to-handle-status-columns-in-designing-tables |
| https://www.percona.com/blog/2008/08/09/picking-datatype-for-status-feilds/ |
| https://stackoverflow.com/questions/5724593/table-with-many-boolean-status-fields |
| https://digikogu.taltech.ee/et/Item/101f40e2-d9fe-4bef-ab25-54508f18c078 |