150 likes | 452 Views
Tree-based Indexing. Hessam Zakerzadeh. ISAM ( Indexed Sequential Access Method ). ISAM was originally developed by IBM for mainframe computers Allows records to be accessed: sequentially (in the order they were entered) randomly (with an index). ISAM ( Indexed Sequential Access Method ).
E N D
Tree-based Indexing Hessam Zakerzadeh
ISAM(Indexed Sequential Access Method) • ISAM was originally developed by IBM for mainframe computers • Allows records to be accessed: • sequentially (in the order they were entered) • randomly (with an index)
ISAM(Indexed Sequential Access Method) • Static index structure. • Data values reside in leaf nodes. • Effective when file is not frequently updated.
Overflow page Non-leaf Pages Leaf Pages Primary pages • Leaf pages contain data entries.
After Inserting 23*, 48*, 41*, 42* ... Root 40 Index Pages 51 63 20 33 Primary Leaf 10* 15* 20* 27* 46* 55* 40* 51* 97* 33* 37* 63* Pages 41* 48* 23* Overflow Pages 42*
Give an example of when you would use each element (A or B) for each of the following ‘A versus B’ pairs: • A hashed index using Alternative (1) versus heap file organization.
Give an example of when you would use each element (A or B) for each of the following ‘A versus B’ pairs: • A hashed index using Alternative (1) versus heap file organization. • hashed index : when most of the queries are equality queries. • heap file : when a file is scanned in sequential order.
Extendible Hashing versus Linear Hashing. • Extendible Hashing : When data values lead to a skewed distribution • Linear Hashing : A large data file requiring a directory to span several pages.
Static Hashing versus Linear Hashing. • Static Hashing :When the number of records are constant • Linear Hashing: When number of records varies, and hash key values are uniformly distributed.
Static Hashing versus ISAM • Static Hashing: When the number records are constant and most of the queries are equality search • ISAM :When queries involve range queries
Linear Hashing versus B+ trees • Linear Hashing :When queries are equality search • B+ trees :When queries are range search