Add database creation helpers and database tests