Finished basic database wrapper