File Structures: An Object-Oriented Approach with C++
暫譯: 檔案結構:以 C++ 為物件導向的方法

Michael J. Folk, Bill Zoellick, Greg Riccardi

  • 出版商: Addison Wesley
  • 出版日期: 1997-12-26
  • 售價: $960
  • 貴賓價: 9.8$941
  • 語言: 英文
  • 頁數: 724
  • 裝訂: Hardcover
  • ISBN: 0201874016
  • ISBN-13: 9780201874013
  • 相關分類: C++ 程式語言
  • 已絕版

買這商品的人也買了...

商品描述


Description

This best-selling book provides the conceptual tools to build file structures that can be quickly and efficiently accessed. It teaches good design judgment through an approach that puts the "hands-on" work of constructing and running programs at the center of the learning process. This third edition presents the practice of object-oriented design and programming with complete implementations in C++ of many of the file structures techniques, including direct access I/O, buffer packing and unpacking, indexing, cosequential processing, B-trees, and external hashing. By following the examples, students will gain a significant understanding of file structure techniques, and see how C++ can be made an effective software development tool. Every line of code in the book has been tested on a variety of C++ systems. In addition, the class definitions and bodies are collected together in appendices.

Back to Top


Table Of Contents

INTRODUCTION TO FILE STRUCTURES.
The Heart of File Structure Design.
A Short History of File Structure Design.
A Conceptual Toolkit: File Structure Literacy.
Object-Oriented Programming in C++.

FUNDAMENTAL FILE PROCESSING OPERATIONS.
Physical Files and Logical Files.
Opening Files.
Closing Files.
Reading and Writing.
Seeking.
Special Characters in Files.
The UNIX Directory Structure.
Physical and Logical Files in UNIX.
File-related Header Files.
UNIX File System Commands.

SECONDARY STORAGE AND SYSTEM SOFTWARE.
Disks.
Magnetic Tape.
Disk versus Tape.
Storage as a Hierarchy.
A Journey of a Byte.
Buffer Management.
I/O in UNIX.

FUNDAMENTAL FILE STRUCTURE CONCEPTS.
Field and Record Organization.
Using Classes to Manipulate Buffers.
Using Inheritance for Record Buffer Classes.
Managing Fixed Length, Fixed Field Buffers.
An Object-Oriented Class for Record Files.

MANAGING FILES OF RECORDS.
Record Access.
More about Record Structures.
Encapsulating Record Operations in a Single Class.
File Access and File Organization.
Object-Oriented Approach to File Access.
Portability and Standardization.

ORGANIZING FILES FOR PERFORMANCE.
Data Compression.
Reclaiming Space in Files.
Finding Things Quickly: An Introduction to Internal Sorting and Binary Searching.
Keysorting.

INDEXING.
What Is an Index?
A Simple Index for Entry-Sequenced File.
Template Classes in C++.
Object-Oriented support for Indexed, Entry-Sequenced Files of Data Objects.
Indexes That Are Too Large to Hold in Memory.
Indexing to Provide Access by Multiple Keys.
Retrieval Using Combinations of Secondary Keys.
Improving the Secondary Index Structure: Inverted Lists.
Selective Indexes.
Binding.

COSEQUENTIAL PROCESSING AND THE SORTING OF LARGE FILES.
A Model for Implementing Cosequential Processes.
Application of the Model to a General Ledger Program.
Extension of the Model to Include Multiway Merging.
A Second Look at Sorting in Memory.
Merging as a Way of Sorting Large Files on Disk.
Sorting Files on Tape.
Sort-Merge Packages.
Sorting and Cosequential Processing in UNIX.

