updating database script