Chapter71

Chapter71 - CSIS0278A CSIS0278A Introduction to Database...

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

View Full Document Right Arrow Icon
CSIS0278A CSIS0278A Introduction to Database Introduction to Database Management Systems Management Systems Lecture 7 Indexing Part 1: Basic Concept of Data Indexing Dr. Reynold Cheng
Background image of page 1

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

View Full DocumentRight Arrow Icon
DB080:2 Basic Concepts (1) Basic Concepts (1) Indexing mechanisms speed up access to desired data. e.g., author catalog in library, phone directory index, etc. Search Key – an attribute or a set of attributes used to look up records in a file. e.g., search key: author name; record: book An index file consists of records (called index entries ): Index files are typically much smaller than the original file. Note: Index (single); Indicies (plural) search-key pointer
Background image of page 2
DB080:3 Basic Concepts (2) Basic Concepts (2) nam e id John Pete r Davi d Mar y Data John Peter Mary David Index an index entry search key pointer When the user wants to locate a record with a certain search key, he can lookup the search key in index, and then follow the pointer to locate the record
Background image of page 3

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

View Full DocumentRight Arrow Icon
2 Classes of Indices 2 Classes of Indices Ordered Indices – Search keys are sorted in the index Example: indexed-sequential file, B+- tree Hash Indices – Search keys are distributed over different buckets using a hash function. Example: hash-index These indices differ in their speeds in answering different queries. DB080:4
Background image of page 4
DB080:5 Index Evaluation Metrics Index Evaluation Metrics Access Type Different kinds of indices can answer different queries efficiently. e.g., “Find the records with student id = 11111” ( point query; better use hash index ) e.g., “Find the news articles from 2007-01-01 to 2007-12-31” ( range query; better use B+-tree ) Access Time – query response time Insertion Time – data record insertion time Deletion Time – data record deletion time Space Overhead – size of extra space required
Background image of page 5

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

View Full DocumentRight Arrow Icon
DB080:6 Ordered Indices Ordered Indices Index entries are stored in a sorted order on search key values .
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/01/2010 for the course CS 0278 taught by Professor Dr during the Spring '10 term at HKU.

Page1 / 24

Chapter71 - CSIS0278A CSIS0278A Introduction to Database...

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

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