Download presentation
Presentation is loading. Please wait.
Published byTheodora Brittney Barnett Modified over 9 years ago
1
Fundamentals, Design, and Implementation, 9/e Appendix A Data Structures for Database Processing
2
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/2 Copyright © 2004 Flat Files A flat file is a file that has no repeating groups They are usually processed in some predetermined order
3
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/3 Copyright © 2004 Processing Flat Files Flat files can be ordered using the following data structures –Sequential lists: physically placing the records in the sequence in which they will be processed –Linked lists: attaching to each data record a pointer to another logically related record –Indexes or inverted list: building a table, separate from the data records that contains pointers to related records B-trees are special applications of indexes Data structures can be used to represent record relationships as well as secondary keys
4
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/4 Copyright © 2004 Example: Sequential Lists
5
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/5 Copyright © 2004 Example: Linked Lists
6
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/6 Copyright © 2004 Example: Circular Linked Lists
7
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/7 Copyright © 2004 Example: Two-Way Linked Lists
8
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/8 Copyright © 2004 Example: Indexes
9
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/9 Copyright © 2004 Example: B-Trees
10
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/10 Copyright © 2004 Example: B-Trees
11
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/11 Copyright © 2004 Summary of Data Structures
12
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/12 Copyright © 2004 Record Relationships Records can be related in three ways –A tree relationship has 1:N relationships with each child record has only one parent –A simple network is a collection of records and the 1:N relationships among them –A complex network is a collection of records and N:M relationships
13
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/13 Copyright © 2004 Example: Tree Structure
14
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/14 Copyright © 2004 Example: Simple Network
15
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/15 Copyright © 2004 Example: Complex Network
16
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/16 Copyright © 2004 Representing Trees Sequential lists, linked lists, and indexes can be used to represent trees
17
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/17 Copyright © 2004 Representing Trees with Sequential List
18
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/18 Copyright © 2004 Representing Trees with Linked List
19
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/19 Copyright © 2004 Representing Trees with Indexes
20
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/20 Copyright © 2004 Representing Simple Networks Simple networks can be decomposed into trees and then represented
21
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/21 Copyright © 2004 Representing Simple Networks with Linked List
22
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/22 Copyright © 2004 Representing Simple Networks with Indexes
23
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/23 Copyright © 2004 Representing Complex Networks Complex networks can be decomposed into simple networks containing an intersection record and then represented
24
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/24 Copyright © 2004 Representing Complex Networks with Linked List
25
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/25 Copyright © 2004 Relationship Representations Summary
26
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/26 Copyright © 2004 Secondary Key Representations Secondary keys are used to access the data on some field besides the primary key Secondary keys can be unique or non-unique –Non-unique secondary keys can be represented with both linked lists and indexes –Unique secondary keys can be represented only with indexes
27
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/27 Copyright © 2004 Representing Secondary Keys With Linked List
28
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/28 Copyright © 2004 Representing Unique Secondary Keys with Indexes
29
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/29 Copyright © 2004 Representing Non-Unique Secondary Keys with Indexes
30
Fundamentals, Design, and Implementation, 9/e Appendix A Data Structures for Database Processing
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.