Chapter 26 Flashcards
Can we use indexing for speed
Yes
What is indexing
An example of catalogue and library. Indexing is physical.
What are conventional indexing techniques
- Dense
- Sparse
- Multi-level
What is Dense indexing technique
Data file is divided into blocks. Then make an index table. Then every block has an entry in index table. just like library example.
What is sparse indexing technique
In sparse indexing, it keeps normally only one key of data file and some keys in data file will not have an entry in index file. One big disadvantage is that it searches for data file block again and this degrade performance.
What is sparse multilevel indexing technique
In this technique, there are 2 blocks(levels) in sparse. Search mechanism goes from top most 2nd level to 1st level and then in data file
What is B-tree indexing
Its a tree structure. B-tree is balance tree. Its all last nodes distance always same from root. It is also called B Plus tree.
What are disadvantages of b-tree
B-tree is case sensitive, if there is extra space B-tree does not work, B-tree can be very length and take a lot of time. There are limitations in insert in B-tree. On insert node will break and it could chain reaction of breaking nodes till root. Thus the height of B-tree can change. So dataware house environment it is not recommended.
What is hash base indexing
In hash base indexing, a key is allotted for each data set. We maintain a table for that keys and we can search on it easily therefore.
What are 2 types of hash base indexing
1- Use external memory
2- Do not use external memory
What are 2 categories of hash base indexing
1- Double hash
2- Single hash
What is primary index in hash base indexing
We use primary index just like card catalogue to search for records
What is secondary index in hash base indexing
We use 2 levels on indexing in secondary indexing. First pointer lead us to first level and if we do not get desired result we will go to second level and then get right record. It means it is just like primary indexing with additional one more level.
What is the difference between primary key and primary index
Primary key is always unique but primary index is not always unique. Example of student id and department id. A student is always unique but a student can join multiple departments.
What happen when block overflow
Page fault