This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Gray Codes for Partial Match and Range Queries
October 1988 (vol. 14 no. 10)
pp. 1381-1393

It is suggested that Gray codes be used to improve the performance of methods for partial match and range queries. Specifically, the author illustrates the improved clustering of similar records that Gray codes can achieve with multiattribute hashing. Gray codes are used instead of binary codes 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, thus reducing the I/O time. A mathematical model is developed to derive formulas giving the average performance of both methods, and it is shown that the proposed method achieves 0-50% relative savings over the binary codes. The author also discusses how Gray codes could be applied to some retrieval methods designed for range queries, such as the grid file and the approach based on the so-called z-ordering. Gray codes are also used to design good distance-preserving functions, which map a k-dimensional (k-D) space into a one-dimensional one, in such a way that points are close in the k-D space are likely to be close in the 1-D space.

[1] A. V. Aho and J. D. Ullman, "Optimal partial match retrieval when fields are independently specified,"ACM TODS, vol. 4, no. 2, pp. 168-179, June 1979.
[2] J. Bentley, "Multidimensional Binary Search Trees Used for Associative Searching,"Comm. ACM, Vol. 18, No. 9, Sept. 1975, pp. 509- 517.
[3] H. Boral and S. Redfield, "Database machine morphology," inProc. 11th Int. Conf. VLDB, Stockholm, Sweden, Aug. 1985, pp. 59-71.
[4] W. A. Burkhard, "Interpolation-based index maintenance," inProc. ACM Conf. PODS, 1983, pp. 76-89.
[5] A. Cardenas, "Analysis and performance of inverted data-base structures,"Commun. ACM, vol. 18, no. 5, pp. 253-263, 1975.
[6] J. P. Cheiney, P. Faudemay, R. Michel, and J. M. Thevenin, "A reliable parallel backend using multiattribute clustering and selectjoin operations," inProc. 12th Int. Conf. VLDB, Kyoto, Japan, Aug. 1986, pp. 220-227.
[7] M. Chock, A. F. Cardenas, and A. Klinger, "Database structure and manipulation capabilities of a picture database management system (PICDMS),"IEEE Trans. Pattern Anal. Machine Intell., vol. PAMI- 6, no. 4, pp. 484-492, July 1984.
[8] R. Fagan et al., "Extendible Hashing--A Fast-Access Method for Dynamic Files,"ACM Trans. Database Systems, Vol. 4, No. 3, Sept. 1979, pp. 315-344.
[9] E. N. Gilbert, "Gray codes and paths on then-cube,"Bell Syst. Tech. J., vol. 37, no. 3, pp. 815-826, May 1958.
[10] F. Gray,Pulse Code Communications, U.S. Patent 2 632 058, Mar. 17, 1953.
[11] H. Guttman, "R-trees: A dynamic index structure for spatial searching," inProc. ACM/SIGMOD Conf., 1984, pp. 47-56.
[12] R. Kowalski, "Logic for data description," inLogic and Data Bases, J. Minker, Ed. New York: Plenum, 1978, pp. 77-103.
[13] P. Larson, "Dynamic hashing,"BIT, vol. 18, pp. 184-201, 1978.
[14] P. A. Larson, "Performance analysis of linear hashing with partial expansions,"ACM Trans. Database Syst., vol. 7, no. 4, pp. 566- 587, Dec. 1982.
[15] W. Litwin, "Linear hashing: A new Tool for file and table addressing," inProc. 6th Int. Conf. VLDB, Montreal, Oct. 1980, pp. 212- 223.
[16] J. W. Lloyd, "Optimal partial-match retrieval,"BIT, vol. 20, pp. 406-413, 1980.
[17] J. W. Lloyd and K. Ramamohanarao, "Partial-match retrieval for dynamic files,"BIT, vol. 22, pp. 150-168, 1982.
[18] G. N. N. Martin, "Spiral storage: Incrementally augmentable hash addressed storage," Theory of Computation, Univ. Warwick, Coventry, England, Rep. 27, Mar. 1979.
[19] J. Minker, "An experimental relational data base system based on logic," inLogic and Data Bases, J. Minker, Ed. New York: Plenum, 1978.
[20] L. Naish and J. A. Thom, "The MU-prolog deductive database," Dep. Comput. Sci., Univ. Melbourne, Tech. Rep. 83/10, 1983.
[21] J. Nieverglt, H. Hinterberger, and K. Sevcik, "The grid file: An adaptable, symmetric multikey file structure,"ACM TODS, Mar. 1984.
[22] J. A. Orenstein and T. H. Merrett, "A class of data structures for associative searching," inProc. SIGACT-SIGMOD, Waterloo, Ont., Canada, Apr. 2-4, 1984, pp. 181-190.
[23] J. K. Ousterhout, G. T. Hamachi, R. N. Mayo, W. S. Scott, and G. S. Taylor, "Magic: A VLSI layout system," inProc. 21st Design Automation Conf., Alburquerque, NM, June 1984, pp. 152-159.
[24] J. L. Pfaltz, W. H. Berman, and E. M. Cagley, "Partial match retrieval using indexed descriptor files,"Commun. ACM, vol. 23, no. 9, pp. 522-528, Sept. 1980.
[25] K. Ramanohanarao, J. W. Lloyd, and J. A. Thom, "Partial-match retrieval using hashing and descriptors,"ACM Trans. Database Syst., vol. 8, no. 4, pp. 552-576, Dec. 1983.
[26] E. M. Reingold, J. Nievergelt, and N. Deo,Combinatorial Algorithms: Theory and Practice. Englewood Cliffs, NJ: Prentice-Hall, 1977.
[27] R. L. Rivest, "Partial match retrieval algorithms,"SIAM J. Comput., vol. 5, no. 1, pp. 19-50, Mar. 1976.
[28] J. T. Robinson, "The k-D-B-tree: A search structure for large multidimensional dynamic indexes," inProc. ACM SIGMOD, 1981, pp. 10-18.
[29] J. B. Rothnie and T. Lozano, "Attribute based file organization in a paged memory environment,"Commun. ACM, vol. 17, pp. 63-69, Feb. 1974.
[30] N. Roussopoulos and D. Leifker, "Direct spatial search on pictorial databases using packed R-trees," inProc. ACM SIGMOD, Austin, TX, May 1985.
[31] J. A. Thom, K. Ramamohanarao, and L. Naish, "A superjoin algorithm for deductive databases," inProc. 12th Int. Conf. VLDB, Kyoto, Japan, Aug. 1986, pp. 189-196.
[32] M. White, "N-trees: Large ordered indexes for multi-dimensional space," Application mathematics Research Staff, Statistical Research Division, U. S. Bureau of the Census, Dec. 1981.

Index Terms:
partial match; range queries; Gray codes; multiattribute hashing; record signatures; buckets; I/O time; mathematical model; retrieval methods; grid file; distance-preserving functions; database theory; file organisation
Citation:
C. Faloutsos, "Gray Codes for Partial Match and Range Queries," IEEE Transactions on Software Engineering, vol. 14, no. 10, pp. 1381-1393, Oct. 1988, doi:10.1109/32.6184
Usage of this product signifies your acceptance of the Terms of Use.