What route is best to go if I need design tables for entities with arbitrary numbers of attributes? I know that is called EAV (entity - attribute - value) and tried a Google, but missed answer for actual table design.
If we have arbitrary attributes with various data types, there are three ways to go:
1. item_id - attribute - value // one table, values with different data types in third column
2. item_id - attribute - value // one table for each data type
3. item_id - attribute - string - integer - float - date ... //one column for each data type (I see this in BEA WebLogic)
First option is terrible. But the others look fine (?). Downsides of second choice include complicated selects and writing, third choice leads to "Swiss cheese" table.
Has anybody experiences with EAV?