database script