Multiattribute hashing using Gray codes

  • Authors:
  • Christos Faloutsos

  • Affiliations:
  • Dept of Computer Science, University of Maryland, College Park, MD

  • Venue:
  • SIGMOD '86 Proceedings of the 1986 ACM SIGMOD international conference on Management of data
  • Year:
  • 1986

Quantified Score

Hi-index 0.00

Visualization

Abstract

Multiattribute hashing and its variations have been proposed for partial match and range queries in the past. The main idea is that each record yields a bitstring @@@@ (“record signature”), according to the values of its attributes. The binary value (@@@@)2 of this string decides the bucket that the record is stored. In this paper we propose to use Gray codes instead of binary codes, in order to map record signatures to buckets. In Gray codes, successive codewords differ in the value of exactly one bit position, thus, successive buckets hold records with similar record signatures. The proposed method achieves better clustering of similar records and avoids some of the (expensive) random disk accesses, replacing them with sequential ones. We develop a mathematical model, derive formulas giving the average performance of both methods and show that the proposed method achieves 0% - 50% relative savings over the binary codes. We also discuss how Gray codes could be applied to some retrieval methods designed for range queries, such as the grid file [Nievergelt84a] and the approach based on the so-called z-ordering [Orenstein84a].