server: Rough db map functions.  Still needs connect functions split, etc.