MULTI-LEVEL INDEXING AND B-TREES.
Introduction: The Invention of the B-Tree.
Statement of the Problem.
Binary Search Trees are not a Solution.
Multi-level Indexing, A Better Approach to Tree Indexes.
B-Trees: Working up from the Bottom.
Example of Creating a B-Tree.
An Object-Oriented Representation of B-Trees.
B-Tree MEthods Search, Insert, and Others.
B-Tree Nomenclature.
Formal Definition of B-Tree Properties.
Worst-case Search Depth.
Deletion, Merging, and Redistribution.
Redistribution during Insertion: A Way to Improve Storage Utilization.
B* Trees.
Buffering of Pages: Virtual B-Trees.
Variable-length Records and Keys.

INDEXED SEQUENTIAL FILE ACCESS AND PREFIX B+ TREES.
Indexed Sequential Access.
Maintaining a Sequence Set.
Adding a Simple Index to the Sequence Set.
The Content of the Index: Separators Instead of Keys.
The Simple Prefix B+ Tree.
Simple Prefix B+ Tree Maintenance.
Index Set Block Size.
Internal Structure of Index Set Blocks: A Variable-order B-Tree.
Loading a Simple Prefix B+ Tree.
B+ Trees.
B-Trees, B+ Trees, and Simple Prefix B+ Trees in Perspective.

HASHING.
Introduction.
A Simple Hashing Algorithm.
Hashing Functions and Record Distributions.
How Much Extra Memory Should Be Used?
Collision Resolution by Progressive Overflow.
Storing More Than One Record per Address: Buckets.
Making Deletions.
Other Collision Resolution Techniques.
Patterns of Record Access.

EXTENDIBLE HASHING.
Introduction.
How Extendible Hashing Works.
Implementation.
Deletion.
Extendible Hashing Performance.
Alternative Approaches.

APPENDIX A. FILE STRUCTURES ON CD-ROM.
Using this Appendix.
Introduction to CD-ROM.
Physical Organization of CD-ROM.
CD-ROM Strengths and Weaknesses.
Tree Structures on CD-ROM.
Hashed Files on CD-ROM.
The CD-ROM File System.

APPENDIX B. ASCII TABLE.
APPENDIX C. SIMPLE FILE INPUT/OUTPUT EXAMPLES.
List.c. C program to read and display the contents of a file.
List.cpp. C++ program to read and display the contents of a file.
Person.h. Definition for class Person, including code for constructor.
Writestr.cpp. Write Person objects into a stream file Readdel.cpp. Read Person objects with fields delimited by '|'.
Readvar.cpp. Read variable length records and break up into Person objects.
Writeper.cpp. Function to write a person to a text file.
Readper.cpp. Function to prompt user and read fields of a Person.

APPENDIX D. CLASSES FOR BUFFER MANIPULATION.
Person.h. Definition for class Person.
Person.cpp. Code for class Person.
Deltext.h. Definition for class DelimitedTextBuffer.
Deltext.cpp. Code for class DelimitedTextBuffer.
Lentext.h. Definition for class LengthTextBuffer.
Lentext.cpp. Code for class LengthTextBuffer.
Fixtext.h. Definition for class FixedTextBuffer.
Fixtext.cpp. Code for class FixedTextBuffer.
Test.cpp. Test program for all buffer classes.

APPENDIX E. A CLASS HIERARCHY FOR BUFFER INPUT/OUTPUT.
Person.h. Definition for class Person.
Person.cpp. Code for class Person.
Iobuffer.h. Definition for class IOBuffer.
Iobuffer.cpp. Code for class IOBuffer.
Varlen.h. Definition for class VariableLengthBuffer.
Varlen.cpp. Code for class VariableLengthBuffer.
Delim.h. Definition for class DelimFieldBuffer.
Delim.cpp. Code for class DelimFieldBuffer.
Length.h. Definition for class LengthFieldBuffer.
Length.cpp. Code for class LengthFieldBuffer.
Fixlen.h. Definition for class FixedLengthBuffer.
Fixlen.cpp. Code for class FixedLengthBuffer.
Fixfld.h. Definition for class FixedFieldBuffer.
Fixfld.cpp. Code for class FixedFieldBuffer.
Buffile.h. Definition for class BufferFile.
Buffile.cpp. Code for class BufferFile.
Recfile.h. Template class RecordFile.
Test.cpp. Test program for buffer classes and RecordFile including template function.

