update database script