update the database;