update db module not to export constructor directly