Combining sendCurveToDb and getCurveFromDB into one file as functions for ease of use and other good things.