Reputation: 4564
I've run into a particular SQL table design and I'm trying to see if there's a common name people use to describe it. The table has a definition like this:
CREATE TABLE [ATTRIBUTES] (
[Id] [int] NOT NULL,
[FIELD_1] [varchar](30) NULL,
[VALUE_1] [varchar](30) NULL,
[FIELD_2] [varchar](30) NULL,
[VALUE_2] [varchar](30) NULL,
[FIELD_3] [varchar](30) NULL,
[VALUE_3] [varchar](30) NULL,
[FIELD_4] [varchar](30) NULL,
[VALUE_4] [varchar](30) NULL,
[FIELD_5] [varchar](30) NULL,
[VALUE_5] [varchar](30) NULL,
[FIELD_6] [varchar](30) NULL,
[VALUE_6] [varchar](30) NULL,
[FIELD_7] [varchar](30) NULL,
[VALUE_7] [varchar](30) NULL,
[FIELD_8] [varchar](30) NULL,
[VALUE_8] [varchar](30) NULL,
[FIELD_9] [varchar](30) NULL,
[VALUE_9] [varchar](30) NULL,
[FIELD_10] [varchar](30) NULL,
[VALUE_10] [varchar](30) NULL
)
The idea is to allow a variable number of attributes to be defined (up to a max of 10 in this case), without using a more normalized design.
I'm not looking for the pros/cons of this approach, but does anyone know of a common name or term used to describe this type of database table design?
Upvotes: 0
Views: 52
Reputation:
This is typically referred to as the Attribute Columns pattern when people aren't busy calling it a pile of crap.
Upvotes: 2
Reputation: 164281
I would call it a (particularly nasty) form of a key-value store.
Upvotes: -1