Algorithm 版 (精华区)

发信人: Lerry (life is waiting...), 信区: Algorithm
标  题: 数据库——原理、编程与性能(第二版 影印版 )
发信站: 哈工大紫丁香 (2002年11月09日15:18:25 星期六), 站内信件

数据库——原理、编程与性能(第二版 影印版 )ISBN 7-04-010040-1/TP.692 P895
  Database: Principles, Programming, and Performance (Second Edition)
  Patrick O’Neil, Elizabeth O’Neil,2001.4出版,定价:49.50元
本书自1994年初版以来,已成为任何学习、设计及使用关系数据库人员的一本标准教材
。它从理论和实践两方面对数据库设计和编程均做了严谨的表述。其内容包括关系理论
、数据库设计、数据库编程及运行—转储结果。每一部分均从基本原理出发,再用实际
系统中的实例来说明。
本次修订版反映了6年来数据库领域总体的进步和发展动态,书中重点讲述了对象关系模
型;介绍了一些系统(如Oracle、DB2和Informix等)中通用的新概念;对隔离技术作了
更新介绍;对运行结果的表述更现代。相对于初始标准来说,SQL数据库语言有了非常重
要的变化,所以对对象关系给予特别讲述。本书还介绍了SQL-99设计方法及与之相关的
原理方法及主要产品。本书的作者是在数据库界工作30多年的资深专家,富于教学和实
践经验。本书力图在数据库领域各不相同的思想和趋势中找到一个统一的观点提供给读
者。
  本书对于初接触数据库系统的读者不啻为一本极好的教材;对于那些对数据库领域
的发展还未给予足够关注的人是一本易于接受的参考书;同时也是设计人员和编程人员
及时更新知识的有用的参考书。
  内容 : 1. 简介 2. 关系模型 3. 基本SQL查询语言 4. 对象关系SQL 5. 数据库编
程访问 6. 数据库设计 7. 完整性、视图、安全性和目录 8. 索引 9. 查询处理 10. 事
务更新 11. 并行与分布式数据库 附录A 介绍性指南 附录B 编程细节 附录C SQL语句语
言 附录 D 设置查询计数
Foreword
by Jim Gray, Microsoft Research
Series Editor, Morgan Kaufmann Series in Data Management Systems
  Since its first appearance in 1994, the O'Neil database book has become 
a standard text and reference for anyone learning, designing, or managing re
lational database applications. The book carefully presents both the theory 
and practice of database design and implementation. It covers relational the
ory, database design, database implementation, and performance-tuning issues
. In all cases it starts with the general concept and then translates the id
eas into specific examples demonstrated by real systems.
  This revised edition reflects the substantial progress and ferment in th
e database field in the six years since the first edition. It places major e
mphasis on the object-relational model; it presents many new concepts now co
mmon in systems like Oracle, DB2, and Informix; it updates the presentation 
of isolation techniques; and it modernizes the presentation of performance i
ssues. The object-relational presentation is especially noteworthy: this is 
widely considered the most important change to the SQL database language sin
ce the original standard. The book presents the SOL-99 design and relates th
at design to the principle ideas and to the major commercial products.
  Professors Pat and Elizabeth O'Neil have an unusually broad and deep vie
w of the database design issues and have been active contributors to the dat
abase field for three decades. They have taught generations of students, the
y have written many of the seminal research papers in the field, they have w
orked on the development of several products, and they have consulted with m
ost of the vendors. They continue to innovate to this day—this book is an a
ttempt to provide a unified view of the many disparate ideas and trends in t
he database area. The revision gives a modern view of the scene.
  Database:Principles, Programming, and Performancemakes an excellent text
 for anyone just approaching database systems. It is an accessible refresher
 for those of us who have not been paying careful attention to developments 
in this area and is a useful reference for designers and implementors who ne
ed just-in-time education.
Contents:
Foreword
Preface
Chapter 1 Introduction
1.1 Fundamental Database Concepts
  History of Database Systems
  The Relational and Object-Relational Models
  The Database Systems Covered
  A Relational Database Example
  An Object-Relational Database Example
