A database is a collection of stored data that is logically related and that is accessible by one or more users or applications. A popular type of database is the relational database management system (RDBMS), which includes relational tables, also referred to as relations, made up of rows and columns (also referred to as tuples and attributes). Each row represents an occurrence of an entity defined by a table, with an entity being a person, place, thing, or other object about which the table contains information.
Database queries often have multiple range predicates on same field, or on same expression. One simple example is a closed range, such as “1_shipdate BETWEEN ‘2011-12-01’ AND ‘2011-12-24’”. It has two conjunct range predicates: “1_shipdate>=‘2011-12-01’ AND 1_shipdate<=‘2011-12-24’”. The multiple range predicates on the same field can be mixed with predicates on other fields. Thus range condition sensitive tasks, such as range scan access path and selectivity estimation, keep looking for range conditions in the whole list of query predicates.
Some business applications generate overlapping range predicates. One scenario is access right control in view definition. The access right predicates in view definition is conjunct with user-specified conditions. For instance, view definition restricts the user to only accessing rows in a column “department_no” between 1 and 10. The user-specified predicates include “department_no IN (5, 15).” Without intersecting the two range conditions, range-condition-sensitive tasks often proceed and base the optimization on one of the multiple ranges. A coverage algorithm cannot report correct coverage when handling overlapping range conditions.