Database interface, includes a sqlite wrapper