update database to global