Use a transaction to more efficiently create the database.