Add accessor to serializer for a database

This serializer may be used by any extension of sohva or client code
that wishes to serialize the same way sohva does.