INTRODUCTION TO SECONDARY INDEXING

INTRODUCTION TO SECONDARY INDEXING

In the previous section we have studied about INTRODUCTION TO SECONDARY INDEXING . Indexing is use to optimize the performance of database. By minimizing the number of disc accesses require when a query is process. Also index is a type of data structure. It is use to locate and access the data in the database quickly. Continuing our article INTRODUCTION TO SECONDARY INDEXING . we’ll study secondary index.

SECONDARY INDEX:

After making primary index . If key is available then we make index by putting each value in the index. Hence this is dense index. And secondly, if non key are available then similar are group into some other intermediate layer. And for that similar records one entry is enter in index.

TYPES OF INDEXING-INTRODUCTION TO B -TREE

B tree is self balancing tree. A B-tree of order m can have most m-1 keys and m children. Every node in B-tree contains at most m children. Every node in B-tree except the root node and the leaf node contains at least m/2 children. The root node have at least 2 nodes. All leaf node must be at same level.

DIFFERENCE BETWEEN B TREE & B+ TREE:

In B-tree data is store in leaf as well as in internal nodes. Where as in B+ tree data is store only in leaf nodes. In B tree searching is slower. Deletion is complex. In B+ tree searching is faster. Deletion is easy ( directly from leaf node). In B tree redundant keys are not present. While in B+ tree redundant keys are present. In B tree leaf nodes are not linked together. Whereas in B+ tree leaf nodes are link together like linked lists.

STRUCTURE OF B+ TREE:

In b+ tree root node does not have data /record point. At leaf nodes at the end there present block pointer. Which points the next block pointer. Also a copy of root node or key will present at the right node.