connect to database and can update