Let's say we have a field that can be in more than one type, for instance: string or date or XML datatypes.
Now we have two methods to store this in a database
1- using a string typed field + field defining type: losing "type-aware" sorting capabilities, needs casting
2- separate tables (StringValues,DateValues,Decimal,XML ...etc):a foreign key pointing to a value + field defining type : somehow complicated, performance
the second method may have an extra advantage if only unique values were stored: it will work as an index.
do you have something in mind ?
Note1: Preferably, consider project based on MS SQL Server 2008 and Linq2SQL
Note2: Maybe we will discuss how to implement EAV in another question, I'm asking about EAV in a relational storage.
Note3: Types can change, but not frequently