Update to database