url - Universität zu Lübeck
url - Universität zu Lübeck
url - Universität zu Lübeck
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
5.3. KEYX BY EXAMPLES 87<br />
and the value v of an index may be different. For instance, in p 2 the keys are the<br />
values of the element author whereas the values are the corresponding inproceedings.<br />
Of course, it is possible that the indexed key k is the returned value v of<br />
a query. This concept avoids costly navigation from a key to the return value in<br />
the XML data. This navigation is only performed once when creating the index or<br />
adding new keys. The index structure for p 2 is shown in figure 5.4.<br />
Index i p4<br />
Key path: /dblp/inproceedings/author<br />
Value path: /dblp/inproceedings<br />
...<br />
dblp<br />
0<br />
1<br />
inproceeding<br />
inproceeding<br />
book<br />
Dan Suciu<br />
Mary F. Fernandez<br />
2<br />
8<br />
13<br />
author author title year ee author title year <strong>url</strong> author author author title year isbn<br />
...... ......<br />
...... ......<br />
3 4 5 6 7<br />
9 10 11 12<br />
14 15 16 17 18<br />
19<br />
Figure 5.4: Established index i p2<br />
Please note that this index is specific for queries p 2 indexing all authors of inproceedings.<br />
The key ’Dan Suciu’ in the index structure references the inproceedings<br />
of this author but not his book.<br />
The path expressions of queries may also contain the self-or-descendant (//) and<br />
wildcards (*) axis shown in the next example. Therefore, it is possible to keep<br />
both the authors of books and the authors of articles in one index structure.<br />
5.3.2 Multi-Key Indexes<br />
If a query involves more than one key we need a multi-key index. For example,<br />
the query p 7 = /dblp/ ∗ /title[../author. = ′ x ′ and ../year > y] looks for titles of any<br />
publication (*) written by a given author and a year. This path expression contains<br />
the two keys author and year.<br />
A multi-key index in KeyX is constructed like in RDBMS: The index’s tree structure<br />
is ordered by a first key (e.g. author), the values of this key are indexes<br />
which are built upon the next key (year) and so on. Our approach does not combine<br />
multiple keys and paths to one artificial key like the Index Fabric’s approach<br />
does (see section 4.3.4). That is the reason why KeyX supports range queries easily.<br />
As our tree implementation differentiates between texts and numbers it does<br />
not have to normalize numeric values. Figure 5.5 shows the index for p 7 ; it is a<br />
tree consisting of trees; the second tree’s values reference the XML data. Due to<br />
the wildcard operator in this query both inproceedings and books are indexed.