0% found this document useful (0 votes)
2 views

Database Compressed

The document discusses indexing techniques in databases, highlighting their purpose in speeding up data retrieval and enhancing query performance. It explains different types of indices, including primary, dense, and sparse indices, and their roles in efficiently locating data and implementing constraints. The structure of an index is also described, emphasizing the importance of sorted values and pointers for quick access to records.

Uploaded by

jannatimtiaz288
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Database Compressed

The document discusses indexing techniques in databases, highlighting their purpose in speeding up data retrieval and enhancing query performance. It explains different types of indices, including primary, dense, and sparse indices, and their roles in efficiently locating data and implementing constraints. The structure of an index is also described, emphasizing the importance of sorted values and pointers for quick access to records.

Uploaded by

jannatimtiaz288
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

INDEXING TECHNIQUES

MEMBERS:
JANNATIMTIAZ F2022105205
HASEEB ASIF F2022105109
MALAIKA ZAHRA ALHUSSAINI
F2022105205
Index Structure
• An index speeds up data retrieval in a
database.
• Reduces the number of disk I/O
operations by allowing direct access
to rows.
• Helps in implementing constraints
like UNIQUE and PRIMARY KEY.
• An index creates a sorted version of a
column, allowing the database to
quickly locate rows without scanning
the entire table
PURPOSE
• Speeds up SELECT queries by reducing • Speeds up JOIN operations by providing
the time to locate data faster access to matching rows.
• Allows quick searches for specific rows • Helps implement PRIMARY KEY and UNIQUE
using indexed columns. constraints efficiently.
• Enhances performance of queries with • Minimizes the number of disk reads
ORDER BY and GROUP BY. required to fetch data.
INDEX STRUCTURE

• Contains a copy of the primary key or candidate key of the


table.

• Values are stored in sorted order for easy access to


corresponding data.

• Holds pointers with the address of the disk block where the
specific key's value is located.
• Order Indices
• Primary Index
1. Dense index
2. Sparse index
• Clustering Index
• Secondary Index
Created based on the primary key of
PRIMARY INDEX
the table

Primary keys are unique and


maintain a 1:1 relationship with
records

Primary keys are stored in sorted


order, making searching operations
highly efficient
TYPES OF PRIMARY INDEX

• DENSE INDEX:

• A dense index has an index entry for every record in the table.

• SPARSE INDEX:
• A sparse index stores index entries only for some records,
reducing index size and improving efficiency
DENSE INDEX
• Use a search engine to find relevant results based on your query
• Choose multiple high-quality sources to ensure diverse and trustworthy information
• Retrieve the content from selected sources and analyze it for useful insights
• Write a response based on the analysis, citing sources for reference
SPRASE INDEX

In a sparse index, only a subset of


records are indexed, saving storage
space and reducing the amount of data
processed during searches.

Although searches may require


scanning more records than in a dense
index, sparse indexing still improves
search efficiency compared to scanning
the entire database.

You might also like