move db support to diyapplib