David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Appendix G: Data Structures for Database Processing.

Slides:



Advertisements
Similar presentations
Object-Oriented Analysis and Design: Activity Diagrams
Advertisements

Chapter 1 Getting Started with Access Databases. Objectives Identify Good Database Design Create a Table and Define Fields in a New Blank Database Change.
Data Modeling and the Entity-Relationship Model
Database Design Chapter Five DATABASE CONCEPTS, 6th Edition
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeAppendix A/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Fundamentals, Design, and Implementation, 9/e Appendix A Data Structures for Database Processing.
Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 7 th Edition.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Copyright © 2004 Pearson Education, Inc.. Chapter 14 Indexing Structures for Files.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
David M. Kroenke and David J
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 7 th Edition.
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Getting Started with Microsoft Visio 2010 Appendix G DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Getting Started with Microsoft SQL Server 2012 Express Edition Appendix A DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
David M. Kroenke and David J. Auer Database Processing—12 th Edition Fundamentals, Design, and Implementation Chapter One: Introduction KROENKE AND AUER.
Getting Started Chapter One DATABASE CONCEPTS, 7th Edition
Chapter 8 Structuring System Data Requirements
Entity-Relationship Model
Getting Started with Microsoft Access The Access Workbench: Section One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. 1 by Mary Anne Poatsy, Keith Mulbery, Lynn Hogan, Amy Rutledge, Cyndi Krebs, Eric.
Getting Started with Oracle Database 11g Release 2 Express Edition Appendix B DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 6 th Edition.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. by Mary Anne Poatsy, Keith Mulbery, Eric Cameron, Jason Davidson, Rebecca Lawson,
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. Access Module 1 Workshop 1 The Four Main Database Objects Series Editor Amy Kinser.
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 1: The Database Environment Modern Database Management 9 th Edition Jeffrey A. Hoffer,
GO! with Office 2013 Volume 1 By: Shelley Gaskin, Alicia Vargas, and Carolyn McLellan Access Chapter 3 Forms, Filters, and Reports.
GO! All In One 2/E By: Shelley Gaskin, Nancy Graviett, Debra Geoghan Chapter 13 Creating and Editing Presentations with Microsoft PowerPoint 2013 Copyright.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
1 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall.
Chapter 7 Appendix C Object-Oriented Analysis and Design: Sequence Diagrams Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F.
Getting Started Chapter One DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
Skills for Success with Microsoft Office 2013 Volume 1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. by Kris Townsend, Catherine.
Appendix C File Organization & Storage Structure.
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
The Relational Model Chapter Two DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 4 th Edition.
© 2012 Pearson Education, Inc. publishing Prentice Hall. Note 9 The Product Life Cycle.
GO! with Office 2013 Volume 1 By: Shelley Gaskin, Alicia Vargas, and Carolyn McLellan Access Chapter 1 Introduction to Microsoft Access 2013.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Eight: Database Redesign.
David M. Kroenke and David J. Auer Database Processing: Fundamentals, Design, and Implementation Chapter One: Introduction.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship.
GO! with Office 2013 Volume 1 By: Shelley Gaskin, Alicia Vargas, and Carolyn McLellan Word Chapter 2 Using Tables and Templates to Create Resumes and Cover.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Appendix J: Business Intelligence Systems.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Appendix H: The Semantic Object Model.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Three: The Relational Model and Normalization.
GO! with Office 2013 Volume 1 By: Shelley Gaskin, Alicia Vargas, and Carolyn McLellan PowerPoint Chapter 3 Enhancing a Presentation with Animation, Video,
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Appendix C: E-R Diagrams and The IDEF1X Standard.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Appendix A: Getting Started with Microsoft Access 2013.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Appendix E: Getting Started with MySQL Workbench Data Modeling.
David M. Kroenke and David J. Auer Database Processing: F undamentals, Design, and Implementation Chapter Three: The Relational Model and Normalization.
David M. Kroenke and David J. Auer Database Processing: Fundamentals, Design, and Implementation Chapter Ten: Managing Databases with SQL Server 2012,
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Process Specifications and Structured Decisions Systems Analysis and Design, 8e Kendall.
David M. Kroenke and David J
Database Design Chapter Five DATABASE CONCEPTS, 4th Edition
David M. Kroenke and David J
MIS 322 – Enterprise Business Process Analysis
GO! with Microsoft® Access e
David M. Kroenke and David J
Getting Started Chapter One DATABASE CONCEPTS, 5th Edition
Getting Started Chapter One DATABASE CONCEPTS, 4th Edition
Presentation transcript:

David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Appendix G: Data Structures for Database Processing

Chapter Objectives To define the term data structures To define and illustrate the terms flat file, sequential list, linked list, and index To define and illustrate B-tree multilevel indexes To demonstrate how binary relationships are represented using trees, simple networks, and complex networks To define and illustrate primary and secondary keys To define and illustrate unique and nonunique secondary keys KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-2

Flat Files A flat file is a file that has no repeating groups. They are usually processed in some predetermined order. Flat File: Nonflat File: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-3

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. KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-4

Sequential Lists Stored by StudentNumber:Stored by ClassNumber: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-5

Linked Lists ENROLLMENT data in two orders using linked lists: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-6

Circular Linked Lists ENROLLMENT data sorted by StudentNumber using a circular linked list: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-7

Two-Way Linked Lists ENROLLMENT data sorted by StudentNumber using a two-way linked list: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-8

