Modiried database script