A little "API" for the database.

Basically, avoid having to think about passing in the db as a parameter
into every function.