Compare equipments with current DB data and do sql update or insert queries accordingly