0% found this document useful (0 votes)
17 views2 pages

GATE Indexing Topics

The document discusses indexing techniques used for efficient data retrieval in databases, including various types of indexes such as primary, secondary, clustered, and non-clustered indexes. It also covers indexing structures like B-Tree, B+ Tree, and Hash Indexing, along with their time complexities for operations such as search, insertion, and deletion. Additionally, it highlights the importance of index maintenance to ensure efficiency over time.

Uploaded by

vajid371ak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

GATE Indexing Topics

The document discusses indexing techniques used for efficient data retrieval in databases, including various types of indexes such as primary, secondary, clustered, and non-clustered indexes. It also covers indexing structures like B-Tree, B+ Tree, and Hash Indexing, along with their time complexities for operations such as search, insertion, and deletion. Additionally, it highlights the importance of index maintenance to ensure efficiency over time.

Uploaded by

vajid371ak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Indexing Topics for GATE Preparation

1. Indexing:
Indexing is a technique used to quickly locate a record in a database or file. It helps speed up
retrieval operations by reducing the number of records to scan.

2. Types of Indexes:
• Primary Index: An index where the search key is a unique identifier (e.g., primary key).
• Secondary Index: An index where the search key is not unique.
• Clustered Index: The order of records in the database is the same as the index order.
• Non-clustered Index: The records are stored separately, and the index points to the
locations.
• Multilevel Index: An index built on top of another index to optimize search efficiency.

3. Indexing Structures:
• B-Tree Indexing: A balanced tree structure. Each node contains multiple keys.
- Formula: Height of B-tree: h = log_d(N) where d is the order of the tree and N is the
number of nodes.
- Search Time Complexity: O(log N)
• B+ Tree Indexing: A variation of B-tree where all records are stored in leaf nodes.
- Formula: Height: Same as B-tree: h = log_d(N)
- Searching: O(log N)
• Hash Indexing: Uses a hash function to map keys to specific positions.
- Formula: hash(key) = key mod size_of_table
- Search Time Complexity: O(1) (in ideal conditions)

4. Indexing Operations:
• Insertion in B-Tree/B+ Tree: Insert a key while maintaining the tree's balance. Split nodes
if necessary.
• Deletion in B-Tree/B+ Tree: Remove a key and ensure tree properties are maintained.
Merge nodes if necessary.
• Search Operation: Search involves traversing the tree from root to leaf to find the key.

5. Time Complexity of Indexing Operations:


• Search: O(log N) for balanced trees (B-tree, B+ tree).
• Insertion: O(log N) for B-tree, B+ tree.
• Deletion: O(log N) for B-tree, B+ tree.
6. Hashing and Collision Resolution:
• Direct Hashing: Simple hash function without collision handling.
• Chaining: Store multiple elements in a linked list for the same hash key.
• Open Addressing: Find the next available position in the array if a collision occurs.

7. Index Maintenance:
Indexes need to be updated when records are added, removed, or modified. In some cases,
indexes can become inefficient over time due to fragmentation.

You might also like