Initial database schema.

Plus some cleanup and bugfixing in parameter passing.  For some reason,
though, I can't get the sqlite connection string to work.