| Goal | Find table and domain CHECK constraints that compare the result of a Boolean expression with a Boolean value. If you can choose between two logically equivalent Boolean expressions choose the more simple expression. |
|---|---|
| Type | Problem detection (Each row in the result could represent a flaw in the design) |
| Reliability | Low (Many false-positive results) |
| License | MIT (opens in new tab) |
| Fixing Suggestion | Drop and re-create the constraint. For instance, instead of writing CHECK ((price>0)=TRUE) write CHECK (price>0) |
| Data Source | INFORMATION_SCHEMA+system catalog |
| SQL Query |
|
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:
CHECK constraints
Queries of this category provide information about CHECK constraints.
Comfortability of database evolution
Queries of this category provide information about the means that influence database evolution.
Missing data
Queries of this category provide information about missing data (NULLs) in a database.
| Name | Description |
|---|---|
| CHECK constraints | Queries of this category provide information about CHECK constraints. |
| Comfortability of database evolution | Queries of this category provide information about the means that influence database evolution. |
| Missing data | Queries of this category provide information about missing data (NULLs) in a database. |