finished the database script