Finished database code.  Next is testing