Efficiently bounding cardinality ratios through database constraints