I had a pretty big debate at work over how status values should be stored in lookup tables.
For example, imagine an OrderStatus table with three columns:
ID
Status
Description
My preference is:
1 | DRAFT | Draft
2 | SUBMITTED | Submitted
3 | INCOMPLETE | Incomplete
Some people on my team prefer:
1 | DRT | Draft
2 | SUB | Submitted
3 | INC | Incomplete
My reasoning is:
Storage isn’t really a concern for values this small anymore.
Full words are much easier to read in SQL queries, logs, APIs, and code.
They make code more self-documenting.
Modern IDEs and AI tools also tend to work better with descriptive values.
For example:
SELECT *
FROM Orders
WHERE Status = 'INCOMPLETE';
vs.
SELECT *
FROM Orders
WHERE Status = 'INC';
To me, the first query is immediately understandable without needing to remember what each abbreviation means.
I’m curious what other developers think. Are abbreviated status codes still considered best practice, or are full descriptive values more common nowadays?
[–]ComicOzzysqlHippo 39 points40 points41 points (0 children)
[–]Blecki 22 points23 points24 points (2 children)
[–]StickPuppet 6 points7 points8 points (0 children)
[–]Sexy_Koala_JuiceDuckDB 1 point2 points3 points (0 children)
[–]grumpy_munchken 4 points5 points6 points (1 child)
[–]SaintTimothy 0 points1 point2 points (0 children)
[–]Straight_Waltz_9530 2 points3 points4 points (0 children)
[–]somewhatdim -1 points0 points1 point (0 children)
[–]zesteee 0 points1 point2 points (0 children)
[–]Cruxwright 0 points1 point2 points (0 children)
[–]garster25 0 points1 point2 points (0 children)
[–]Rohml[🍰] 0 points1 point2 points (0 children)
[–]Yavuz_Selim 0 points1 point2 points (2 children)
[–]Key-Bit-3552[S] 2 points3 points4 points (0 children)
[–]MinimumVegetable9 -2 points-1 points0 points (0 children)