Ch8_Storage_Indexing_Overview-95

Ch8_Storage_Indexing_Overview-95 - Database Management...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke Overview of Storage and Indexing Chapter 8 “How index-learning turns no student pale Yet holds the eel of science by the tail.”-- Alexander Pope (1688-1744) Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke Data on External Storage Disks: Can retrieve random page at fixed cost But reading several consecutive pages is much cheaper than reading them in random order Tapes: Can only read pages in sequence Cheaper than disks; used for archival storage File organization: Method of arranging a file of records on external storage. Record id (rid) is sufficient to physically locate record Indexes are data structures that allow us to find the record ids of records with given values in index search key fields Architecture: Buffer manager stages pages from external storage to main memory buffer pool. File and index layers make calls to the buffer manager. Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke Alternative File Organizations Many alternatives exist, each ideal for some situations, and not so good in others: Heap (random order) files: Suitable when typical access is a file scan retrieving all records. Sorted Files: Best if records must be retrieved in some order, or only a `range’ of records is needed. Indexes: Data structures to organize records via trees or hashing. • Like sorted files, they speed up searches for a subset of records, based on values in certain (“search key”) fields • Updates are much faster than in sorted files. Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke Indexes An index on a file speeds up selections on the search key fields for the index. Any subset of the fields of a relation can be the search key for an index on the relation. Search key is not the same as key (minimal set of fields that uniquely identify a record in a relation). An index contains a collection of data entries , and supports efficient retrieval of all data entries k* with a given key value k . Given data entry k*, we can find record with key k in at most one disk I/O. (Details soon …) Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke B+ Tree Indexes Leaf pages contain data entries , and are chained (prev & next) Non-leaf pages have index entries; only used to direct searches: P K 1 P 1 K 2 P 2 K m P m index entry Non-leaf Pages Pages (Sorted by search key) Leaf Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke Example B+ Tree...
View Full Document

This note was uploaded on 05/09/2008 for the course CS 352 taught by Professor Michaeldell during the Spring '08 term at Chaminade University.

Page1 / 32

Ch8_Storage_Indexing_Overview-95 - Database Management...

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