chapter 14

17
Copyright © 2004 Pearson Education, Inc.

Upload: ezra-merrill

Post on 31-Dec-2015

20 views

Category:

Documents


0 download

DESCRIPTION

Chapter 14. Indexing Structures for Files. FIGURE 14.1 Primary index on the ordering key field of the file shown in Figure 13.7. FIGURE 14.2 A clustering index on the DEPTNUMBER ordering nonkey field of an EMPLOYEE file. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 14

Copyright © 2004 Pearson Education, Inc.

Page 2: Chapter 14

Copyright © 2004 Pearson Education, Inc.

Chapter 14

Indexing Structures for Files

Page 3: Chapter 14

Slide 14-3Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.1Primary index on the ordering key field of the file shown in Figure 13.7.

Page 4: Chapter 14

Slide 14-4Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.2A clustering index on the DEPTNUMBER ordering nonkey field of an EMPLOYEE file.

Page 5: Chapter 14

Slide 14-5Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.3Clustering index with a separate block cluster for each group of records that share the same value for the clustering field.

Page 6: Chapter 14

Slide 14-6Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.4A dense secondary index (with block pointers) on a nonordering key field of a file.

Page 7: Chapter 14

Slide 14-7Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.5A secondary index (with recored pointers) on a nonkey field implemented using one level of indirection so that index entries are of fixed length and have unique field values.

Page 8: Chapter 14

Slide 14-8Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.6A two-level primary index resembling ISAM (Indexed Sequential Access Method) organization.

Page 9: Chapter 14

Slide 14-9Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.7A tree data structure that shows an unbalanced tree.

Page 10: Chapter 14

Slide 14-10Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.8A node in a search tree with pointers to subtrees below it.

Page 11: Chapter 14

Slide 14-11Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.9A search tree of order p = 3.

Page 12: Chapter 14

Slide 14-12Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.10B-tree structures. (a) A node in a B-tree with q – 1 search values. (b) A B-tree of order p = 3. The values were inserted in the order 8, 5, 1, 7, 3, 12, 9, 6.

Page 13: Chapter 14

Slide 14-13Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.11The nodes of a B+-tree. (a) Internal node of a B+-tree with q –1 search values. (b) Leaf node of a B+-tree with q – 1 search values and q – 1 data pointers.

Page 14: Chapter 14

Slide 14-14Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.12An example of insertion in a B+-tree with q = 3 and pleaf = 2.

Page 15: Chapter 14

Slide 14-15Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.13An example of deletion from a B+-tree.

Page 16: Chapter 14

Slide 14-16Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.14Example of a grid array on DNO and AGE attributes.

Page 17: Chapter 14

Slide 14-17Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition

Copyright © 2004 Pearson Education, Inc.

FIGURE 14.15B+-tree insertion with left redistribution.