These last two utils are quite general. Especially the last one should be used a.e. imho :-)
Could you put them into ```openquake.db.models``` ?