DBMS - Signature-based Indexing introduction

121 阅读1分钟

UNSW COMP9315

如有错误,欢迎指正

Indexing with signatures

为pmr设计,pmr:patial-match retrieval.(如:select * from A where a1=...,a2=...,...,a_n=...;)

是tuple的一种类似hash value的值。在scanning tuples之前,应该在signture文件中先查询

image.png

signatures是一个和data file parallel的文件(如上图)其中codeword(Ai)类似于attribute的一个hash value

image.png

Superimposed Codewords将codeword叠加进行bitwise-or运算,得到tuple的descriptor

image.png Concatenated Codewords (CATC)拼接codeword得到descriptor

image.png

得到描述符desc(q)之后,遍历signature文件,如果signature i和desc(q)可以匹配,则tuple i可能就是结果

注:未知的attribute的codework值为0

上述算法的伪代码如下

image.png