DBMS 3
DBMS 3
DBMS 3
Efficient storage strategies optimize data retrieval and minimize storage space in databases.
Key strategies include indices, B-trees, and hashing.
1. Indices
Indices are data structures that improve query performance by reducing the search space for
specific rows.
Features:
Trade-offs:
2. B-Trees
B-trees are balanced tree data structures widely used for indexing and organizing data in
databases.
Structure:
Properties:
Each node has a maximum and minimum number of children, ensuring balance.
Keys in each node are in sorted order.
Leaf nodes are at the same level, ensuring uniform depth.
Use Case:
Ideal for range queries and situations where data must be accessed sequentially or
randomly.
Trade-offs:
3. Hashing
Hashing involves transforming a search key into a unique location (bucket) in memory using
a hash function.
Structure:
Hash table consists of buckets, each capable of storing one or more records.
The hash function computes the bucket index from the search key.
Types of Hashing:
Properties:
Trade-offs:
Comparison of Strategies