APPENDIX F. SIMPLE INDEXING AND TEMPLATE CLASSES.
APPENDIX G. MULTI-LEVEL INDEXING: B+ TREE CLASSES.
APPENDIX H. CLASSES TO SUPPORT HASHING. 0201874016T04062001


Back to Top

商品描述(中文翻譯)

描述
這本暢銷書提供了構建可以快速且高效訪問的檔案結構的概念工具。它通過將「實作」的程式構建和運行工作置於學習過程的中心,教導良好的設計判斷。本書第三版展示了物件導向設計和程式設計的實踐,並提供了許多檔案結構技術的完整 C++ 實作,包括直接訪問 I/O、緩衝區打包和解包、索引、協同處理、B 樹和外部雜湊。透過跟隨範例,學生將對檔案結構技術有顯著的理解,並看到 C++ 如何成為有效的軟體開發工具。本書中的每一行程式碼都已在各種 C++ 系統上進行測試。此外,類別定義和主體被集中在附錄中。

目錄
**檔案結構導論**
檔案結構設計的核心。
檔案結構設計的簡短歷史。
概念工具包:檔案結構素養。
C++ 中的物件導向程式設計。

**基本檔案處理操作**
物理檔案和邏輯檔案。
開啟檔案。
關閉檔案。
讀取和寫入。
尋找。
檔案中的特殊字元。
UNIX 目錄結構。
UNIX 中的物理和邏輯檔案。
與檔案相關的標頭檔。
UNIX 檔案系統命令。

**次級儲存和系統軟體**
磁碟。
磁帶。
磁碟與磁帶的比較。
儲存作為層級結構。
一個位元組的旅程。
緩衝區管理。
UNIX 中的 I/O。

**基本檔案結構概念**
欄位和記錄組織。
使用類別操作緩衝區。
使用繼承來處理記錄緩衝區類別。
管理固定長度、固定欄位的緩衝區。
記錄檔案的物件導向類別。

**管理記錄檔案**
記錄訪問。
有關記錄結構的更多資訊。
將記錄操作封裝在單一類別中。
檔案訪問和檔案組織。
物件導向的檔案訪問方法。
可攜性和標準化。

**為性能組織檔案**
數據壓縮。
回收檔案中的空間。
快速查找:內部排序和二元搜尋簡介。
關鍵排序。

**索引**
什麼是索引?
針對條目序列檔案的簡單索引。
C++ 中的模板類別。
對索引的物件導向支持,條目序列的數據物件。
過大無法在記憶體中保存的索引。
通過多個鍵提供訪問的索引。
使用次要鍵的組合進行檢索。
改善次級索引結構:反向列表。
選擇性索引。
綁定。

**協同處理和大型檔案的排序**
實現協同過程的模型。
將模型應用於總帳程式。
擴展模型以包括多路合併。
重新檢視記憶體中的排序。
合併作為在磁碟上排序大型檔案的方法。
在磁帶上排序檔案。
排序合併套件。
UNIX 中的排序和協同處理。

**多層索引和 B 樹**
簡介:B 樹的發明。
問題陳述。
二元搜尋樹不是解決方案。
多層索引,更好的樹索引方法。
B 樹:從底部開始工作。
創建 B 樹的範例。
B 樹的物件導向表示。
B 樹方法:搜尋、插入及其他。
B 樹命名法。
B 樹屬性的正式定義。
最壞情況下的搜尋深度。
刪除、合併和重新分配。
插入過程中的重新分配:改善儲存利用率的方法。
B* 樹。
頁面的緩衝:虛擬 B 樹。
可變長度的記錄和鍵。