1.2 Database Users
1.3 Overview of Relational and Object-Relational DBMS
  Chapter 2: The Relational Model
  Chapter 3: Basic SQL Query Language
  Chapter 4: The Object-Relational Model
  Chapter 5: Programs to Access a Database
  Chapter 6: Database Design
  Chapter 7: Integrity, Views, Security, and Catalogs
  Chapter 8: Indexing
  Chapter 9: Query Processing
  Chapter 10: Update Transactions
  Chapter 11: Parallel and Distributed Databases
1.4 Putting It All Together
Chapter 2 The Relational Model
2.1 The CAP Database
2.2 Naming the Parts of a Database
  Domains and Datatypes
  Tables and Relations
2.3 Relational Rules
2.4 Keys, Superkeys, and Null Values
  Null Values
2.5 Relational algebra
  Fundamental Operations of Relational Algebra
2.6 Set-Theoretic Operations
  The Union, Intersection, and Difference Operations
  Assignment and Alias
  The Product Operation
2.7 Native Relational Operations
  The Projection Operation
  The Selection Operation
  Precedence of Relational Operations
  The Join Operation
  The Division Operation
2.8 The Interdependence of Operations
2.9 Illustrative Examples
2.10 Other Relational Operations
  Outer Join
  Theta Join
Chapter 3 Basic SQL Query Language
3.1 Introduction
  SQL Capabilities
  SQL History-Standards and Dialects
3.2 Setting Up the Database
  Standard Typographical Conventions
  A Practical Exercise
3.3 Simple Select Statements
3.4 Subqueries
  The IN Predicate
  The Quantified Comparison Predicate
  The EXISTS Predicate
  A Weakness of SQL: Too Many Equivalent Forms
3.5 UNION Operators and FOR ALL Conditions
  The UNION Operator
  Division: SQL "FOR ALL..." Conditions
3.6 Some Advanced SQL Syntax
  The INTERSECT and EXCEPT Operators in Advanced SQL
  Join Forms in Advanced SQL
  OUTER JOIN
  Join Forms Implemented in Database Systems
3.7 Set Functions in SQL Handling Null Values
3.8 Groups of Rows in SQL
3.9 A Complete Dexcription of SQL Select
  Identifiers
  Expressions, Predicates, and the search_condition
  Scalar Subqueries as Expressions:Advanced SQL
  Basic SQL versus Advanced SQL: Summary
  A Discussion of the Predicates
3.10 Insert, Update, and Delete Statements
  The Insert Statement
  The Update Statement
  The Delete Statement
3.11 The Power of the Select Statement
  The Non-Procedural Select Statement
  Turing Power
  Limited Power of the Basic SQL Select Statement
Chapter 4 Object-Relational SQL
4.1 Introduction
  ORSQL Capabilities
  Form of Presentation for This Chapter
  Object-Relational History
4.2 Objects and Tables
  4.2.1 Object Types in ORACLE
    Definition of the REF Object Reference
  4.2.2 INFORMIX Row Types for Objects
    Absence of Refs in INFORMIX
    Type Inheritance in INFORMIX
  4.2.3 Objects and Tables: Summary
    Object Orientation
4.3 Collection Types
  4.3.1 Collection Types in ORACLE
    Table Types and Nested Tables
    Two Techniques for Retrieving from a Table of Tables
    Unnesting via Table Products
    Nested Cursors
    Array Types for VARRAYs
    SQL SYntax for Collections in ORACLE
    Inserts and Updates in ORACLE
  4.3.2 Collection Types in INFORMIX
    Sets in INFORMIX
    Lists in INFORMIX
    SQL Syntax for Collections in INFORMIX
    inserts and Updates in INFORMIX
  4.3.3 Collection Types:Summary
4.4 Procedural SQL, User-Defined Functions (UDFs), and Methods
  4.4.1 ORACLE PL/SQL Procedures, UDFs, and Methods
    PL/SQL: ORACLE's Procedural SQL Language
    Using PL/LQL to Implement Methods in ORACLE
    Update Methods
  4.4.2 INFORMIX User-Defined Functions
    SPL:INFORMIX's Procedural SQL Language
    Using SPL to Implement UDFs in INFORMIX
    Update Functions
  4.4.3 User-Defined Functions:Summary
