本书是数据库系统方面的经典教材之一。国际上许多著名大学包括斯坦福大学、耶鲁大学、得克萨斯大学、康奈尔大学、伊利诺伊大学、印度理工学院等都采用本书作为教科书。我国也有许多所大学采用本书以前版本的中文版作为本科生和研究生的数据库课程的教材和主要教学参考书,收到了良好的效果。
《数据库系统概念》是数据库系统方面的经典教材之一,其内容由浅入深,既包含数据库系统基本概念,又反映数据库技术新进展。它被国际上许多著名大学所采用,包括斯坦福大学、耶鲁大学、得克萨斯大学、康奈尔大学、伊利诺伊大学等。我国也有多所大学采用本书作为本科生和研究生数据库课程的教材和主要教学参考书,收到了良好的效果。本书基于该书第6版进行改编,保留其中的基本内容,压缩或删除了一些高级内容,更加适合作为国内高校计算机及相关专业本科生数据库课程教材。
作者简介
Abraham Silberchatz 于纽约州立大学石溪分校获得博士学位,现为耶鲁大学计算机科学Sidney J. Weinberg教授,计算机科学系主任,曾任贝尔实验室信息科学研究中心副主任。
Henry F. Korth 于普林斯顿大学获得博士学位,现为利哈伊大学计算机科学与工程系Weiseman教授,曾任贝尔实验室数据库原理研究中心主任。他是ACM Fellow 和 IEEE Fellow,是VLDB 10年贡献奖的获得者。
S. Sudarshan 于威斯康星大学麦迪逊分校获得博士学位,现为印度理工学院计算机科学与工程系教授,曾为贝尔实验室数据库研究组技术人员。
Database management has evolved from a specialized computer application to a central component of a modern computing environment, and, as a result, knowledge about database systems has become an essential part of an education in computer science.
This book is adapted from the sixth edition of Database System Concepts, for a first course in databases at the junior or senior undergraduate level. In this text, we present the fundamental concepts of database management. These concepts include aspects of database design, database languages, and database-system implementation. In addition to basic material for a first course, the text contains advanced material that can be used for course supplements, or as introductory material for an advanced course.
We assume only a familiarity with basic data structures, computer organization, and a high-level programming language such as Java, C, or Pascal. We present concepts as intuitive descriptions, many of which are based on our running example of a university. Important theoretical results are covered, but formal proofs are omitted. In place of proofs, figures and examples are used to suggest why a result is true. Formal descriptions and proofs of theoretical results may be found in research papers and advanced texts that are referenced in the bibliographical notes.
The fundamental concepts and algorithms covered in the book are often based on those used in existing commercial or experimental database systems. Our aim is to present these concepts and algorithms in a general setting that is not tied to one particular database system.
In this adapted text of the sixth edition of Database System Concepts, we have retained essential contents of Database System Concepts, condensed or deleted some of the advanced materials. The purpose is to make this book more suitable for a first course in databases at the undergraduate level. Now we describe organization of this book in brief.
The text is organized in five major parts.
Overview (Chapter 1). Chapter 1 provides a general overview of the nature and purpose of database systems. We explain how the concept of a database system has developed, what the common features of database systems are, what a database system does for the user, and how a database system interfaces with operating systems. We also introduce an example database application: a university organization consisting of multiple departments, instructors, students, and courses. This application is used as a running example throughout the book. This chapter is motivational, historical, and explanatory in nature.
Part 1: Relational Databases (Chapters 2 through 6). Chapter 2 introduces the relational model of data, covering basic concepts such as the structure of relational databases, database schemas, keys, schema diagrams, relational query languages, and relational operations. Chapters 3, 4, and 5 focus on the most influential of the user-oriented relational languages: SQL. Chapter 6 covers the formal relational query languages: relational algebra, tuple relational calculus, and domain relational calculus.
The chapters in this part describe data manipulation: queries, updates, insertions, and deletions, assuming a schema design has been provided. Schema design issues are deferred to Part 2.
Part 2: Database Design (Chapters 7 through 9). Chapter 7 provides an overview of the database-design process, with major emphasis on database design using the entity-relationship data model. The entity-relationship data model provides a high-level view of the issues in database design, and of the problems that we encounter in capturing the semantics of realistic applications within the constraints of a data model. UML class-diagram notation is also covered in this chapter.
Chapter 8 introduces the theory of relational database design. The theory of functional dependencies and normalization is covered, with emphasis on the motivation and intuitive understanding of each normal form. This chapter begins with an overview of relational design and relies on an intuitive understanding of logical implication of functional dependencies. This allows the concept of normalization to be introduced prior to full coverage of functional-dependency theory, which is presented later in the chapter. Instructors may choose to use only this initial coverage in Sections 8.1 through 8.3 without loss of continuity. Instructors covering the entire chapter will benefit from students having a good understanding of normalization concepts to motivate some of the challenging concepts of functional-dependency theory.
Chapter 9 covers application design and development. This chapter emphasizes the construction of database applications with Web-based interfaces. In addition, the chapter covers application security.
Part 3: Data Storage, Querying and Transaction Management (Chapters 10 through 12). Chapter 10 introduces physical storage devices briefly; describes how to map records to files, and then to bits on disks; and describes several types of indices used in database systems. Chapter 11 describes how queries are processed, presents algorithms for implementing individual operations, and then describes the process of query optimization. Chapter 12 describes the fundamentals of a transaction-processing system, including atomicity, consistency, isolation, and durability; describes several concurrency-control techniques that help implement the isolation property; and describes the recovery management component of a database, which implements the atomicity and durability properties.
Part 4: Advanced Topics (Chapters 13 through 16). Chapter 13 introduces the concepts and methodology of data warehousing and data mining. Chapter 14 covers object based databases, describes the object-relational data model, and this chapter also describes database access from object-oriented programming languages. Chapter 15 covers the XML standard for data representation, which is seeing increasing use in the exchange and storage of complex data, this chapter also describes query languages for XML. Chapter 16 covers advanced issues in application development, including performance tuning, performance benchmarks, database-application testing, and standardization.
We keeps the same as the sixth edition of Database System Concepts, the exercises are divided into two sets: practice exercises and exercises. The solutions for the practice exercises are publicly available on the Web site of the book. Students are encouraged to solve the practice exercises on their own, and later use the solutions on the Web site to check their own solutions. Solutions to the other exercises are available only to instructors (see “Instructor抯 Note” below, for information on how to get the solutions).
Instructor抯 Note
The book contains both basic and advanced material, which might not be covered in a single semester.
The first 12 chapters are basic materials. For an introductory course, the instructor can choose to teach materials in Chapter 1 to Chapters 12, and introduce some materials in Chapter 13 to Chapter 16.
Web Site and Teaching Supplements
A Web site for the book is available at the URL: http://www.db-book.com. The Web site contains:
Slides covering all the chapters of the book.
Answers to the practice exercises.
The five appendices.
An up-to-date errata list.
Laboratory material, including SQL DDL and sample data for the university schema and other relations used in exercises, and instructions for setting up and using various database systems and tools.
The following additional material is available only to faculty:
An instructor manual containing solutions to all exercises in the book.
A question bank containing extra exercises.
For more information about how to get a copy of the instructor manual and the question bank, please send electronic mail to customer.service@mcgraw-hill.com. In the United States, you may call 800-338-3987. The McGraw-Hill Web site for this book is http://www.mhhe.com/silberschatz.
计算机\数据库
数据库领域的殿堂级作品
夯实数据库理论基础,增强数据库技术内功的必备之选
对深入理解数据库,深入研究数据库,深入操作数据库都具有极强的指导作用!
《数据库系统概念》是数据库系统方面的经典教材之一,其内容由浅入深,既包含数据库系统基本概念,又反映数据库技术新进展。它被国际上许多著名大学所采用,包括斯坦福大学、耶鲁大学、得克萨斯大学、康奈尔大学、伊利诺伊大学等。我国也有多所大学采用本书作为本科生和研究生数据库课程的教材和主要教学参考书,收到了良好的效果。本书基于该书第6版进行改编,保留其中的基本内容,压缩或删除了一些高级内容,更加适合作为国内高校计算机及相关专业本科生数据库课程教材。
本书特点:
●内容简练。保留了原书最基本的内容,讲述数据库系统的基本概念;对数据库系统实现技术以及数据管理与应用的高级主题,进行了有选择性的介绍。
●直观易懂。采用直观的方式描述概念,以结构清晰的图示和示例代替形式化的证明。
●实用性强。以大学数据库实例生动地解释重要概念,通俗易懂。
●内容新颖。反映了数据库在设计、管理和使用方式等方面的变化及数据库概念方面的发展趋势。
(美)Abraham Silberschatz 耶鲁大学 (美)Henry F. Korth利哈伊大学 (印)S. Sudarshan印度理工学院 著:Abraham Silberchatz 于纽约州立大学石溪分校获得博士学位,现为耶鲁大学计算机科学Sidney J. Weinberg教授,计算机科学系主任,曾任贝尔实验室信息科学研究中心副主任。他是ACM Fellow 和 IEEE Fellow,曾获得IEEE Taylor L.Booth 教育奖、 ACM Karl V.Karlstrom 杰出教育者奖、ACM SIGMOD 贡献奖和IEEE 计算机学会杰出论文奖。他的研究兴趣包括操作系统、数据库系统、存储系统、网络管理和分布式系统。 Henry F. Korth 于普林斯顿大学获得博士学位,现为利哈伊大学计算机科学与工程系Weiseman教授,曾任贝尔实验室数据库原理研究中心主任。他是ACM Fellow 和 IEEE Fellow,是VLDB 10年贡献奖的获得者。他的研究兴趣包括为现代计算架构(多核、多线程、多级缓存)设计的数据库算法、基于Web的大型数据仓储、实时数据库系统和并行系统。 S. Sudarshan 于威斯康星大学麦迪逊分校获得博士学位,现为印度理工学院计算机科学与工程系教授,曾为贝尔实验室数据库研究组技术人员。他的研究兴趣包括查询处理和优化、关系数据和图结构数据的关键字查询,以及构建和测试数据库应用系统的工具。
杨冬青 北京大学 改编:暂无简介
改 编 者 序
数据库系统是对数据进行存储、管理、处理和维护的软件系统,是现代计算环境中的一个核心成分。随着计算机硬件、软件技术的飞速发展和计算机系统在各行各业的广泛应用,数据库技术的发展尤其迅速,引人注目。有关数据库系统的理论和技术是计算机科学技术教育中必不可少的部分。《数据库系统概念》是一本经典的、备受赞扬的数据库系统教科书,其内容由浅入深,既包含数据库系统的基本概念,又反映数据库技术新进展。本书被国际上许多著名大学采用,并多次再版。
我们先后将本书的第3版、第4版、第5版和第6版译成中文,由机械工业出版社分别于2000年、2003年、2006年和2012年出版发行。国内许多大学采用《数据库系统概念》作为本科生和研究生数据库课程的教材或主要教学参考书,收到了良好的效果。
我们基于《数据库系统概念》第5版进行了改编,保留其中的基本内容,压缩或删除了一些高级内容,形成了该书的本科教学版,其目的是使它更适合本科生的数据库课程使用。该本科教学版由机械工业出版社于2008年出版发行,被国内许多高校采用作为本科生数据库课程的教材或主要教学参考书。
现在我们又基于《数据库系统概念》第6版进行了改编工作,希望它能够成为一本效果更好、更实用的本科生数据库课程的教材。
本书的前9章是最基本的内容,讲述数据库系统的基本概念,包括对数据库系统的性质和目标的综述,对关系数据模型和关系语言的介绍,对数据库设计过程、关系数据库理论以及数据库应用设计和开发的详细讨论。第10至12章介绍了数据库系统实现的核心技术,包括数据存储管理、查询处理和事务管理。第13至16章是高级话题,介绍了数据仓库和数据挖掘,新型的数据库系统—基于对象的数据库和XML数据库,以及与高级应用开发相关的性能调整、性能基准程序、标准化等内容。
本书可作为大学本科数据库概论课程的教材或主要参考资料,教师可以选择重点讲授前12章,并介绍第13至16章中的部分内容。
限于改编者水平,改编中疏漏和错误在所难免,欢迎批评指正。
杨冬青
2012年10月于北京大学
Chapter 1 Introduction
1.1 Database-System Applications 1
1.2 Purpose of Database Systems 3
1.3 View of Data 6
1.4 Database Languages 9
1.5 Relational Databases 12
1.6 Database Design 15
1.7 Data Storage and Querying 20
1.8 Transaction Management 22
1.9 Database Architecture 23
1.10 Data Mining and Information Retrieval 27
1.11 Specialty Databases 28
1.12 Database Users and Administrators 29
1.13 History of Database Systems 31
1.14 Summary 33
Review Terms 35
Practice Exercises 35
Exercises 36
Tools 36
Bibliographical Notes 36
PART ONE RELATIONAL DATABASES
Chapter 2 Introduction to the Relational Model
2.1 Structure of Relational Databases 41
2.2 Database Schema 44
2.3 Keys 47
2.4 Schema Diagrams 48
2.5 Relational Query Languages 49
2.6 Relational Operations 50
2.7 Summary 54
Review Terms 54
Practice Exercises 55
Exercises 56
Bibliographical Notes 57
Chapter 3 Introduction to SQL
3.1 Overview of the SQL Query Language 59
3.2 SQL Data Definition 60
3.3 Basic Structure of SQL Queries 65
3.4 Additional Basic Operations 76
3.5 Set Operations 81
3.6 Null Values 85
3.7 Aggregate Functions 86
3.8 Nested Subqueries 92
3.9 Modification of the Database 100
3.10 Summary 106
Review Terms 106
Practice Exercises 107
Exercises 110
Tools 113
Bibliographical Notes 114
Chapter 4 Intermediate SQL
4.1 Join Expressions 115
4.2 Views 122
4.3 Transactions 129
4.4 Integrity Constraints 130
4.5 SQL Data Types and Schemas 138
4.6 Authorization 145
4.7 Summary 152
Review Terms 153
Practice Exercises 154
Exercises 157
Bibliographical Notes 158
Chapter 5 Advanced SQL
5.1 Accessing SQL From a Programming Language 159
5.2 Functions and Procedures 175
5.3 Triggers 182
5.4 Recursive Queries** 189
5.5 Advanced Aggregation Features** 194
5.6 OLAP** 199
5.7 Summary 211
Review Terms 212
Practice Exercises 213
Exercises 214
Tools 218
Bibliographical Notes 218
Chapter 6 Formal Relational Query Languages
6.1 The Relational Algebra 219
6.2 The Tuple Relational Calculus 241
6.3 The Domain Relational Calculus 247
6.4 Summary 250
Review Terms 251
Practice Exercises 251
Exercises 254
Bibliographical Notes 256
PART TWO DATABASE DESIGN
Chapter 7 Database Design and the E-R Model
7.1 Overview of the Design Process 259
7.2 The Entity-Relationship Model 262
7.3 Constraints 269
7.4 Removing Redundant Attributes in Entity Sets 272
7.5 Entity-Relationship Diagrams 274
7.6 Reduction to Relational Schemas 283
7.7 Entity-Relationship Design Issues 290
7.8 Extended E-R Features 295
7.9 Alternative Notations for Modeling Data 304
7.10 Other Aspects of Database Design 310
7.11 Summary 313
Review Terms 315
Practice Exercises 315
Exercises 319
Tools 321
Bibliographical Notes 321
Chapter 8 Relational Database Design
8.1 Features of Good Relational Designs 323
8.2 Atomic Domains and First Normal Form 327
8.3 Decomposition Using Functional Dependencies 329
8.4 Functional-Dependency Theory 338
8.5 Algorithms for Decomposition 348
8.6 Decomposition Using Multivalued Dependencies 355
8.7 More Normal Forms 360
8.8 Database-Design Process 361
8.9 Modeling Temporal Data 364
8.10 Summary 367
Review Terms 368
Practice Exercises 368
Exercises 372
Bibliographical Notes 374
Contents xiii
Chapter 9 Application Design and Development
9.1 Application Programs and User Interfaces 375
9.2 Web Fundamentals 377
9.3 Servlets and JSP 383
9.4 Application Architectures 391
9.5 Rapid Application Development 396
9.6 Application Performance 400
9.7 Application Security 402
9.8 Encryption and Its Applications 411
9.9 Summary 417
Review Terms 418
Practice Exercises 419
Exercises 421
Project Suggestions 422
Tools 426
Bibliographical Notes 426
PART THREE DATA STORAGE , QUERYING, AND TRANSACTION MANAGEMENT
Chapter 10
Data Storage and Data Access
10.1 Overview of Physical Storage Media 429
10.2 Magnetic Disk and Flash Storage 432
10.3 Organization of Files and Records 440
10.4 Data-Dictionary Storage 445
10.5 Database Buffer 448
10.6 Basic Concepts of Index 451
10.7 Ordered Indices 452
10.8 B+ -Tree Index Files 460
10.9 Hash File Organization and Hash Index 474
10.10 Index Definition in SQL 482
10.11 Summary 483
Review Terms 486
Practice Exercises 487
Exercises 488
Bibliographical Notes 489
Chapter 11 Query Processing and Query Optimization
11.1 Overview 491
11.2 Measures of Query Cost 493
11.3 Implementation of Relational Algebra Operation 495
11.4 Evaluation of Expressions 509
11.5 Query Optimization 512
11.6 Summary 533
Review Terms 535
Practice Exercises 536
Exercises 537
Bibliographical Notes 538
Chapter 12 Transaction Management
12.1 Transaction Concept 541
12.2 Transaction Atomicity and Durability 545
12.3 Transaction Isolation 548
12.4 Serializability 554
12.5 Recoverability 557
12.6 Concurrency Control 559
12.7 Recovery System 573
12.8 Summary 584
Review Terms 587
Practice Exercises 589
Exercises 590
Bibliographical Notes 592
PART FOUR ADVANCED TOPICS
Chapter 13 Data Warehousing and Mining
13.1 Decision-Support Systems 597
13.2 Data Warehousing 599
13.3 Data Mining 603
13.4 Summary 610
Review Terms 611
Practice Exercises 612
Exercises 612
Tools 613
Bibliographical Notes 613
Chapter 14 Object-Based Databases
14.1 Overview 615
14.2 Complex Data Types 616
14.3 Structured Types and Inheritance in SQL 619
14.4 Table Inheritance 624
14.5 Array and Multiset Types in SQL 626
14.6 Object-Identity and Reference Types in SQL 631
14.7 Implementing O-R Features 633
14.8 Persistent Programming Languages 634
14.9 Object-Relational Mapping 643
14.10 Object-Oriented versus Object-Relational 643
14.11 Summary 645
Review Terms 645
Practice Exercises 646
Exercises 648
Tools 650
Bibliographical Notes 650
Chapter 15 XML
15.1 Motivation 651
15.2 Structure of XML Data 656
15.3 XML Document Schema 660
15.4 Querying and Transformation 668
15.5 Application Program Interfaces to XML 678
15.6 Storage of XML Data 679
15.7 XML Applications 686
15.8 Summary 689
Review Terms 690
Practice Exercises 691
Exercises 693
Tools 694
Bibliographical Notes 694
Chapter 16 Advanced Application Development
16.1 Performance Tuning 697
16.2 Performance Benchmarks 713
16.3 Other Issues in Application Development 716
16.4 Standardization 719
16.5 Summary 724
Review Terms 725
Practice Exercises 725
Exercises 726
Bibliographical Notes 727
Bibliography 729