Store a hash in a database
I have a calculator that takes yearly pension contributions into a hash. Therefore, everyone has a contribution lined up with a year. I don't want a database of dozens of years as one individuals contributions my start in 1970 while another's in 2000. I basically just want to keep the data stored in the hash it currently is in (I currently don't store this information in a database). Is hstore the best thing to look at or serialize or something else? Thank you in advance for all input.
A json or jsonb column can save/load a hash pretty easily and sounds like it might work for what you need. I'd just be careful to store simple things like strings, numbers, arrays in it and not something like a Ruby object.