I think these functions are in the right place.  I would change the names to follow our current conventions (remove the db_ prefix)