I got a requirement where the user enters test data
I have fields:
example
Blood Pulse
---- -----
12 13
There is requirement to add another another field we don’t know what the test will be for.
I was thinking about have a field called Misc1Label, Misc1Value
Say if Misc1Label is Oral and Misc1Value is 88
Later I can use Pivot if we need to capture value of Misc1Label and use Pivot so that I can have something like
Blood Pulse Oral
----- ---- ----
12 13 88
I was thinking if there is any other best practice of handling this.
Thanks in advance
Do you really need to keep Blood and Pulse as separate fields? You could consider Blood and Pulse as different Attributes as well. Sounds like something like this would work and make it easy to query against without having to use a PIVOT command.
You could then store Blood, Pulse, Weight, etc. in your AttributeType table and use the PersonAttribute table as a 1-N approach with your main table. Just a thought.
Of course the same model could be applied leaving Blood and Pulse in your main table if desired.
Good luck.