Updated database script