Chapter 26 Flashcards

1
Q

Can we use indexing for speed

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is indexing

A

An example of catalogue and library. Indexing is physical.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are conventional indexing techniques

A
  • Dense
  • Sparse
  • Multi-level
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Dense indexing technique

A

Data file is divided into blocks. Then make an index table. Then every block has an entry in index table. just like library example.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is sparse indexing technique

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is sparse multilevel indexing technique

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is B-tree indexing

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are disadvantages of b-tree

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is hash base indexing

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are 2 types of hash base indexing

A

1- Use external memory

2- Do not use external memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are 2 categories of hash base indexing

A

1- Double hash

2- Single hash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is primary index in hash base indexing

A

We use primary index just like card catalogue to search for records

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is secondary index in hash base indexing

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the difference between primary key and primary index

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What happen when block overflow

A

Page fault

How well did you know this?
1
Not at all
2
3
4
5
Perfectly