4.5 External Functions and Packaged User-Defined Types(UDTs)
  Binary Data and BLOBs
  External Functions
  Encapsulation
  Distinct Types
  BLOB Objects
  Packaged UDTs and Other Encapsulated UDTs
  Summary
Chapter 5 Programs to Access a Database
5.1 Introduction to Embedded SQL in C
  A Simple Program Using Embedded SQL
  Selecting Multiple Rows with a Cursor
5.2 Condition Handling
  Whenever Statement:Scope and Flow of Control
  Explicit Error Checking
  Handling Errors:Getting Error Messages from the Database
  Indicator Variables
5.3 Some Common Embedded SQL Statements
  The Select Statement
  The Declare Cursor Statement
  The Delete
  Statement
  The Update Statement
  The Insert Statement
  Cursor Open, Fetch, and Close
  Other Embedded SQL Operations
5.4 Programming for Transactions
  The Concept of a Transaction
  How Transactions Are Specified in Programs
  A Transaction Example
  The Transaction Isolation Guarantee and Locking
  Special Considerations in Transactions
5.5 The Power of Procedural SQL Programs
  Customized Set Functions
5.6 Dynamic SQL
  Execute Immediate
  Prepare, Execute, and Using
  Dynamic Select: The Describe Statement and the SQLDA
5.7 Some Advanced Programming Concepts
  Scrollable Cursors
  Cursor Sensitivity
  Other Development Environments for Database Programming
Chapter 6 Database Design
6.1 Introduction to E-R Concepts
  Entities, Attributes, and Simple E-R Diagrams
  Transforming Entities and Attributes to Relations
  Relationships among Entities
6.2 Further Details of E-R Modeling
  Cardinality of Entity Participation in a Relationship
  One-to-One, Many-to-Many, and Many-to-One Relationships
  Transforming Binary Relationships to Relations
6.3 Additional E-R Concepts
  Cardinality of Attributes
  Weak Entities
  Generalization Hierarchies
6.4 Case Study
6.5 Normalization: Preliminaries
  A Running Example: Employee Information
  Anomalies of a Bad Database Design
6.6 Functional Dependencies
  Logical Implications among Functional Dependencies
  Armstrong's Axioms
  Closure, Cover, and Minimal Cover
6.7 Lossless Decompositions
6.8 Normal Forms
  A Succession of Decompositions to Eliminate Anomalies
  Normal Forms: BCNE 3NF, and 2NF
  An Algorithm to Achieve Well-Behaved 3NF Decomposition
  A Review of Normalization
6.9 Additional Design Considerations
  Database Design Tools
Chapter 7 Integrity, Views, Security, and Catalogs
7.1 Integrity Constraints
  Integrity Constraints in the Create Table Statement
  Primary Keys, Foreign Keys, and Referential Integrity
  Foreign Key Constraints: Product Variations
  The Alter Table Statement
  Non-Procedural and Procedural Integrity Constraints: Triggers
7.2 Creating Views
  Updatable and Read-Only Views
  The Value of Views
7.3 Security:The Grant Statement in SQL
  Variations in Database Products
7.4 System Catalogs and Schemas
  Schemas
  Catalog Variations in Database Products
  The INFORMIX System Catalog
  Catalog Tables for Object-Relational Constructs:ORACLE and INFORMIX
Chapter 8 Indexing
8.1 The Concept of Indexing
8.2 Disk Storage
  Disk Access Is Excruciatingly Slow
  The DBA and Disk Resource Allocation in ORACLE
  Data Storage Pages and Row Pointers:ORACLE and DB2 UDB
8.3 The B-Tree Index
  Dynamic Changes in the B-Tree
  Properties of the B-Tree
  Index Node Layout and Free Space
  The Create Index Statement in ORACLE and DB2 UDB
  Duplicate Key Values in an Index
  The ORACLE Bitmap Index
8.4 Clustered and Non-Clustered Indexes
  Clustering Indexes in DB2 UDB
  ORACLE Special Indexing Features
