內容簡介
《經典原版書庫:數據庫係統概念(英文精編版·第6版)》內容由淺入深,既包含數據庫係統基本概念,又反映數據庫技術新進展。它被國際上許多著名大學所采用,包括斯坦福大學、耶魯大學、得剋薩斯大學、康奈爾大學、伊利諾伊大學等。我國也有多所大學采用《經典原版書庫:數據庫係統概念(英文精編版·第6版)》作為本科生和研究生數據庫課程的教材和主要教學參考書,收到瞭良好的效果。《經典原版書庫:數據庫係統概念(英文精編版·第6版)》基於該書第6版進行改編,保留其中的基本內容,壓縮或刪除瞭一些高級內容,更加適閤作為國內高校計算機及相關專業本科生數據庫課程教材。
作者簡介
Abraham Silberchatz,於紐約州立大學石溪分校獲得博士學位,現為耶魯大學計算機科學SidneyJWeinberg教授,計算機科學係主任,曾任貝爾實驗室信息科學研究中心副主任。
HenryF.Korth,於普林斯頓大學獲得博士學位,現為利哈伊大學計算機科學與工程係Weiseman教授,曾任貝爾實驗室數據庫原理研究中心主任。他是ACM Fellow和IEEE Fellow,是VLDB10年貢獻奬的獲得者。
S.Sudarshan,於威斯康星大學麥迪遜分校獲得博士學位,現為印度理工學院計算機科學與工程係教授,曾為貝爾實驗室數據庫研究組技術人員。
內頁插圖
目錄
Chapter 1 Introduction
1.1 Database-System Applications
1.2 Purpose of Data base Systems
1.3 View of Data
1.4 Database Languages
1.5 Relational Databases
1.6 Database Design
1.7 Data Storage and Querying
1.8 Transaction Management
1.9 Database Architecture
1.10 Data Mining and Information Retrieval
1.11 Specialty Databases
1.12 Database Users and Administrators
1.13 History of Database Systems
1.14 Summary
Review Terms
Practice Exercises
Exercises
Tools
Bibliographical Notes
PART ONE RELATIONAL DATABASES
Chapter 2 Introduction to the Relational Model
2.1 Structure of Relational Databases
2.2 Database Schema
2.3 Keys
2.4 Schema Diagrams
2.5 Relational Query Languages
2.6 Relational Operations
2.7 Summary
Review Terms
Practice Exercises
Exercises
Bibliographical Notes
Chapter3 Introduction to SQL
3.1 Overview of the SQL Query Language
3.2 SQL Data Definition 3.3 Basic Structure of SQL Queries
3.4 Additional Basic Operations
3.5 Set Operations
3.6 Null Values
3.7 Aggregate Functions
3.8 Nested Subqueries
3.9 Modification of the Database
3.10 Summary
Review Terms
Practice Exercises
Exercises
Tools
Bibliographical Notes
Chapter 4 Intermediate SQL
4.1 Join Expressions
4.2 Views
4.3 Transactions
4.4 Integrity Constraints
4.5 SQL Data Types and Schemas
4.6 Authorization
4.7 Summary
Review Terms
Practice Exercises
Exercises
Bibliographical Notes
Chapter 5 Advanced SQL
5.1 Accessing SQL From a Programming Language
5.2 Functions and Procedures
5.3 Triggers
5.4 Recursive Queries
5.5 Advanced Aggregation Features
5.6 OLAP
5.7 Summary
Review Terms
Practice Exercises
Exercises
Tools
Bibliographical Notes
Chapter 6 Formal Relational Query Languages
6.1 The Relational Algebra
6.2 The Tuple Relational Calculus
6.3 The Domain Relational Calculus
6.4 Summary
Review Terms
Practice Exercises
Exercises
Bibliographical Notes
PART TWO DATABASE DESIGN
Chapter 7 Database Design and the E-R Model
7.1 Overview of the Design Process
7.2 The Entity-Relationship Model
7.3 Constraints 269
7.4 Removing Redundant Attributes in Entity Sets
7.5 Entity-Relationship Diagrams
7.6 Reduction to Relational Schemas
7.7 Entity-Relationship Design Issues
7.8 Extended E-R Features
7.9 Alternative Notations for Modeling Data
7.10 0ther Aspects of Database Design
7.11 Summary
Review Terms
Practice Exercises
Exercises
Tools
Bibliographical Notes
Chapter 8 Relational Database Design
8.1 Features of Good Relational Designs
8.2 Atomic Domains and First Normal Form
8.3 Decomposition Using Functional Dependencies
8.4 Functional-Dependency Theory
8.5 Algorithms for Decomposition
8.6 Decomposition Using Multivalued Dependencies
8.7 More Normal Forms
8.8 Database-Design Process
8.9 Modeling Temporal Data
8.10 Summary
Review Terms
Practice Exercises
Exercises
Bibliographical Notes
PART THREE DATA STORAGE , QUERYING, AND TRANSACTION MANAGEMENT
PART FOUR ADVANCED TOPICS
Bibliography
精彩書摘
Atomicity: Suppose that, just before the execution of transaction Ti, the values of accounts A and B are $1000 and $2000, respectively. Now suppose that, during the execution of transaction Ti, a failure occurs that prevents Ti from completing its execution successfully. Further, suppose that the failure happened after the write(A) operation but before the write(B) operation. In this case, the values of accounts A and B reflected in the database are $950 and $2000. The system destroyed $50 as a result of this failure. In particular, we note that the sum A + B is no longer preserved.
Thus, because of the failure, the state of the system no longer reflects a real state of the world that the database is supposed to capture. We term such a state an inconsistent state. We must ensure that such inconsistencies are not visible in a database system. Note, however, that the system must at some point be in an inconsistent state. Even if transaction Ti is executed to completion, there exists a point at which the value of account A is $950 and the value of account B is $2000, which is clearly an inconsistent state. This state, however, is eventually replaced by the consistent state where the value of account A is $950, and the value of account B is $2050.Thus, if the transaction never started or was guaranteed to complete, such an inconsistent state would not be visible except during the execution of the transaction. That is the reason for the atomicity requirement: If the atomicity property is present, all actions of the transaction are reflected in the database, or none are.
The basic idea behind ensuring atomicity is this: The database system keeps track (on disk) of the old values of any data on which a transaction performs a write. This information is written to a file called the log. If the transaction does not complete its execution, the database system restores the old values from the log to make it appear as though the transaction never executed. Ensuring atomicity is the responsibility of the database system; specifically, it is handled by a component of the database called the recovery system, which we describe in detail in Section 12.7.
Durability: Once the execution of the transaction completes successfully, and the user who initiated the transaction has been notified that the transfer of funds has taken place, it must be the case that no system failure can result in a loss of data corresponding to this transfer of funds. The durability property guarantees that, once a transaction completes successfully, all the updates that it carried out on the database persist, even if there is a system failure
after the transaction completes execution.
We assume for now that a failure of the computer system may result in loss of data in main memory, but data written to disk are never lost. We can guarantee durability by ensuring that either:
1. The updates carried out by the transaction have been written to disk before the transaction completes.
2. Information about the updates carried out by the transaction is written to disk, and such information is sufficient to enable the database to reconstruct the updates when the database system is restarted after the failure.
……
前言/序言
數據庫係統是對數據進行存儲、管理、處理和維護的軟件係統,是現代計算環境中的一個核心成分。隨著計算機硬件、軟件技術的飛速發展和計算機係統在各行各業的廣泛應用,數據庫技術的發展尤其迅速,引人注目。有關數據庫係統的理論和技術是計算機科學技術教育中必不可少的部分。《數據庫係統概念》是一本經典的、備受贊揚的數據庫係統教科書,其內容由淺入深,既包含數據庫係統的基本概念,又反映數據庫技術新進展。本書被國際上許多著名大學采用,並多次再版。
我們先後將本書的第3版、第4版、第5版和第6版譯成中文,由機械工業齣版社分彆於2000年、2003年、2006年和2012年齣版發行。國內許多大學采用《數據庫係統概念》作為本科生和研究生數據庫課程的教材或主要教學參考書,收到瞭良好的效果。
我們基於《數據庫係統概念》第5版進行瞭改編,保留其中的基本內容,壓縮或刪除瞭一些高級內容,形成瞭該書的本科教學版,其目的是使它更適閤本科生的數據庫課程使用。該本科教學版由機械工業齣版社於2008年齣版發行,被國內許多高校采用作為本科生數據庫課程的教材或主要教學參考書。
現在我們又基於《數據庫係統概念》第6版進行瞭改編工作,希望它能夠成為一本效果更好、更實用的本科生數據庫課程的教材。
……
數據庫係統的基石,理論與實踐的深度融閤 在信息爆炸的時代,數據已成為驅動社會進步和商業發展的核心引擎。從海量社交媒體的動態更新,到金融交易的毫秒級處理,再到科研領域浩瀚的實驗數據,無不依賴於強大而高效的數據庫係統來管理、組織和訪問。理解數據庫係統的內在原理,掌握其設計與實現的精髓,對於每一個 aspiring 的計算機科學傢、軟件工程師,乃至任何希望在數據驅動的世界中取得成功的專業人士而言,都至關重要。 這套“經典原版書庫:數據庫係統概念(英文精編版·第6版)”正是這樣一本不可或缺的著作。它並非簡單羅列數據庫軟件的使用方法,而是深入剖析數據庫係統的理論根基,循序漸進地引導讀者構建起對整個領域全麵而深刻的認知。本書以其嚴謹的邏輯、詳實的論證和貼近實際的案例,為讀者搭建起一座通往數據庫世界深度探索的橋梁。 數據模型:構建信息世界的骨架 本書開篇便為讀者勾勒齣數據庫係統的基本框架,其中數據模型是核心的組成部分。不同於傳統文件係統雜亂無章的數據組織方式,數據庫係統依賴於結構化的數據模型來清晰地定義數據的組織形式、關係以及約束。本書將詳細介紹幾種最重要的數據模型,包括: 關係模型(Relational Model): 作為現代數據庫係統的基石,關係模型以其數學上的嚴謹性和高度的邏輯性,成為瞭當前最主流的數據模型。本書將深入講解關係的數學定義,以及如何使用元組(tuples)和屬性(attributes)來錶示數據。重點在於對關係代數(Relational Algebra)和關係演算(Relational Calculus)的細緻闡述,這兩種形式化語言是理解和設計關係數據庫查詢操作的理論基礎。讀者將學習到如何使用集閤論的語言來描述數據之間的關係,並掌握諸如選擇(select)、投影(project)、連接(join)、交集(intersection)、並集(union)、差集(difference)等基本操作。這些操作不僅是數據庫查詢語言(如SQL)的底層邏輯,也是進行復雜數據分析和處理的根本。 實體-關係模型(Entity-Relationship Model, ER Model): 在概念設計階段,ER模型提供瞭一種直觀、易於理解的方式來描繪現實世界中的實體(entities)及其之間的關係(relationships)。本書將詳細介紹如何識彆實體、屬性,以及不同類型的關係,如一對一(one-to-one)、一對多(one-to-many)和多對多(many-to-many)。通過ER圖(ER Diagram),讀者能夠清晰地可視化數據的結構,並為後續的關係模式設計奠定堅實基礎。 麵嚮對象數據模型(Object-Oriented Data Model): 隨著麵嚮對象編程範式的興起,麵嚮對象數據模型也應運而生。本書將介紹其核心概念,如對象標識(object identity)、封裝(encapsulation)、繼承(inheritance)和多態性(polymorphism),以及如何在數據庫中錶示和管理這些麵嚮對象特性。雖然關係模型在很多場景下仍是主流,但理解麵嚮對象模型有助於應對更復雜的應用需求。 半結構化數據模型(Semi-structured Data Model): 在互聯網時代,XML、JSON等半結構化數據格式日益普及。本書也將觸及這一領域,介紹如何錶示和查詢那些沒有嚴格預定義模式(schema)的數據。這對於處理來自不同源頭、格式多樣的異構數據至關重要。 數據庫設計:從概念到實現的藝術 清晰的數據模型是數據庫設計的第一步,而真正的挑戰在於如何將其轉化為高效、可靠的實際數據庫結構。本書將帶領讀者係統地學習數據庫設計的全過程: 概念設計(Conceptual Design): 利用ER模型等工具,將現實世界的業務需求轉化為抽象的數據模型。這一階段強調的是對業務邏輯的理解和數據需求的準確把握。 邏輯設計(Logical Design): 將概念模型映射到特定的數據模型,例如將ER圖轉換為關係模式。本書將詳細講解模式分解(schema decomposition)的原則,包括函數依賴(functional dependencies)和無損連接分解(lossless-join decomposition)等概念。通過範式(normal forms),如第一範式(1NF)、第二範式(2NF)、第三範式(3NF)和巴斯-科德範式(BCNF),讀者將學會如何設計齣避免數據冗餘和更新異常(update anomalies)的良好關係模式。 物理設計(Physical Design): 這一階段關注的是數據庫在物理存儲介質上的組織方式,包括選擇閤適的數據結構(如B+樹、哈希索引)、存儲空間分配以及訪問路徑的設計。本書將深入討論索引(indexes)的重要性,以及不同類型的索引如何影響查詢性能。 SQL:與數據庫交互的標準語言 結構化查詢語言(SQL)是操作關係數據庫的標準語言,其重要性不言而喻。本書將提供對SQL的全麵而深入的講解: 數據定義語言(DDL): 學習如何使用CREATE、ALTER、DROP等語句來定義數據庫的結構,包括創建錶、定義屬性及其約束(如主鍵、外鍵、唯一約束、檢查約束)。 數據操縱語言(DML): 掌握INSERT、UPDATE、DELETE等語句來修改數據庫中的數據。 數據查詢語言(DQL): 這是SQL的核心,本書將詳細講解SELECT語句的強大功能,包括條件過濾(WHERE子句)、結果排序(ORDER BY子句)、分組統計(GROUP BY子句和聚閤函數)、連接多個錶(JOIN操作)以及子查詢(subqueries)。讀者將學會編寫復雜而高效的SQL查詢,以獲取所需的數據。 數據控製語言(DCL)與事務控製語言(TCL): 簡要介紹GRANT、REVOKE等用於權限管理的語句,以及COMMIT、ROLLBACK等用於事務管理的語句,為後續的並發控製和故障恢復打下基礎。 數據庫的內部機製:性能與可靠性的保障 除瞭數據模型和查詢語言,理解數據庫係統是如何工作的內部機製,對於優化性能和保證數據可靠性至關重要。本書將深入探討以下關鍵領域: 存儲管理(Storage Management): 數據庫係統如何將數據存儲在磁盤上?本書將介紹頁(pages)、記錄(records)、文件(files)等基本概念,以及如何進行數據的讀寫操作。 查詢處理與優化(Query Processing and Optimization): 當用戶提交一個SQL查詢時,數據庫係統是如何解析、轉換並最終執行的?本書將詳細講解查詢的各個階段,包括語法分析(parsing)、代數化(algebraization)、邏輯優化(logical optimization)和物理優化(physical optimization)。重點在於理解各種查詢計劃(query plans)的生成過程,以及成本模型(cost model)如何指導優化器選擇最優的執行策略。 事務管理(Transaction Management): 事務是數據庫操作的基本單位,其原子性(Atomicity)、一緻性(Consistency)、隔離性(Isolation)和持久性(Durability),即ACID特性,是保證數據正確性的基石。本書將深入講解事務的概念,以及如何通過並發控製(concurrency control)和故障恢復(recovery)機製來保證ACID特性。 並發控製(Concurrency Control): 在多用戶訪問數據庫的環境中,如何避免並發事務之間的衝突?本書將介紹多種並發控製技術,如鎖(locking mechanisms,包括共享鎖和排他鎖)、時間戳排序(timestamp ordering)和多版本並發控製(Multiversion Concurrency Control, MVCC)。 故障恢復(Recovery): 當係統發生故障(如硬件故障、軟件崩潰)時,如何將數據庫恢復到一緻的狀態?本書將講解日誌(logs,包括迴寫日誌write-ahead logging)和檢查點(checkpoints)等技術,以保證數據的持久性。 高級主題與新興趨勢 本書的廣度和深度還體現在其對數據庫係統更高級主題的涵蓋: 數據倉庫與聯機分析處理(Data Warehousing and OLAP): 隨著數據分析需求的增長,數據倉庫和OLAP技術變得越來越重要。本書將介紹維度模型(dimensional modeling)、事實錶(fact tables)和維度錶(dimension tables)等概念,以及如何支持復雜的分析查詢。 分布式數據庫係統(Distributed Database Systems): 在大規模應用中,數據往往分布在多個節點上。本書將介紹分布式數據庫的架構、數據分布策略(如復製和分片)以及分布式事務的處理。 NoSQL數據庫(NoSQL Databases): 隨著大數據時代的到來,一些傳統的SQL數據庫在處理海量、多樣化、高速增長的數據時麵臨挑戰。本書將介紹NoSQL數據庫的興起,以及鍵值存儲(key-value stores)、文檔數據庫(document databases)、列族存儲(column-family stores)和圖數據庫(graph databases)等不同類型的NoSQL係統,並討論其適用場景。 數據挖掘與大數據(Data Mining and Big Data): 數據庫技術與數據挖掘、大數據分析緊密結閤。本書將觸及如何從大量數據中發現有價值的模式和知識。 為何選擇此書? “經典原版書庫:數據庫係統概念(英文精編版·第6版)”以其無與倫比的權威性和係統性,為讀者提供瞭理解數據庫係統最紮實的理論基礎。它並非停留在錶麵的操作技巧,而是引導讀者深入理解數據存儲、查詢執行、事務管理等底層原理。本書的英文原版精編,保證瞭內容的準確性和學術的嚴謹性,是學習數據庫係統理論知識的理想選擇。無論是作為大學課程的教材,還是作為從業人員的案頭必備,本書都將成為您在數據世界中探索和創新的堅實後盾。