Updated database setup query