| Goal | Find tables with the same name in different schemas. Make sure that this is not a duplication. |
|---|---|
| Notes | In case of the string_agg function, the line break (br) tag is used as a part of the separator for the better readability in case the query result is displayed in a web browser. |
| Type | General (Overview of some aspect of the database.) |
| License | MIT (opens in new tab) |
| Data Source | INFORMATION_SCHEMA+system catalog |
| SQL Query |
|
Collections
This query belongs to the following collections:
Find problems by overview
Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems or not .
| Name | Description |
|---|---|
| Find problems by overview | Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems 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.
Data redundancy
Queries of this category provide information about possible data redunancy.
Derived tables
Queries of this category provide information about the derived tables (views, materialized views), which are used to implement virtual data layer.
Duplication of implementation elements
Queries of this catergory provide information about the duplication of the database objects.
| Name | Description |
|---|---|
| Comfortability of database evolution | Queries of this category provide information about the means that influence database evolution. |
| Data redundancy | Queries of this category provide information about possible data redunancy. |
| Derived tables | Queries of this category provide information about the derived tables (views, materialized views), which are used to implement virtual data layer. |
| Duplication of implementation elements | Queries of this catergory provide information about the duplication of the database objects. |
Further reading and related materials:
The corresponding code smell in case of cleaning code is "G5: Duplication". (Robert C. Martin, Clean Code)
| Reference |
|---|
| https://refactoring.guru/smells/alternative-classes-with-different-interfaces |
| https://refactoring.guru/smells/duplicate-code |
| The corresponding code smell in case of cleaning code is "G5: Duplication". (Robert C. Martin, Clean Code) |