| Goal | This query identifies potential redundancy or ambiguity in the schema by detecting pairs of user-defined domain names with high textual similarity. It utilizes the Levenshtein distance algorithm to find name pairs that differ by fewer than two characters. Crucially, the query implements a filter to exclude pairs where the divergence is attributable solely to numerical digits. This heuristic prevents false positives for valid domain variations based on size or version (e.g., d_name_20 vs. d_name_50), focusing the analysis strictly on likely typographical errors or semantic duplicates. |
|---|---|
| Notes | The query uses a function from the fuzzystrmatch extension. |
| 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 | Make sure that the names are correct and there are no duplication or unused domains. |
| Data Source | INFORMATION_SCHEMA only |
| 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:
Domains
Queries of this category provide information about reusable specifications of column properties.
Duplication of implementation elements
Queries of this catergory provide information about the duplication of the database objects.
Naming
Queries of this category provide information about the style of naming.
Unused implementation elements
Queries of this catergory provide information about the database objects that are not used.
| Name | Description |
|---|---|
| Domains | Queries of this category provide information about reusable specifications of column properties. |
| Duplication of implementation elements | Queries of this catergory provide information about the duplication of the database objects. |
| Naming | Queries of this category provide information about the style of naming. |
| Unused implementation elements | Queries of this catergory provide information about the database objects that are not used. |