Added a variety of code to support DB interaction.  The API is still in
flux.  Much of functionality has not been tested yet.