8.5 A Hash Primary Index
  Tuning HASHKEYS and SIZE in a Hash Cluster
  No Incremental Changes in the Number of Slots Used
  Advantages and Disadvantages of a hash Primary Index
8.6 Throwing Darts at Random Slots
  Unlimited Slot Occupancy:How Many Slots Are Occupied?
  Slot Occupancy of One:Number of Retries (Rehash Chain)
  When Do Hash Pages Fill Up
Chapter 9 Query Processing
9.1 Introductory Concepts
  Query Resource Utilization
  Gathering Statistics
  Retrieving the Query Plan
9.2 Tablespace Scans and I/O
  Assumptions about I/O
9.3 Simple Indexed Access in DB2
  Equal Unique Match Index Access
  Index-Only Retrieval
9.4 Filter Factors and Statistics
  DB2 Statistics
  Filter Factors in DB2
9.5 Matching Index Scans, Composite Indexes
  Definition of a Matching Index Scan
  Predicate Screening and Screening Predicates
  Indexable Predicates and Performance
9.6 Multiple Index Access
  List Prefetch and the RID Pool
  Point of Diminishing Returns in Multiple Index Access
9.7 Methods for Joining Tables
  Nested-Loop Join
  Merge Join
  Hybrid Join
  Multiple Table Joins
  Transforming Nested Queries to Joins
9.8 Disk Sorts
  The N-Way Merge Disk Sort Algorithm
9.9 Query Performance Benchmarks:A Case Study
  The BENCH Table
  Load Measurements
9.10 Query Performance Measurements
  Query Q1
  Query Q2A
  Query Q2B
  Query Q3A
  Query Q3B
  Query Q4A and Q4B
  Query Q5
  Query Q6A
  Query Q6B
9.11 Cost-Performance Assessment
  Elapsed Time versus CPU Time Rating
  Customizing the Rating
  Varations in Indexing Use between DB2 and ORACLE
Chapter 10 Update Transactions
10.1 Transactional Histories
  Fundamental Atomic Read and Write Actions in the Database
  Predicate Read Actions
  Transactional Histories with Reads and Writes
10.2 Interleaved Read-Write Operations
10.3 Serializability and the Precedence Graph
  The Precedence Graph
10.4 Locking to Ensure Serializability
  The Waits-For Graph
10.5 Levels of Isolation
  The Read Uncommitted Isolation Level
  The Read Committed Isolation Level and Cursor Stability
  Repeatable Read Isolation Level
  Serializability and Phantom Updates
10.6 Transactional Recovery
10.7 Recovery in Detail:Log Formats
  Guarantees That Needed Log Entries Are on Disk
10.8 Checkpoints
  The Commit-Consistent Checkpoint
  Motivation for Other Kinds of Checkpoints
  The Cache-Consistent Checkpoint
10.9 Media Recovery
  Stable Storage
10.10 Performance:The TPC-A Benchmark
  The TPC-A Benchmark Specification
  Lessons from the TPC-A Benchmark
Chapter 11 Parallel and Distributed Databases
11.1 Some Multi-CPU Architectures
  Client-Server Architectures
11.2 The Curve of CPU Cost versus Power
11.3 Shared-Nothing Database Architecture
  Two-Phase Commit
  Further Problems with Shared-Nothing Architecture
11.4 Query Parallelism
  Intra-Query Parallelism
  Intra-Query Parallelism
Appendix A Introductory Tutorial
A.1 setting Up the CAP Database in ORACLE
  Creating the CAP Database
  Using the SQL*Loader
  Using SQL*Plus
A.2 Setting Up the CAP Database in INFORMIX
  Creating the CAP Database (in UNIX)
  Using DB-Access (UNIX Systems)
A.3 Datatypes
Appendix B Programming Details
B.1 The prompt() Function
  Use of Numeric Constants in Code Examples
B.2 The print_dberror() Function
B.3 Building Embedded C Programs
  Precompilation and Compilation Procedure Using ORACLE/UNIX
  Precompilation and Compilation Procedure Using DB2 UDB/UNIX
