lec06.468

lec06.468 - . . Spring 2008 . CSC 468: DBMS Implementation...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
. . Spring 2008 CSC 468: DBMS Implementation Alexander Dekhtyar . . Index Structures Overview Index Structures are supplemental data structures created and maintained by the DBMS in order to speed up query processing and data management. Index struc- tures are stored on disk in exactly the same manner as the relational data: each index structure is stored in a single file, the information there is broken into disk blocks. We will consider the following categories of index structures: Indexes on Sequential Files. Sequential files allow for efficient access to data only if there is a efficient way to determine where the data is stored given a key. Index structures in this category address this issue. Two classes of indexes, dense and sparse are considered. Secondary Indexes. Index structures for non-search key attributes in se- quential files and/or for heap files. B-trees. A more advanced way to organize indexing. Hash tables. An implementation of standard hash-table techniques in sec- ondary storage. Additional classes of indexes exist, such as inverted indexes used in Information Retrieval, but our concentration is on index structures used for storage and retrieval of relational data . Indexes on Sequential Files. Sequential Files store records ordered by values of a selected search key . If relation R is stored sequentially and attribute A is a search key, then in order to give a fast answer to the query SELECT * FROM R WHERE A= x we need 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
to know how to find the location in the disk file for R of the records whose search key value is x . Possibile solutions are: Scan: If we have only the sequential file to rely on, we can scan the file from the beginning, reading each page in turn, until we find the search key. The worst-case I/O complexity of such algorithm is n , where n is the number of pages in the disk file. Dichotomy: A slightly better approach is dichotomy , which first reads the block in the middle of the file, determines, which side of it, the key value should be, and continues splitting the appropriate region of blocks into half until the necessary block is reached. This allows us to execute the query in O (log( n )) disk accesses. Indexing:
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

lec06.468 - . . Spring 2008 . CSC 468: DBMS Implementation...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online