Speed up database creation by wrapping it in a SQLite transaction