Dynamic Data View
Posted on 2011-10-24
Was wondering what your feelings were on the best way to write a query to present the following data. I was going to write something dynamic which would just created a temp table and inserts the data in stages but thought i would post up here as well to see if there is a better way to do it.
I have a set of 3 tables as follows.
DataClass (List of data classes)
DataColumnMap (List of columns in each data class)
DataClassID REFERENCE to DataClass
DataStore (Holds the value data)
DataColumnMapID REFERENCE to DataColumnMap
InstanceID REFERENCE to InstaceList
The reason for doing this is that there are literally thousands of different data classes which all have a row per instance of use i want them to be stored all in one place. Logically speaking i fell the above design makes the most sense.
Answers are very much appreciated