**索引序列檔案訪問和前綴 B+ 樹**
索引序列訪問。
維護序列集。
向序列集中添加簡單索引。
索引的內容:分隔符而非鍵。
簡單前綴 B+ 樹。
簡單前綴 B+ 樹的維護。
索引集區塊大小。
索引集區塊的內部結構:可變順序 B 樹。
加載簡單前綴 B+ 樹。
B+ 樹。
B 樹、B+ 樹和簡單前綴 B+ 樹的比較。

**雜湊**
簡介。
簡單的雜湊演算法。
雜湊函數和記錄分佈。
應該使用多少額外記憶體?
通過漸進溢出解決衝突。
每個地址存儲多於一個記錄:桶。
進行刪除。
其他衝突解決技術。
記錄訪問模式。

**可擴展雜湊**
簡介。
可擴展雜湊的工作原理。
實作。
刪除。
可擴展雜湊性能。
替代方法。

**附錄 A. CD-ROM 上的檔案結構**
使用本附錄。
CD-ROM 簡介。
CD-ROM 的物理組織。
CD-ROM 的優勢和劣勢。
CD-ROM 上的樹結構。
CD-ROM 上的雜湊檔案。
CD-ROM 檔案系統。

**附錄 B. ASCII 表**
**附錄 C. 簡單檔案輸入/輸出範例**
List.c。C 程式用於讀取和顯示檔案內容。
List.cpp。C++ 程式用於讀取和顯示檔案內容。
Person.h。類別 Person 的定義,包括建構子的程式碼。
Writestr.cpp。將 Person 物件寫入串流檔案。
Readdel.cpp。讀取以 '|' 分隔的 Person 物件。
Readvar.cpp。讀取可變長度記錄並分解為 Person 物件。
Writeper.cpp。將人員寫入文本檔案的函數。
Readper.cpp。提示用戶並讀取 Person 的欄位的函數。

**附錄 D. 用於緩衝區操作的類別**
Person.h。類別 Person 的定義。
Person.cpp。類別 Person 的程式碼。
Deltext.h。類別 DelimitedTextBuffer 的定義。
Deltext.cpp。類別 DelimitedTextBuffer 的程式碼。
Lentext.h。類別 LengthTextBuffer 的定義。
Lentext.cpp。類別 LengthTextBuffer 的程式碼。
Fixtext.h。類別 FixedTextBuffer 的定義。
Fixtext.cpp。類別 FixedTextBuffer 的程式碼。
Test.cpp。所有緩衝區類別的測試程式。

**附錄 E. 用於緩衝輸入/輸出的類別層級**
Person.h。類別 Person 的定義。
Person.cpp。類別 Person 的程式碼。
Iobuffer.h。類別 IOBuffer 的定義。
Iobuffer.cpp。類別 IOBuffer 的程式碼。
Varlen.h。類別 VariableLengthBuffer 的定義。
Varlen.cpp。類別 VariableLengthBuffer 的程式碼。
Delim.h。類別 DelimFieldBuffer 的定義。
Delim.cpp。類別 DelimFieldBuffer 的程式碼。
Length.h。類別 LengthFieldBuffer 的定義。
Length.cpp。類別 LengthFieldBuffer 的程式碼。
Fixlen.h。類別 FixedLengthBuffer 的定義。
Fixlen.cpp。類別 FixedLengthBuffer 的程式碼。
Fixfld.h。類別 FixedFieldBuffer 的定義。
Fixfld.cpp。類別 FixedFieldBuffer 的程式碼。
Buffile.h。類別 BufferFile 的定義。
Buffile.cpp。類別 BufferFile 的程式碼。
Recfile.h。模板類別 RecordFile。
Test.cpp。緩衝區類別和 RecordFile 的測試程式,包括模板函數。

**附錄 F. 簡單索引和模板類別**
**附錄 G. 多層索引:B+ 樹類別**
**附錄 H. 支持雜湊的類別**

最後瀏覽商品 (16)