| There are many ways we could store a java.time.YearMonth object:
- 2 separate fields
- a VARCHAR for its toString representation
- a number (e.g. int, long) where the value is: Year * 100 + Month.
Of all possibilities, the number alternative seems the most efficient in terms of database indexing. |