Implemented DB operations. Basic DB insert/update.