A database cannot save a Perl hash (and certainly not a hash of array-refs)in its native format.
A database should have no problem with a hash. For instance, PostgreSQL has hstore , which not only makes implementing a hash easy, but can also index them (with either GIN (speed of lookup) or GiST (speed of writing)).
You will have to review and revise your database schema
Perhaps revise not 'database schema' but just 'database'... ;-)