Stringly typed values table in sql, is there a better way to do this? (we're using MSSQL)
Posted
by
Jason Hernandez
on Stack Overflow
See other posts from Stack Overflow
or by Jason Hernandez
Published on 2010-12-29T20:19:35Z
Indexed on
2010/12/29
20:54 UTC
Read the original article
Hit count: 127
sql-server
|experience
We have have a table layout with property names in one table, and values in a second table, and items in a third. (Yes, we're re-implementing tables in SQL.)
We join all three to get a value of a property for a specific item.
Unfortunately the values can have multiple data types double, varchar, bit, etc. Currently the consensus is to stringly type all the values and store the type name in the column next to the value.
tblValues DataTypeName nvarchar
Is there a better, cleaner way to do this?
© Stack Overflow or respective owner