Better Database Library API

We switch our database library from positional arguments to keyword arguments, in the same style used by ActiveRecord and many other database libraries. This saves us from argument order errors, making the library easier to use.