Indexes ENROLLMENT data and corresponding indexes: ENROLLMENT data:Index on StudentNumber: Index on ClassNumber: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-9

B-Trees A B-Tree is a multilevel index that allows both sequential and direct process of data records. A B-Tree index has two parts: –The sequence set is an index containing an entry for every record in the file in physical sequence (usually by primary key value). –The index set is an index pointing to groups of entries in the sequence set data. By definition, B-Trees are balanced—all of the data records are exactly the same distance from the top entry in the index set. KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-10

B-Trees: General Structure KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-11

B-Trees: Index Set and Sequence Set KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-12

Summary of Data Relationships and Data Organizations Used for Ordered Flat Files KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-13

Representing Binary Relationships: Record Relationships Records can be related in three ways: –A tree relationship has 1:N relationships where each child record has only one parent record. –A simple network is a collection of records and the 1:N relationships among them. –A complex network is a collection of records and the N:M relationships among them. KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-14

Tree Relationships: Occurrence of a Faculty Member Record KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-15

Tree Relationships: Schematic of a Faculty Member Tree Structure KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-16

Simple Networks: Occurrence of a Simple Network KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-17

Simple Networks: General Structure of a Simple Network KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-18

Complex Networks: Occurrence of a Complex Network KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-19

Complex Networks: General Structure of a Complex Network KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-20

Representing Trees Sequential lists, linked lists, and indexes can all be used to represent trees. KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-21

Representing Trees: The VENDOR-INVOICE Tree Example tree relating VENDOR and INVOICE records: Two occurrences of the VENDOR-INVOICE tree: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-22

Representing Trees with Sequential Lists: The VENDOR-INVOICE Tree KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-23

Representing Trees with Linked Lists: The VENDOR-INVOICE Tree KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-24

Representing Trees with Linked Lists: Inserting a Record KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-25

Representing Trees with Linked Lists: Deleting a Record KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-26

Representing Trees with Indexes: The VENDOR-INVOICE Tree Index: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-27

Representing Simple Networks: The CUSTOMER-TRUCK-SHIPMENT Structure Example simple network relating CUSTOMER, TRUCK, and SHIPMENT records: Occurrences of the CUSTOMER- TRUCK-SHIPMENT simple network: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-28

Representing Simple Networks with Linked Lists: The CUSTOMER-TRUCK-SHIPMENT Structure KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-29

Representing Simple Networks with Indexes: The CUSTOMER-TRUCK-SHIPMENT Structure Indexes: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-30

Representing Complex Networks Complex networks represented by: –Decomposing them into trees –Decomposing them into simple networks This will require an intersection record Can be represented using techniques for simple networks –Using indexes Linked lists are not used by any DBMS product to represent complex networks. KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-31

Representing Complex Networks: Decomposition into Simple Networks Example STUDENT-CLASS complex network: Decomposition of the STUDENT-CLASS complex network into a simple network using STUDENT- CLASS intersection records: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-32

Representing Complex Networks: Decomposition into Simple Networks Occurrences of the STUDENT- CLASS simple network with STUDENT-CLASS intersection records: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-33

Representing Complex Networks with Linked Lists: The STUDENT-CLASS Structure KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-34

Summary of Relationship Representations KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-35

Secondary Key Representations Key indicates a field (or fields) used to uniquely identify a row or record. This key usually is called the primary key. Secondary keys are used to access the data on some field besides the primary key. Secondary keys can be unique or nonunique. –Nonunique secondary keys can be represented with both linked lists and indexes. Set refers to all records that have the same value of a nonunique secondary key. –Unique secondary keys can be represented only with indexes. KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-36

Representing Secondary Keys with Linked Lists: The CUSTOMER Records The CUSTOMER Record Structure: Representing the secondary key CreditLimit using a linked list: KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-37

Representing Secondary Keys with Indexes: Unique Secondary Keys The CUSTOMER Record Structure: Sample CUSTOMER data with SSN and an index on SSN as a secondary key: Assume that CUSTOMER has a field named SSN to hold the Social Security Number. These numbers are unique. KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-38

Representing Secondary Keys with Indexes: Nonunique Secondary Keys The CUSTOMER Record Structure: Sample CUSTOMER data values for CreditLimit and an index on CreditLimit as a secondary key (See earlier slide with CUSTOMER table for complete data set): The CUSTOMER field named CreditLimit holds numbers that are nonunique. KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-39

Representing Secondary Keys with Indexes: Nonunique Secondary Keys Representing and processing nonunique secondary keys are complex tasks. One common commercial DBMS method uses values tables and occurrence tables: –Values table—Contains two fields: Secondary key value Pointer into the occurrence table –Occurrence table —Contains record addresses Those record addresses that form a set are stored together in the occurrence table KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-40

Representing Secondary Keys with Indexes: Nonunique Secondary Keys The CUSTOMER Record Structure: Sample CUSTOMER data values for CreditLimit and an index on CreditLimit as a secondary key (See earlier slide with CUSTOMER table for complete data set) using a values table and an occurrence table: The CUSTOMER field named CreditLimit holds numbers that are nonunique. KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-41

David Kroenke and David Auer Database Processing Fundamentals, Design, and Implementation (13th Edition) End of Presentation: Appendix G KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-42

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. KROENKE AND AUER - DATABASE PROCESSING, 13th Edition © 2014 Pearson Education, Inc. G-43