Spare columns
- Adam Thurgar
- Mar 17, 2019
- 1 min read
I was asked to look at a logical database design just for a sanity check and make sure it all made sense.
It was a good design with primary keys and foreign keys, indexing suggestions (both clustered and non-clustered), constraints and defaults. None of the tables had an extremely large amount of columns and those columns were not excessive in size. I made some suggestions about datatypes, using bigint instead of int, decreasing varchar sizes etc.
The only question that I had was that some of the volatile tables had spare columns in them, usually two. One an int and the other a varchar (50). I asked the designer what was the rationale behind these columns and they said it was to avoid the overhead of potentially having to add a new column later on. Obviously the designer had encountered this issue in the past and was being proactive in their design, but there was an overhead and cost involved. Bad design - No, just a bit unusual.

Comments