SlideShare une entreprise Scribd logo
1  sur  36
CHAPTER 6 Index Structures for Files
Indexes ,[object Object],[object Object]
INDEX  –  consists of  keys  and  addresses  (physical disc locations.
TYPES OF SINGLE-LEVEL ORDERED INDEXES ,[object Object],[object Object],[object Object]
PRIMARY INDEXES ,[object Object],[object Object],[object Object],[object Object],[object Object]
Adams, John Aaron, Ed Alexander, Ed Aaron, Ed Acosta, Marc Abbott, Diane (Primary key field) NAME DATA FILE SSN BLOCK ANCHOR PRIMARY KEY VALUE BLOCK POINTER BDATE JOB SALARY INDEX FILE (<K(i), P(i)>entries) Adams, John Adams, Robin Alexander, Ed Alfred, Bob Akers, John Allen, Sam PRIMARY INDEX
[object Object],[object Object],[object Object]
DENSE INDEX
SPARSE OR NON-DENSE INDEX
The index file for a primary index needs substantially fewer blocks than does the data file, for two reasons. ,[object Object],[object Object]
CLUSTERING INDEXES ,[object Object]
CLUSTERING INDEX
SECONDARY INDEXES ,[object Object],[object Object]
SECONDARY INDEX
TYPES OF INDEXES ORDERING FIELD NON ORDERING FIELD Key field NonKey field Primary index Secondary index (nonkey) Secondary index (key) Clustering index
PROPERTIES OF INDEX TYPES No Dense or nondense Number of records or number of distinct index field values Secondary (nonkey) No Dense Number of records in data file Secondary (key) Yes/No Nondense Number of distinct index field values Clustering Yes Nondense Number of blocks in data file Primary BLOCK ANCHORING ON THE DATA FILE DENSE OR NONDENSE NUMBER OF (FIRST-LEVEL) INDEX ENTRIES TYPE OF INDEX
MULTILEVEL INDEXES ,[object Object],[object Object]
MULTILEVEL INDEX 5 3000 4 2500 3 2000 2 1500 1 1000 Address(Index) High Key 14 2500 13 2400 12 2300 11 2200 10 2100 Address(Index) High Key 69 2400 68 2390 67 2380 66 2370 65 2360 64 2350 63 2340 62 2330 61 2320 60 2310 Address(Index) High Key 781049 2360 781048 2359 781047 2358 781046 2357 781045 2356 781044 2355 781043 2354 781042 2353 781041 2352 781040 2351 Address Key
INDEXED SEQUENTIAL FILE ,[object Object],[object Object],[object Object],[object Object],[object Object]
EXAMPLE:  A company may store details about its employees as an indexed sequential file. Sometimes the file is accessed… ,[object Object],[object Object]
DYNAMIC MULTILEVEL INDEXES USING B-TREES AND B+ TREES ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object]
A K I H G D C J F E B Root node (level 0) nodes at level 1 Nodes at level 2 Nodes at level 3 SUBTREE FOR NODE B (nodes E, J, C, G, H, and K are leaf nodes of the tree) A tree data structure that shows an unbalanced tree.
SEARCH TREES AND B-TREES ,[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],B-TREE
A simple B tree example.
B+ TREES ,[object Object],[object Object]
A simple B+ tree example linking the keys 1-7 to data values d1-d7. Note the linked list (red) allowing rapid in-order traversal.
INDEXES ON MULTIPLE KEYS ,[object Object],[object Object]
PARTITIONED HASHING ,[object Object],[object Object]
GRID FILES ,[object Object],[object Object]
OTHER TYPES OF INDEXES ,[object Object],[object Object]
[object Object],[object Object]
[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Tendances

Indexing and-hashing
Indexing and-hashingIndexing and-hashing
Indexing and-hashingAmi Ranjit
 
Database indexing techniques
Database indexing techniquesDatabase indexing techniques
Database indexing techniquesahmadmughal0312
 
File organization 1
File organization 1File organization 1
File organization 1Rupali Rana
 
File Structures(Part 2)
File Structures(Part 2)File Structures(Part 2)
File Structures(Part 2)SURBHI SAROHA
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on lineMilind Patil
 
Database indexing framework
Database indexing frameworkDatabase indexing framework
Database indexing frameworkNitin Pande
 
Key Terms for Web Searching Techniques
Key Terms for Web Searching TechniquesKey Terms for Web Searching Techniques
Key Terms for Web Searching Techniqueschloeparker97
 
Lecture03 abap on line
Lecture03 abap on lineLecture03 abap on line
Lecture03 abap on lineMilind Patil
 
File organization continued
File organization continuedFile organization continued
File organization continuedchesterking12
 
Fundamental File Processing Operations
Fundamental File Processing OperationsFundamental File Processing Operations
Fundamental File Processing OperationsRico
 

Tendances (20)

Indexing and-hashing
Indexing and-hashingIndexing and-hashing
Indexing and-hashing
 
Lec 1 indexing and hashing
Lec 1 indexing and hashing Lec 1 indexing and hashing
Lec 1 indexing and hashing
 
Database indexing techniques
Database indexing techniquesDatabase indexing techniques
Database indexing techniques
 
File organization 1
File organization 1File organization 1
File organization 1
 
File Structures(Part 2)
File Structures(Part 2)File Structures(Part 2)
File Structures(Part 2)
 
indexing and hashing
indexing and hashingindexing and hashing
indexing and hashing
 
Isam
IsamIsam
Isam
 
Indexing Data Structure
Indexing Data StructureIndexing Data Structure
Indexing Data Structure
 
File organization
File organizationFile organization
File organization
 
Data base
Data baseData base
Data base
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on line
 
Database indexing framework
Database indexing frameworkDatabase indexing framework
Database indexing framework
 
Ch10
Ch10Ch10
Ch10
 
Key Terms for Web Searching Techniques
Key Terms for Web Searching TechniquesKey Terms for Web Searching Techniques
Key Terms for Web Searching Techniques
 
SQL_Part1
SQL_Part1SQL_Part1
SQL_Part1
 
Lecture03 abap on line
Lecture03 abap on lineLecture03 abap on line
Lecture03 abap on line
 
Databases
DatabasesDatabases
Databases
 
File organization continued
File organization continuedFile organization continued
File organization continued
 
Data structure day5
Data structure day5Data structure day5
Data structure day5
 
Fundamental File Processing Operations
Fundamental File Processing OperationsFundamental File Processing Operations
Fundamental File Processing Operations
 

Similaire à Index Structures for Files - Types, Properties, Examples

3620121datastructures.ppt
3620121datastructures.ppt3620121datastructures.ppt
3620121datastructures.pptSheejamolMathew
 
Indexing techniques
Indexing techniquesIndexing techniques
Indexing techniquesHuda Alameen
 
Index Structures.pptx
Index Structures.pptxIndex Structures.pptx
Index Structures.pptxMBablu1
 
indexingstructureforfiles-160728120658.pdf
indexingstructureforfiles-160728120658.pdfindexingstructureforfiles-160728120658.pdf
indexingstructureforfiles-160728120658.pdfFraolUmeta
 
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhexing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhRAtna29
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMSkoolkampus
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in indiaEdhole.com
 
Database Performance
Database PerformanceDatabase Performance
Database PerformanceBoris Hristov
 
Unit 4 data storage and querying
Unit 4   data storage and queryingUnit 4   data storage and querying
Unit 4 data storage and queryingRavindran Kannan
 
Cs437 lecture 14_15
Cs437 lecture 14_15Cs437 lecture 14_15
Cs437 lecture 14_15Aneeb_Khawar
 

Similaire à Index Structures for Files - Types, Properties, Examples (20)

Storage struct
Storage structStorage struct
Storage struct
 
3620121datastructures.ppt
3620121datastructures.ppt3620121datastructures.ppt
3620121datastructures.ppt
 
Indexing techniques
Indexing techniquesIndexing techniques
Indexing techniques
 
Index Structures.pptx
Index Structures.pptxIndex Structures.pptx
Index Structures.pptx
 
Unit 08 dbms
Unit 08 dbmsUnit 08 dbms
Unit 08 dbms
 
indexingstructureforfiles-160728120658.pdf
indexingstructureforfiles-160728120658.pdfindexingstructureforfiles-160728120658.pdf
indexingstructureforfiles-160728120658.pdf
 
Data storage and indexing
Data storage and indexingData storage and indexing
Data storage and indexing
 
11885558.ppt
11885558.ppt11885558.ppt
11885558.ppt
 
Ch12
Ch12Ch12
Ch12
 
Chapter14.ppt
Chapter14.pptChapter14.ppt
Chapter14.ppt
 
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhexing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
 
Database Performance
Database PerformanceDatabase Performance
Database Performance
 
Database management system session 6
Database management system session 6Database management system session 6
Database management system session 6
 
DBMS (UNIT 5)
DBMS (UNIT 5)DBMS (UNIT 5)
DBMS (UNIT 5)
 
Unit 4 data storage and querying
Unit 4   data storage and queryingUnit 4   data storage and querying
Unit 4 data storage and querying
 
Cs437 lecture 14_15
Cs437 lecture 14_15Cs437 lecture 14_15
Cs437 lecture 14_15
 
SKILLWISE-DB2 DBA
SKILLWISE-DB2 DBASKILLWISE-DB2 DBA
SKILLWISE-DB2 DBA
 
Database Management
Database ManagementDatabase Management
Database Management
 

Dernier

Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africaictsugar
 
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCRashishs7044
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCRashishs7044
 
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...ShrutiBose4
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaoncallgirls2057
 
Buy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail AccountsBuy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail AccountsBuy Verified Accounts
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCRashishs7044
 
International Business Environments and Operations 16th Global Edition test b...
International Business Environments and Operations 16th Global Edition test b...International Business Environments and Operations 16th Global Edition test b...
International Business Environments and Operations 16th Global Edition test b...ssuserf63bd7
 
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCRashishs7044
 
IoT Insurance Observatory: summary 2024
IoT Insurance Observatory:  summary 2024IoT Insurance Observatory:  summary 2024
IoT Insurance Observatory: summary 2024Matteo Carbone
 
Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Kirill Klimov
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607dollysharma2066
 
Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Seta Wicaksana
 
8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCRashishs7044
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckHajeJanKamps
 
Investment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy CheruiyotInvestment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy Cheruiyotictsugar
 

Dernier (20)

Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africa
 
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
 
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
Ms Motilal Padampat Sugar Mills vs. State of Uttar Pradesh & Ors. - A Milesto...
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
 
Buy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail AccountsBuy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail Accounts
 
Corporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information TechnologyCorporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information Technology
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR
 
International Business Environments and Operations 16th Global Edition test b...
International Business Environments and Operations 16th Global Edition test b...International Business Environments and Operations 16th Global Edition test b...
International Business Environments and Operations 16th Global Edition test b...
 
Call Us ➥9319373153▻Call Girls In North Goa
Call Us ➥9319373153▻Call Girls In North GoaCall Us ➥9319373153▻Call Girls In North Goa
Call Us ➥9319373153▻Call Girls In North Goa
 
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
 
IoT Insurance Observatory: summary 2024
IoT Insurance Observatory:  summary 2024IoT Insurance Observatory:  summary 2024
IoT Insurance Observatory: summary 2024
 
Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
 
No-1 Call Girls In Goa 93193 VIP 73153 Escort service In North Goa Panaji, Ca...
No-1 Call Girls In Goa 93193 VIP 73153 Escort service In North Goa Panaji, Ca...No-1 Call Girls In Goa 93193 VIP 73153 Escort service In North Goa Panaji, Ca...
No-1 Call Girls In Goa 93193 VIP 73153 Escort service In North Goa Panaji, Ca...
 
Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...
 
8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR
 
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCREnjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
 
Investment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy CheruiyotInvestment in The Coconut Industry by Nancy Cheruiyot
Investment in The Coconut Industry by Nancy Cheruiyot
 

Index Structures for Files - Types, Properties, Examples

  • 1. CHAPTER 6 Index Structures for Files
  • 2.
  • 3. INDEX – consists of keys and addresses (physical disc locations.
  • 4.
  • 5.
  • 6. Adams, John Aaron, Ed Alexander, Ed Aaron, Ed Acosta, Marc Abbott, Diane (Primary key field) NAME DATA FILE SSN BLOCK ANCHOR PRIMARY KEY VALUE BLOCK POINTER BDATE JOB SALARY INDEX FILE (<K(i), P(i)>entries) Adams, John Adams, Robin Alexander, Ed Alfred, Bob Akers, John Allen, Sam PRIMARY INDEX
  • 7.
  • 10.
  • 11.
  • 13.
  • 15. TYPES OF INDEXES ORDERING FIELD NON ORDERING FIELD Key field NonKey field Primary index Secondary index (nonkey) Secondary index (key) Clustering index
  • 16. PROPERTIES OF INDEX TYPES No Dense or nondense Number of records or number of distinct index field values Secondary (nonkey) No Dense Number of records in data file Secondary (key) Yes/No Nondense Number of distinct index field values Clustering Yes Nondense Number of blocks in data file Primary BLOCK ANCHORING ON THE DATA FILE DENSE OR NONDENSE NUMBER OF (FIRST-LEVEL) INDEX ENTRIES TYPE OF INDEX
  • 17.
  • 18. MULTILEVEL INDEX 5 3000 4 2500 3 2000 2 1500 1 1000 Address(Index) High Key 14 2500 13 2400 12 2300 11 2200 10 2100 Address(Index) High Key 69 2400 68 2390 67 2380 66 2370 65 2360 64 2350 63 2340 62 2330 61 2320 60 2310 Address(Index) High Key 781049 2360 781048 2359 781047 2358 781046 2357 781045 2356 781044 2355 781043 2354 781042 2353 781041 2352 781040 2351 Address Key
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. A K I H G D C J F E B Root node (level 0) nodes at level 1 Nodes at level 2 Nodes at level 3 SUBTREE FOR NODE B (nodes E, J, C, G, H, and K are leaf nodes of the tree) A tree data structure that shows an unbalanced tree.
  • 24.
  • 25.
  • 26.
  • 27. A simple B tree example.
  • 28.
  • 29. A simple B+ tree example linking the keys 1-7 to data values d1-d7. Note the linked list (red) allowing rapid in-order traversal.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.