Indexing structures for files II Flashcards

1
Q

What are some malfunctions related to the binary tree structure

A

if the tree is in storage, occupying more than one block, there is the risk of thrashing or heavy caching.

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

Describe a search field in a search tree

A

Each search field has the search value (index value) and a pointer to the associated record in storage (a record pointer or block pointer, depending).

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

What is the need for balancing

A

Balanced Binary trees are computationally efficient to perform operations on.

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

What is a B-Tree and what is it used for

A

A b-tree is known as balanced sorted tree.
* It is used for external sorting. External sorting is done when data values cannot fit into the main memory.

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

What conditions of a B-Tree are necessary to reduce disk access

A

i. The height of the tree must be kept minimal
ii. There must be no empty sub-trees above the leaves of the tree
iii. Leaves of the tree must be at the same level
iv. All nodes except the leaves must have some minimum number of children

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

Give five properties of a B-tree of order M

A

i. Each node has a maximum of M children and a minimum of M/2
ii. Each node has (M-1) Keys
iii. Keys are arranged in ascending order. All the keys in the subtree to the left of a key are smaller than the key(Predecessor).All the keys to the right are greater than the value of the key(Successor)
iv. When a key is inserted into a full node, the node is split into two nodes, and the median value is inserted in the parent node.
v. All leaves are on the same level i.e no empty subtree above the leave node

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