Appendix C SQL Statement Syntax
C.1 Alter Table Statement
C.2 Close Cursor Statement
C.3 Commit Work Statement
C.4 Connect Statement
C.5 Crate Function Statement(UDF)
C.6 Crate Index Statement
C.7 Crate Row Type Statement(O-R)
C.8 Crate Schema Statement
C.9 Crate Table Statement
C.10 Crate Tablespace Statement in ORACLE and DB2 UDB
C.11 Crate Trigger Statement
C.12 Crate Type Statement (O-R)
C.13 Crate View Statement
C.14 Declare Cursor Statement
C.15 Delete Statement
C.16 Describe Statement
C.17 Disconnect Statement
C.18 Drop Function Statement
C.19 Drop Index Statement
C.20 Drop Trigger Statement
C.21 Drop (Row) Type Statement(O-R)
C.22 Drop {Schema|Table|View} Statement
C.23 Execute Statement
C.24 Execute Immediate Statement
C.25 Fetch Statement
C.26 Grant Statement
C.27 Insert Statement
C.28 Open Cursor Statement
C.29 Prepare Statement
C.30 Revoke Statement
C.31 Rollback Statement
C.32 Select Statement
C.33 Update Statement
Appendix D Set Query Counts
Solutions to Selected Exercises
Index
Preface
  Of making many books, there in no end; and much study is a weariness of 
the flesh,
——Christian Bible, Ecclesiastes 12:12.
  Before I came here I was confused about this subject. Having listened to
 your lecture, I am still confused, but on a higher level.
——Enrico Fermi
  The goal of this text in its first edition was to introduce the reader t
o the fundamental principles of database theory, together with an understand
ing of the connections (and gaps) between theory and commercial practice. Th
e authors believe that the high pace of change in the various commercial dat
abase system products over the last five years has made it all the more impo
rtant to provide readers with an up-to-date understanding of current databas
e practice. While a number of important changes in the database field have d
riven the development of this second edition, we have tried not to lose sigh
t of the fundamental aims of this text.
  As in the first edition, we provide an up-to-date introduction to SQL an
d to practical applications created in real commercial database systems. Whe
ther you are an Interactive SQL user, an application programmer, a database 
administrator (DBA), or a student interested in learning about the field, th
is book was written with you in mind. The combination of practical informati
on with underlying principles has been extended, providing what past readers
 have considered to be the fundamental strength of this book.
  Practitioners need an introduction to database application programming t
hat is more than the simple listing of Embedded SQL features so often seen i
n texts. Vendor manuals sometimes give an excellent introduction to SQL and 
database programming but lack the intellectual grounding in fundamental prin
ciples that students and professionals need to adapt to future changes in da
tabase systems and languages.Some principles that are not well covered in ma
ny introductory database texts or manuals are these: implication of deadlock
 aborts (the need to retry), entity-relationship modeling and normalization 
(as well as the translation of database design into actual tables), problems
 of user interaction during transactions that access popular data (interacti
on while a transaction is active is dangerous), and finally, considerations 
of indexing and query optimization in terms of how they affect query perform
ance, an important consideration for database administrators.
  This book can be thought of as a solid introduction to the skills needed
 by a database administrator, application programmer, or sophisticated SOL u
ser. Although the needs of a database administrator may be broader than thos
e of an application programmer, programmers are more effective when they hav
e a grasp of the general concepts that a DBA finds essential. The same can b
e said for serious Interactive SQL users. In addition to a firm grounding in
 SQL, an understanding of logical database design, physical layout of data, 
indexing, security, and cost-performance will benefit anyone working with a 
database system.
  The authors are professors of computer science, with extensive experienc
e consulting with database companies and database-intensive applications. Se
e our home pages, www.cs.umb.edu/~poneil and ~eoneil.
Use of This Book
  This book was developed over a period of several years for an introducto
ry database course and a subsequent, more advanced course offered at the Uni
versity of Massachusetts at Boston. The first course is an introduction to d
atabase principles. Roughly the first six chapters of the text contain the m
aterial from that course. The second course deals with more advanced databas
e concepts, with a focus on cost-performance concerns. This material is cove
red in Chapters 7 through 10.
  It is not necessary to proceed through the book sequentially, and the ch
