first-pass support for saving items into db, better db error logging

needs to be cleaned up with some refactoring once this model is stable