return 0 rather than null in sql so the hash defines port, weight, and distance