apters have been prepared to accommodate a variety of reader interests and c
ourse plans. Depending on your experience and objectives, chapters can be re
ad briefly or in a sequence different from the order offered by the book. Fo
r example, readers who have a familiarity with basic concepts may want to be
gin with their specific interest in the later chapters, referring to Chapter
s 1 through 6 only when needed (see Figure 1 for chapter dependencies). The 
book has been written so that new concepts are only introduced when previous
 concepts have been mastered. For this reason, experienced readers can begin
 with the subject most appropriate to their needs.
  We've intended this book either as a tutorial and reference for the prof
essional, or as a one- or two-term introductory course in colleges and unive
rsities. The presentation moves from basic theory and concepts to the most r
ecent developments in the field. The text introduces basic SQL simultaneousl
y with the fundamentals of relational databases.
      Chapter 1 Introduction
      Chapter 2 The Relational Model
      Chapter 3 SQL
      Chapter 4 Object-Relational SQL Chapter 6 Database Design
      Chapter 5 Programs to Access a DB
      Chapter 7 Integrity, Views, etc.
      Chapter 8 Indexing
      Chapter 9 Query Processing
      Chapter 10 Update Transactions
      Chapter 11 Parallel and Distributed DBs
    Figure 1 Chapter Dependencies for Planning Reading Order
  Examples from ORACLE, INFORMIX, DB2, and others are used to illustrate t
he concepts and to clarify the cost-performance issues by comparing the diff
ering approaches used in these successful systems. The key issues in each ch
apter are reinforced by programming examples and exercises. Three appendices
 provide additional background. As an aid to self-study, solutions to select
ed exercises are included in the back of the book.
Discussion of New Coverage: Object-Relational Model
  Since the first edition was published, the SQL language has added a numb
er of new features, and these covered in new sections of Chapter 3. More fun
damentally, the object-relational model has become the new database standard
; and while all new ORDBMS products are backward compatible so that the rela
tional model continues to be supported, it is our contention that this chang
e is in the process of revolutionizing the industry. Table design and SQL ac
cess to the data can be expected to develop in new and relatively unexpected
 ways.
  The history of how the object-relational model has entered the mainstrea
m is instructive. In 1996, INFORMIX Corporation purchased the Illustra produ
ct and has been working since then to consolidate object-relational features
 into INFORMIX. (Illustra, then called Montage, was covered in Section 3.11 
of our first edition, but we have modified and greatly extended this materia
l to create a new Chapter 4 for the current edition.) In 1997, ORACLE Corpor
ation shipped ORACLE release 8, which supported a set of new object-relation
al features that was considered revolutionary by many. With this event, the 
conversion from the relational to the object-relational model in the databas
e industry was confirmed. Most recently, IBM's DB2 UDB, which has had an exc
ellent programming interface for object-relational programming for some time
, has begun to incorporate the object-relational data model at the design an
d interactive layers. (see [2] in the "Suggestions for Further Reading" at
 the end of this preface.) Unfortunately, all of these products are quite di
fferent in syntax, and a portable application is still impossible: no meanin
gful standardization of object-relational SQL has occurred as yet. Thankfull
y, the ANSI SQL 3effort, after an extremely long process of development, rel
eased a final version of its object-relational standard in 1999. This new st
andard is known as SQL-99 (see [3]).
  There is a tremendous pedagogical challenge to introducing new students 
to a field that is fragmented between two distinct models of data representa
tion. At the present time (2000), most commercial database applications use 
the pure relational model. This means that object-relational concepts will b
e confusing to many users unless the introduction of these concepts is caref
ully segregated from relational concepts. We have decided in our second edit
ion to keep our first edition introduction to the relational model in Chapte
r 2, and to merely bring up to date the relational SQL presentation in Chapt
er 3. We then expand the object-relational coverage of Section 3.11 of our f
irst edition to a rather long Chapter 4, where we introduce ORACLE and INFOR
MIX object-relational conventions. Because the two products are so different
, we break each section of Chapter 4 into two parts, to introduce ORACLE and
 INFORMIX concepts in parallel. We do not give DB2 UDB object-relational syn
tax equal weight in the current edition because the DB2 object-relational mo
del was still in development at the time we wrote Chapter 4.
  After a thorough introduction to object-relational concepts and product 
