db, comparison: store return range comparisons in the database