Overloaded Attribute Names

This smell occurs when two or more attributes are defined with identical names but as distinct data types in different tables.

Identical names with different data types create confusion and could lead to subtle bugs in queries.

Example

CREATE TABLE `spell_override` (
`comment` LONGTEXT NOT NULL,
-- other columns
);
CREATE TABLE `creature_text` (
`comment` varchar(255) DEFAULT, -- overloaded attribute
-- other columns
);

Tools

The following set of tools detects this smell: DbDeo(for SQL)

Reference

Redgate, “119 SQL Code Smells,” 2017.


Database Smells

Home

All rights reserved (c) Tushar Sharma 2017-23.