Equality query; Equality selection
Consider a relation R whose schema contains some attribute A taking values over a domain D. A membership query retrieves all tuples in R with A = x (x∈D).
A membership query effectively checks membership in a set (relation). As such, it can be implemented using either a hash-based index (built on the attribute(s) involved in the query) or a B+-tree. If a hashing scheme is used, each indexed value is placed on an appropriate hash bucket. Then all records that satisfy A = x are located on the bucket responsible for value x. If A is a numeric attribute (and can thus be indexed using an order-preserving access method like a B+-tree), the membership query is a special case of a range query where the range interval [low, high] is reduced to a single value (low = high = x).