implemented Database

This should be all the functionality Database needs, however it needs to
be tested. I was feeling particularly inspired