update database sql script