usage in Chapter 4, the following chapters remain basically independent of t
hese concerns. There are a number of reasons for this. Some of the topics co
vered in later chapters, such as logical database design in Chapter 6, are n
ot well understood for the object-relational model at the present time, and 
for other coverage, such as update transactions in Chapter 10, object-relati
onal concepts (aside from the introduction to PL/SQL and SPL in Chapter 4) s
eem largely irrelevant. A practitioner who reads through Chapter 4 carefully
 will be able to use object-relational SQL to augment most of the coverage o
f the following chapters, and for those readers who do not yet deal with obj
ect-relational products, we didn't want to confuse later issues with terminl
olgy they might wish to avoid for now. Thus we see in Figure 1 that there is
 no follow-on Dependency on Chapter 4:the concepts of that chapter stand alo
ne. (Chapter 7 does have coverage of catalog tables for object-relational sc
hema objects, but this can be skipped if desired.) It is likely that the nex
t edition will deal with object-relational concepts in all chapters of the t
ext because it will likely be used nearly universally, but we feel that the 
time for that has not yet arrived.
  To write the second edition, a number of difficult decisions had to be m
ade, the most difficult being the selection of the database products and pro
duct categories to be covered in this text. We have avoided OODBMS coverage 
because we had to leave some thing out, and the potential commercial growth 
in the OODBMS field, which has been heralded for so many years, has never ma
terialized; OODBMS products remain a niche category. We also decided relucta
ntly against providing an introduction to the Microsoft SOL Server product, 
in spite of the great interest it has engendered. We made this decision beca
use our major thrust in the second edition has been to introduce the new obj
ect-relational product features, and SQL Server doesn't yet support these fe
atures. We also decided to discontinue coverage of INGRES, which was central
 to our first edition because it was the most common database product in col
lege use. Many other popular database products are now offering inexpensive 
versions for the college market, and we have therefore dropped INGRES in the
 second edition.
A Chapter-by-Chapter outline of Changes
  We outline some of the new material that has been included for the first
 time in the current edition in the following chapter descriptions.
  Chapter 1 Introduction. New discussion of the object-relational model.
  Chapter 2 The Relational Model. Aside from clarifying details from the f
irst edition, this chapter is essentially unchanged, in keeping with our dec
ision to cover the relational model in Chapter 2 and 3 and putting of object
-relational features until Chapter 4.
  Chapter 3 Basic Query Language SQL. There are a number of new features a
dded to SQL that are covered for the first time in the second edition. Secti
on 3.6 introduces some "Advanced SQL Syntax" not supported by all database p
roducts. This includes the INTERSECT [ALL] and EXCEPT [AA] operations, a
nd the new tableref definition of Figure 3.11, which provides for new Join F
orms such as [INNER|{LEFT|FULL]}[OUTER]] Joins, and joins ON search c
onditions. Since no SQL standard has been uniformly adopted by the vendors, 
the second edition provides a general form we call "Basic SQL," which provid
es the set of features we found commonly adopted by all database products un
der consideration.
  Chapter 4 Object-Relational SQL. This is an entirely new chapter, and we
 provide here an extended table of contents of the sections and subsections 
of the chapter. Once features of ORACLE and INFORMIX are covered, a side-by-
side comparison of features ends each section.
  4.1 Introduction: Definitions and Object-Relational History
  4.2 Object types in ORACLE; row types in INFORMIX; use of object(row) ty
pes for table definitions; object nesting; dot notation to access columns; l
ack of encapsulation of object data; coverage of REFs in ORACLE but not in I
NFORMIX; type inheritance in INFORMIX but not in ORACLE.
  4.3 Collection Types. ORACLE has two collection types: nested tables (a 
column value can be a table) and VARRAYs (array type column value). INFORMIX
 has three collection types:sets, multisets (unordered, like sets, with dupl
icates allowed), and lists (ordered). Both allow ad hocqueries to tetrieve d
ata from collections, and to insert and update collections.
  4.4 User-Defined Fun
--
上网不聊天,气死活神仙。

※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 218.7.32.75]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:207.724毫秒