update data. connect the database.