SlideShare a Scribd company logo
1 of 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]

More Related Content

What's hot

Indexing and-hashing
Indexing and-hashingIndexing and-hashing
Indexing and-hashing
Ami Ranjit
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on line
Milind Patil
 
Key Terms for Web Searching Techniques
Key Terms for Web Searching TechniquesKey Terms for Web Searching Techniques
Key Terms for Web Searching Techniques
chloeparker97
 
Lecture03 abap on line
Lecture03 abap on lineLecture03 abap on line
Lecture03 abap on line
Milind Patil
 
Fundamental File Processing Operations
Fundamental File Processing OperationsFundamental File Processing Operations
Fundamental File Processing Operations
Rico
 

What's hot (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
 

Similar to Ardbms

indexingstructureforfiles-160728120658.pdf
indexingstructureforfiles-160728120658.pdfindexingstructureforfiles-160728120658.pdf
indexingstructureforfiles-160728120658.pdf
FraolUmeta
 
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhexing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
exing.ppt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
RAtna29
 
12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS12. Indexing and Hashing in DBMS
12. Indexing and Hashing in DBMS
koolkampus
 

Similar to Ardbms (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
 

Recently uploaded

obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
yulianti213969
 
obat aborsi jakarta wa 081336238223 jual obat aborsi cytotec asli di jakarta9...
obat aborsi jakarta wa 081336238223 jual obat aborsi cytotec asli di jakarta9...obat aborsi jakarta wa 081336238223 jual obat aborsi cytotec asli di jakarta9...
obat aborsi jakarta wa 081336238223 jual obat aborsi cytotec asli di jakarta9...
yulianti213969
 
Obat Aborsi Depok 0851\7696\3835 Jual Obat Cytotec Di Depok
Obat Aborsi Depok 0851\7696\3835 Jual Obat Cytotec Di DepokObat Aborsi Depok 0851\7696\3835 Jual Obat Cytotec Di Depok
Obat Aborsi Depok 0851\7696\3835 Jual Obat Cytotec Di Depok
Obat Aborsi Jakarta Wa 085176963835 Apotek Jual Obat Cytotec Di Jakarta
 
Mental Health Issues of Graduate Students
Mental Health Issues of Graduate StudentsMental Health Issues of Graduate Students
Mental Health Issues of Graduate Students
vineshkumarsajnani12
 
Obat Aborsi Malang 0851\7696\3835 Jual Obat Cytotec Di Malang
Obat Aborsi Malang 0851\7696\3835 Jual Obat Cytotec Di MalangObat Aborsi Malang 0851\7696\3835 Jual Obat Cytotec Di Malang
Obat Aborsi Malang 0851\7696\3835 Jual Obat Cytotec Di Malang
Obat Aborsi Jakarta Wa 085176963835 Apotek Jual Obat Cytotec Di Jakarta
 
Powerpoint showing results from tik tok metrics
Powerpoint showing results from tik tok metricsPowerpoint showing results from tik tok metrics
Powerpoint showing results from tik tok metrics
CaitlinCummins3
 

Recently uploaded (20)

obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
 
Unlocking Growth The Power of Outsourcing for CPA Firms
Unlocking Growth The Power of Outsourcing for CPA FirmsUnlocking Growth The Power of Outsourcing for CPA Firms
Unlocking Growth The Power of Outsourcing for CPA Firms
 
Progress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdf
Progress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdfProgress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdf
Progress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdf
 
Moradia Isolada com Logradouro; Detached house with patio in Penacova
Moradia Isolada com Logradouro; Detached house with patio in PenacovaMoradia Isolada com Logradouro; Detached house with patio in Penacova
Moradia Isolada com Logradouro; Detached house with patio in Penacova
 
Goal Presentation_NEW EMPLOYEE_NETAPS FOUNDATION.pptx
Goal Presentation_NEW EMPLOYEE_NETAPS FOUNDATION.pptxGoal Presentation_NEW EMPLOYEE_NETAPS FOUNDATION.pptx
Goal Presentation_NEW EMPLOYEE_NETAPS FOUNDATION.pptx
 
What are the differences between an international company, a global company, ...
What are the differences between an international company, a global company, ...What are the differences between an international company, a global company, ...
What are the differences between an international company, a global company, ...
 
Beyond Numbers A Holistic Approach to Forensic Accounting
Beyond Numbers A Holistic Approach to Forensic AccountingBeyond Numbers A Holistic Approach to Forensic Accounting
Beyond Numbers A Holistic Approach to Forensic Accounting
 
obat aborsi jakarta wa 081336238223 jual obat aborsi cytotec asli di jakarta9...
obat aborsi jakarta wa 081336238223 jual obat aborsi cytotec asli di jakarta9...obat aborsi jakarta wa 081336238223 jual obat aborsi cytotec asli di jakarta9...
obat aborsi jakarta wa 081336238223 jual obat aborsi cytotec asli di jakarta9...
 
Pixar Case Analysis.....................
Pixar Case Analysis.....................Pixar Case Analysis.....................
Pixar Case Analysis.....................
 
First Time Home Buyer's Guide - KM Realty Group LLC
First Time Home Buyer's Guide - KM Realty Group LLCFirst Time Home Buyer's Guide - KM Realty Group LLC
First Time Home Buyer's Guide - KM Realty Group LLC
 
Obat Aborsi Depok 0851\7696\3835 Jual Obat Cytotec Di Depok
Obat Aborsi Depok 0851\7696\3835 Jual Obat Cytotec Di DepokObat Aborsi Depok 0851\7696\3835 Jual Obat Cytotec Di Depok
Obat Aborsi Depok 0851\7696\3835 Jual Obat Cytotec Di Depok
 
Mental Health Issues of Graduate Students
Mental Health Issues of Graduate StudentsMental Health Issues of Graduate Students
Mental Health Issues of Graduate Students
 
Navigating Tax Season with Confidence Streamlines CPA Firms
Navigating Tax Season with Confidence Streamlines CPA FirmsNavigating Tax Season with Confidence Streamlines CPA Firms
Navigating Tax Season with Confidence Streamlines CPA Firms
 
How Bookkeeping helps you in Cost Saving, Tax Saving and Smooth Business Runn...
How Bookkeeping helps you in Cost Saving, Tax Saving and Smooth Business Runn...How Bookkeeping helps you in Cost Saving, Tax Saving and Smooth Business Runn...
How Bookkeeping helps you in Cost Saving, Tax Saving and Smooth Business Runn...
 
Understanding Financial Accounting 3rd Canadian Edition by Christopher D. Bur...
Understanding Financial Accounting 3rd Canadian Edition by Christopher D. Bur...Understanding Financial Accounting 3rd Canadian Edition by Christopher D. Bur...
Understanding Financial Accounting 3rd Canadian Edition by Christopher D. Bur...
 
Most Visionary Leaders in Cloud Revolution, Shaping Tech’s Next Era - 2024 (2...
Most Visionary Leaders in Cloud Revolution, Shaping Tech’s Next Era - 2024 (2...Most Visionary Leaders in Cloud Revolution, Shaping Tech’s Next Era - 2024 (2...
Most Visionary Leaders in Cloud Revolution, Shaping Tech’s Next Era - 2024 (2...
 
Obat Aborsi Malang 0851\7696\3835 Jual Obat Cytotec Di Malang
Obat Aborsi Malang 0851\7696\3835 Jual Obat Cytotec Di MalangObat Aborsi Malang 0851\7696\3835 Jual Obat Cytotec Di Malang
Obat Aborsi Malang 0851\7696\3835 Jual Obat Cytotec Di Malang
 
How does a bike-share company navigate speedy success? - Cyclistic
How does a bike-share company navigate speedy success? - CyclisticHow does a bike-share company navigate speedy success? - Cyclistic
How does a bike-share company navigate speedy success? - Cyclistic
 
Powerpoint showing results from tik tok metrics
Powerpoint showing results from tik tok metricsPowerpoint showing results from tik tok metrics
Powerpoint showing results from tik tok metrics
 
A DAY IN THE LIFE OF A SALESPERSON .pptx
A DAY IN THE LIFE OF A SALESPERSON .pptxA DAY IN THE LIFE OF A SALESPERSON .pptx
A DAY IN THE LIFE OF A SALESPERSON .pptx
 

Ardbms

  • 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.