Update database creation code.

Check for undefined argument. Check database connection. Check table
and view names. Function create_database() now returns a DBI object.