Unique index search key contains a candidate key

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ecords. So, beger than Alterna6ve 1 with large data records, especially if search keys are small. (Por6on of index structure used to direct search, which depends on size of data entries, is much smaller than with Alterna6ve 1.) –  Alterna6ve 3 more compact than Alterna6ve 2, but leads to variable sized data entries even if search keys are of fixed length. Index Classifica6on •  Primary vs. secondary: If search key contains primary key, then called primary index. –  Unique index: Search key contains a candidate key. •  Clustered vs. unclustered: If order of data records is the same as, or `close to’, order of data entries, then called clustered index. –  –  –  Alterna6ve 1 implies clustered; in prac6ce, clustered also implies Alterna6ve 1 (since sorted files are rare). A file can be clustered on at most one search key. Cost of retrieving data records through index varies greatly based on whether index is clustered or not! Clustered vs. Unclustered Index •  Suppose that Alterna6ve (2) is used for data entries, and that the data records are stored in a Heap file. –  –  To build clustered index, first sort the He...
View Full Document

This document was uploaded on 03/12/2014 for the course CSCI 165B at UC Davis.

Ask a homework question - tutors are online