Building the database scripts