I have 6 columns of date-time type in a table. My application has a requirement that each column should have additional column one for validation that can be of a bit datatype and another modified date-time if user wants to modify it. So my question is that is there any thing better than adding 2 column for each column I have? Also I know about Sparse columns which I can use to save my table space but still is there any thing better I can do??
The ‘Bit’ Logic
So there are 3 columns
- original datetime,
- modified datetime and
- Validation bit.
Validation bit is by default set to false. When user want to change the date-time then modified date-time column will be updated with new value; however, there will be no change in original date-time column. Now user has to make decision whether value being entered is validated or not. The validation bit will decide this functionality.
I would disable the Valid checkbox until they enter a modified date. Sparse for those two columns works.