d ata b a s e
systems
Both Thomas Connolly and Carolyn Begg have
experience of database design in industry, and now
apply this in their teaching and research at the
University of Paisley in Scotland.
A Practical Approach to Design,
Implementation, and Management
•
Begg
A clear introduction to design, implementation and management issues, as well as an extensive
treatment of database languages and standards, make this book an indispensable complete
reference for database students and professionals alike
Features
Complex subjects are clearly explained using running case studies throughout the book.
Database design methodology is explicitly divided into three phases: conceptual, logical, and
physical. Each phase is described with an example of how it works in practice.
SQL is comprehensively covered in three tutorial-style chapters.
Distributed, object-oriented, and object-relational DBMSs are fully discussed.
Check out the Web site at www.booksites.net/connbegg, for full implementations of the case
studies, lab guides for Access and Oracle, and additional student support.
New! For the fourth edition
•
•
•
Extended treatment of XML, OLAP and data mining.
Coverage of updated standards including SQL:2003, W3C (XPath andXQuery), and OMG.
Now covers Oracle9i and Microsoft Office Access 2003.
This book comes with a free six-month subscription to Database Place, an online
tutorial that helps readers master the key concepts of database systems.
Log on at www.aw.com/databaseplace.
FOURTH
EDITION
d ata b a s e
systems
Over 200,000 people have been grounded in good database design practice by reading Database
Systems. The new edition of this best-seller brings it up to date with the latest developments in
database technology and builds on the clear, accessible approach that has contributed to the success
of previous editions.
an imprint of
www.booksites.net/connbegg
Connolly
FOURTH EDITION
•
•
•
•
•
•
Thomas Connolly Carolyn Begg
d ata b a s e
systems
A Practical Approach to Design,
Implementation, and Management
www.booksites.net/connbegg
www.booksites.net/connbegg
www.pearson-books.com
www.it-ebooks.info
Databa se
Systems
A Companion Web site accompanies Database Systems,
Fourth edition by Thomas Connolly and Carolyn Begg
Visit the Database Systems Companion Web site at www.booksites.net/connbegg
to find valuable learning material including:
For Students:
n
n
n
n
n
n
Tutorials on selected chapters
Sample StayHome database
Solutions to review questions
DreamHome web implementation
Extended version of File Organizations and Indexes
Access and Oracle Lab Manuals
www.it-ebooks.info
INTERNATIONAL COMPUTER SCIENCE SERIES
Consulting Editor A D McGettrick University of Strathclyde
SELECTED TITLES IN THE SERIES
Operating Systems J Bacon and T Harris
Programming Language Essentials H E Bal and D Grune
Programming in Ada 95 (2nd edn) J G P Barnes
Java Gently (3rd edn) J Bishop
Software Design (2nd edn) D Budgen
Concurrent Programming A Burns and G Davies
Real-Time Systems and Programming Languages: Ada 95, Real-Time Java and RealTime POSIX (3rd edn) A Burns and A Wellings
Comparative Programming Languages (3rd edn) L B Wilson and R G Clark, updated by
R G Clark
Distributed Systems: Concepts and Design (3rd edn) G Coulouris, J Dollimore and T
Kindberg
Principles of Object-Oriented Software Development (2nd edn) A Eliëns
Fortran 90 Programming T M R Ellis, I R Philips and T M Lahey
Program Verification N Francez
Introduction to Programming using SML M Hansen and H Rischel
Functional C P Hartel and H Muller
Algorithms and Data Structures: Design, Correctness, Analysis (2nd edn) J Kingston
Introductory Logic and Sets for Computer Scientists N Nissanke
Human–Computer Interaction J Preece et al.
Algorithms: A Functional Programming Approach F Rabhi and G Lapalme
Ada 95 From the Beginning (3rd edn) J Skansholm
C++ From the Beginning J Skansholm
Java From the Beginning (2nd edn) J Skansholm
Software Engineering (6th edn) I Sommerville
Object-Oriented Programming in Eiffel (2nd edn) P Thomas and R Weedon
Miranda: The Craft of Functional Programming S Thompson
Haskell: The Craft of Functional Programming (2nd edn) S Thompson
Discrete Mathematics for Computer Scientists (2nd edn) J K Truss
Compiler Design R Wilhelm and D Maurer
Discover Delphi: Programming Principles Explained S Williams and S Walmsley
Software Engineering with B J B Wordsworth
www.it-ebooks.info
THOMAS M. CONNOLLY
• CAROLYN E. BEGG
UNIVERSITY OF PAISLEY
Databa se
Systems
A Practical Approach to Design,
Implementation, and Management
Fourth Edition
www.it-ebooks.info
Pearson Education Limited
Edinburgh Gate
Harlow
Essex CM20 2JE
England
and Associated Companies throughout the world
Visit us on the World Wide Web at:
www.pearsoned.co.uk
First published 1995
Second edition 1998
Third edition 2002
Fourth edition published 2005
© Pearson Education Limited 1995, 2005
The rights of Thomas M. Connolly and Carolyn E. Begg to be identified as
authors of this work have been asserted by the authors in accordance with the
Copyright, Designs and Patents Act 1988.
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 either the prior written
permission of the publisher or a licence permitting restricted copying in the United
Kingdom issued by the Copyright Licensing Agency Ltd, 90 Tottenham Court
Road, London W1T 4LP.
The programs in this book have been included for their instructional value. They
have been tested with care but are not guaranteed for any particular purpose. The
publisher does not offer any warranties or representations nor does it accept any
liabilities with respect to the programs.
All trademarks used herein are the property of their respective owners.
The use of any trademark in this text does not vest in the author or publisher
any trademark ownership rights in such trademarks, nor does the use of such
trademarks imply any affiliation with or endorsement of this book by such owners.
ISBN 0 321 21025 5
British Library Cataloguing-in-Publication Data
A catalogue record for this book is available from the British Library
Library of Congress Cataloguing-in-Publication Data
A catalog record for this book is available from the Library of Congress
10 9 8 7 6 5 4 3 2
09 08 07 06 05
Typeset in 10/12pt Times by 35
Printed and bound in the United States of America
www.it-ebooks.info
To Sheena, for her patience, understanding, and love during the last few years.
To our daughter, Kathryn, for her beauty and intelligence.
To our happy and energetic son, Michael, for the constant joy he gives us.
To our new child, Stephen, may he always be so happy.
To my Mother, who died during the writing of the first edition.
Thomas M. Connolly
To Heather, Rowan, Calum, and David
Carolyn E. Begg
www.it-ebooks.info
www.it-ebooks.info
Brief Contents
Preface
Part 1
xxxiii
Background
1
Chapter 1
Introduction to Databases
3
Chapter 2
Database Environment
33
The Relational Model and Languages
67
Chapter 3
The Relational Model
69
Chapter 4
Relational Algebra and Relational Calculus
88
Chapter 5
SQL: Data Manipulation
112
Chapter 6
SQL: Data Definition
157
Chapter 7
Query-By-Example
198
Chapter 8
Commercial RDBMSs: Office Access and Oracle
225
Part 2
Part 3
Chapter 9
Database Analysis and Design Techniques
279
Database Planning, Design, and Administration
281
Chapter 10
Fact-Finding Techniques
314
Chapter 11
Entity–Relationship Modeling
342
Chapter 12
Enhanced Entity–Relationship Modeling
371
Chapter 13
Normalization
387
Chapter 14
Advanced Normalization
415
www.it-ebooks.info
viii
|
Brief Contents
Part 4
Methodology
435
Chapter 15
Methodology – Conceptual Database Design
437
Chapter 16
Methodology – Logical Database Design for the
Relational Model
461
Methodology – Physical Database Design for
Relational Databases
494
Methodology – Monitoring and Tuning the
Operational System
519
Chapter 17
Chapter 18
Part 5
Selected Database Issues
539
Chapter 19
Security
541
Chapter 20
Transaction Management
572
Chapter 21
Query Processing
630
Part 6
Distributed DBMSs and Replication
685
Chapter 22
Distributed DBMSs – Concepts and Design
687
Chapter 23
Distributed DBMSs – Advanced Concepts
734
Chapter 24
Replication and Mobile Databases
780
Part 7
Object DBMSs
801
Chapter 25
Introduction to Object DBMSs
803
Chapter 26
Object-Oriented DBMSs – Concepts
847
Chapter 27
Object-Oriented DBMSs – Standards and Systems
888
Chapter 28
Object-Relational DBMSs
935
Part 8
Web and DBMSs
991
Chapter 29
Web Technology and DBMSs
993
Chapter 30
Semistructured Data and XML
1065
www.it-ebooks.info
Brief Contents
Part 9
Business Intelligence
|
ix
1147
Chapter 31
Data Warehousing Concepts
1149
Chapter 32
Data Warehousing Design
1181
Chapter 33
OLAP
1204
Chapter 34
Data Mining
1232
Appendices
A
1247
Users’ Requirements Specification for DreamHome
Case Study
1249
B
Other Case Studies
1255
C
File Organizations and Indexes
(extended version on Web site)
1268
D
When is a DBMS Relational?
1293
E
Programmatic SQL
(extended version on Web site)
1298
F
Alternative ER Modeling Notations
1320
G
Summary of the Database Design Methodology for
Relational Databases
1326
H
I
Estimating Disk Space Requirements
On Web site
Example Web Scripts
On Web site
References
1332
Further Reading
1345
Index
1356
www.it-ebooks.info
www.it-ebooks.info
Contents
Preface
Part 1
Chapter 1
1.1
1.2
xxxiii
Background
1
Introduction to Databases
3
Introduction
Traditional File-Based Systems
1.2.1 File-Based Approach
1.2.2 Limitations of the File-Based Approach
Database Approach
1.3.1 The Database
1.3.2 The Database Management System (DBMS)
1.3.3 (Database) Application Programs
1.3.4 Components of the DBMS Environment
1.3.5 Database Design: The Paradigm Shift
4
7
7
12
14
15
16
17
18
21
1.4
Roles in the Database Environment
1.4.1 Data and Database Administrators
1.4.2 Database Designers
1.4.3 Application Developers
1.4.4 End-Users
21
22
22
23
23
1.5
History of Database Management Systems
24
1.6
Advantages and Disadvantages of DBMSs
26
Chapter Summary
Review Questions
Exercises
31
32
32
Database Environment
33
The Three-Level ANSI-SPARC Architecture
2.1.1 External Level
34
35
1.3
Chapter 2
2.1
www.it-ebooks.info
xii
|
Contents
2.2
2.3
2.4
2.5
2.6
Part 2
Chapter 3
3.1
3.2
3.3
3.4
2.1.2 Conceptual Level
2.1.3 Internal Level
2.1.4 Schemas, Mappings, and Instances
2.1.5 Data Independence
Database Languages
2.2.1 The Data Definition Language (DDL)
2.2.2 The Data Manipulation Language (DML)
2.2.3 Fourth-Generation Languages (4GLs)
Data Models and Conceptual Modeling
2.3.1 Object-Based Data Models
2.3.2 Record-Based Data Models
2.3.3 Physical Data Models
2.3.4 Conceptual Modeling
Functions of a DBMS
Components of a DBMS
Multi-User DBMS Architectures
2.6.1 Teleprocessing
2.6.2 File-Server Architectures
2.6.3 Traditional Two-Tier Client–Server Architecture
2.6.4 Three-Tier Client–Server Architecture
2.6.5 Transaction Processing Monitors
36
36
37
38
39
40
40
42
43
44
45
47
47
48
53
56
56
56
57
60
62
Chapter Summary
Review Questions
Exercises
64
65
65
The Relational Model and Languages
67
The Relational Model
69
Brief History of the Relational Model
Terminology
3.2.1 Relational Data Structure
3.2.2 Mathematical Relations
3.2.3 Database Relations
3.2.4 Properties of Relations
3.2.5 Relational Keys
3.2.6 Representing Relational Database Schemas
Integrity Constraints
3.3.1 Nulls
3.3.2 Entity Integrity
3.3.3 Referential Integrity
3.3.4 General Constraints
Views
3.4.1 Terminology
70
71
72
75
76
77
78
79
81
81
82
83
83
83
84
www.it-ebooks.info
Contents
Chapter 4
4.1
4.2
4.3
Chapter 5
5.1
5.2
5.3
|
xiii
3.4.2 Purpose of Views
3.4.3 Updating Views
84
85
Chapter Summary
Review Questions
Exercises
86
87
87
Relational Algebra and Relational Calculus
88
The Relational Algebra
4.1.1 Unary Operations
4.1.2 Set Operations
4.1.3 Join Operations
4.1.4 Division Operation
4.1.5 Aggregation and Grouping Operations
4.1.6 Summary of the Relational Algebra Operations
The Relational Calculus
4.2.1 Tuple Relational Calculus
4.2.2 Domain Relational Calculus
Other Languages
Chapter Summary
Review Questions
Exercises
89
89
92
95
99
100
102
103
103
107
109
110
110
111
SQL: Data Manipulation
112
Introduction to SQL
5.1.1 Objectives of SQL
5.1.2 History of SQL
5.1.3 Importance of SQL
5.1.4 Terminology
Writing SQL Commands
Data Manipulation
5.3.1 Simple Queries
5.3.2 Sorting Results (ORDER BY Clause)
5.3.3 Using the SQL Aggregate Functions
5.3.4 Grouping Results (GROUP BY Clause)
5.3.5 Subqueries
5.3.6 ANY and ALL
5.3.7 Multi-Table Queries
5.3.8 EXISTS and NOT EXISTS
5.3.9 Combining Result Tables (UNION, INTERSECT, EXCEPT)
5.3.10 Database Updates
113
113
114
116
116
116
117
118
127
129
131
134
138
139
146
147
149
Chapter Summary
Review Questions
Exercises
154
155
155
www.it-ebooks.info
xiv
|
Contents
Chapter 6
6.1
6.2
6.3
6.4
6.5
6.6
Chapter 7
7.1
7.2
7.3
SQL: Data Definition
157
The ISO SQL Data Types
6.1.1 SQL Identifiers
6.1.2 SQL Scalar Data Types
6.1.3 Exact Numeric Data
Integrity Enhancement Feature
6.2.1 Required Data
6.2.2 Domain Constraints
6.2.3 Entity Integrity
6.2.4 Referential Integrity
6.2.5 General Constraints
Data Definition
6.3.1 Creating a Database
6.3.2 Creating a Table (CREATE TABLE)
6.3.3 Changing a Table Definition (ALTER TABLE)
6.3.4 Removing a Table (DROP TABLE)
6.3.5 Creating an Index (CREATE INDEX)
6.3.6 Removing an Index (DROP INDEX)
Views
6.4.1 Creating a View (CREATE VIEW)
6.4.2 Removing a View (DROP VIEW)
6.4.3 View Resolution
6.4.4 Restrictions on Views
6.4.5 View Updatability
6.4.6 WITH CHECK OPTION
6.4.7 Advantages and Disadvantages of Views
6.4.8 View Materialization
Transactions
6.5.1 Immediate and Deferred Integrity Constraints
Discretionary Access Control
6.6.1 Granting Privileges to Other Users (GRANT)
6.6.2 Revoking Privileges from Users (REVOKE)
158
158
159
160
164
164
164
166
166
167
168
168
169
173
174
175
176
176
177
179
180
181
181
183
184
186
187
189
189
191
192
Chapter Summary
Review Questions
Exercises
194
195
195
Query-By-Example
198
Introduction to Microsoft Office Access Queries
Building Select Queries Using QBE
7.2.1 Specifying Criteria
7.2.2 Creating Multi-Table Queries
7.2.3 Calculating Totals
Using Advanced Queries
199
201
202
204
207
208
www.it-ebooks.info
Contents
7.4
Chapter 8
8.1
8.2
Part 3
Chapter 9
9.1
9.2
|
xv
7.3.1 Parameter Query
7.3.2 Crosstab Query
7.3.3 Find Duplicates Query
7.3.4 Find Unmatched Query
7.3.5 Autolookup Query
Changing the Content of Tables Using Action Queries
7.4.1 Make-Table Action Query
7.4.2 Delete Action Query
7.4.3 Update Action Query
7.4.4 Append Action Query
208
209
212
214
215
215
215
217
217
221
Exercises
224
Commercial RDBMSs: Office Access and Oracle
225
Microsoft Office Access 2003
8.1.1 Objects
8.1.2 Microsoft Office Access Architecture
8.1.3 Table Definition
8.1.4 Relationships and Referential Integrity Definition
8.1.5 General Constraint Definition
8.1.6 Forms
8.1.7 Reports
8.1.8 Macros
8.1.9 Object Dependencies
Oracle9i
8.2.1 Objects
8.2.2 Oracle Architecture
8.2.3 Table Definition
8.2.4 General Constraint Definition
8.2.5 PL/SQL
8.2.6 Subprograms, Stored Procedures, Functions, and Packages
8.2.7 Triggers
8.2.8 Oracle Internet Developer Suite
8.2.9 Other Oracle Functionality
8.2.10 Oracle10g
226
226
227
228
233
234
236
238
239
242
242
244
245
252
255
255
261
263
267
271
271
Chapter Summary
Review Questions
276
277
Database Analysis and Design Techniques
279
Database Planning, Design, and Administration
281
The Information Systems Lifecycle
The Database System Development Lifecycle
282
283
www.it-ebooks.info
xvi
|
Contents
9.3
9.4
9.9
9.10
Database Planning
System Definition
9.4.1 User Views
Requirements Collection and Analysis
9.5.1 Centralized Approach
9.5.2 View Integration Approach
Database Design
9.6.1 Approaches to Database Design
9.6.2 Data Modeling
9.6.3 Phases of Database Design
DBMS Selection
9.7.1 Selecting the DBMS
Application Design
9.8.1 Transaction Design
9.8.2 User Interface Design Guidelines
Prototyping
Implementation
285
286
287
288
289
289
291
291
292
293
295
296
299
300
301
303
304
9.11
Data Conversion and Loading
305
9.12
Testing
305
9.13
Operational Maintenance
306
9.14
CASE Tools
307
9.15
Data Administration and Database Administration
9.15.1 Data Administration
9.15.2 Database Administration
9.15.3 Comparison of Data and Database Administration
309
309
309
311
Chapter Summary
Review Questions
Exercises
311
313
313
Fact-Finding Techniques
314
When Are Fact-Finding Techniques Used?
What Facts Are Collected?
Fact-Finding Techniques
10.3.1 Examining Documentation
10.3.2 Interviewing
10.3.3 Observing the Enterprise in Operation
10.3.4 Research
10.3.5 Questionnaires
Using Fact-Finding Techniques – A Worked Example
10.4.1 The DreamHome Case Study – An Overview
10.4.2 The DreamHome Case Study – Database Planning
315
316
317
317
317
319
319
320
321
321
326
9.5
9.6
9.7
9.8
Chapter 10
10.1
10.2
10.3
10.4
www.it-ebooks.info
Contents
|
xvii
10.4.3 The DreamHome Case Study – System Definition
10.4.4 The DreamHome Case Study – Requirements Collection
and Analysis
10.4.5 The DreamHome Case Study – Database Design
331
Chapter Summary
Review Questions
Exercises
340
341
341
Entity–Relationship Modeling
342
11.1
Entity Types
343
11.2
Relationship Types
11.2.1 Degree of Relationship Type
11.2.2 Recursive Relationship
346
347
349
11.3
Attributes
11.3.1 Simple and Composite Attributes
11.3.2 Single-Valued and Multi-Valued Attributes
11.3.3 Derived Attributes
11.3.4 Keys
350
351
351
352
352
11.4
Strong and Weak Entity Types
354
11.5
Attributes on Relationships
355
11.6
Structural Constraints
11.6.1 One-to-One (1:1) Relationships
11.6.2 One-to-Many (1:*) Relationships
11.6.3 Many-to-Many (*:*) Relationships
11.6.4 Multiplicity for Complex Relationships
11.6.5 Cardinality and Participation Constraints
356
357
358
359
361
362
11.7
Problems with ER Models
11.7.1 Fan Traps
11.7.2 Chasm Traps
364
364
365
Chapter Summary
Review Questions
Exercises
368
369
369
Enhanced Entity–Relationship Modeling
371
Specialization/Generalization
12.1.1 Superclasses and Subclasses
12.1.2 Superclass/Subclass Relationships
12.1.3 Attribute Inheritance
12.1.4 Specialization Process
12.1.5 Generalization Process
12.1.6 Constraints on Specialization/Generalization
372
372
373
374
374
375
378
Chapter 11
Chapter 12
12.1
www.it-ebooks.info
332
340
xviii
|
Contents
12.2
12.3
Chapter 13
13.1
13.2
13.3
13.4
13.5
13.6
13.7
13.8
13.9
Chapter 14
14.1
14.2
14.3
14.4
14.5
12.1.7 Worked Example of using Specialization/Generalization
to Model the Branch View of DreamHome Case Study
Aggregation
Composition
379
383
384
Chapter Summary
Review Questions
Exercises
385
386
386
Normalization
387
The Purpose of Normalization
How Normalization Supports Database Design
Data Redundancy and Update Anomalies
13.3.1 Insertion Anomalies
13.3.2 Deletion Anomalies
13.3.3 Modification Anomalies
Functional Dependencies
13.4.1 Characteristics of Functional Dependencies
13.4.2 Identifying Functional Dependencies
13.4.3 Identifying the Primary Key for a Relation using
Functional Dependencies
The Process of Normalization
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
General Definitions of 2NF and 3NF
388
389
390
391
392
392
392
393
397
Chapter Summary
Review Questions
Exercises
412
413
413
Advanced Normalization
415
More on Functional Dependencies
14.1.1 Inference Rules for Functional Dependencies
14.1.2 Minimal Sets of Functional Dependencies
Boyce–Codd Normal Form (BCNF)
14.2.1 Definition of Boyce–Codd Normal Form
Review of Normalization up to BCNF
Fourth Normal Form (4NF)
14.4.1 Multi-Valued Dependency
14.4.2 Definition of Fourth Normal Form
Fifth Normal Form (5NF)
416
416
418
419
419
422
428
428
430
430
www.it-ebooks.info
399
401
403
407
408
411
Contents
Part 4
Chapter 15
15.1
15.2
15.3
Chapter 16
16.1
Chapter 17
17.1
17.2
17.3
|
xix
14.5.1 Lossless-Join Dependency
14.5.2 Definition of Fifth Normal Form
430
431
Chapter Summary
Review Questions
Exercises
433
433
433
Methodology
435
Methodology – Conceptual Database Design
437
Introduction to the Database Design Methodology
15.1.1 What is a Design Methodology?
15.1.2 Conceptual, Logical, and Physical Database Design
15.1.3 Critical Success Factors in Database Design
Overview of the Database Design Methodology
Conceptual Database Design Methodology
Step 1 Build Conceptual Data Model
438
438
439
440
440
442
442
Chapter Summary
Review Questions
Exercises
458
459
460
Methodology – Logical Database Design for the
Relational Model
461
Logical Database Design Methodology for the Relational Model
Step 2 Build and Validate Logical Data Model
462
462
Chapter Summary
Review Questions
Exercises
490
491
492
Methodology – Physical Database Design for
Relational Databases
494
Comparison of Logical and Physical Database Design
495
Overview of Physical Database Design Methodology
496
The Physical Database Design Methodology for Relational Databases 497
Step 3 Translate Logical Data Model for Target DBMS
497
Step 4 Design File Organizations and Indexes
501
Step 5 Design User Views
515
Step 6 Design Security Mechanisms
516
Chapter Summary
Review Questions
Exercises
www.it-ebooks.info
517
517
518
xx
|
Contents
Chapter 18
18.1
18.2
Part 5
Chapter 19
19.1
19.2
19.3
19.4
19.5
Chapter 20
20.1
Methodology – Monitoring and Tuning the Operational System
519
Denormalizing and Introducing Controlled Redundancy
Step 7 Consider the Introduction of Controlled Redundancy
Monitoring the System to Improve Performance
Step 8 Monitor and Tune the Operational System
519
519
532
532
Chapter Summary
Review Questions
Exercise
537
537
537
Selected Database Issues
539
Security
541
Database Security
19.1.1 Threats
Countermeasures – Computer-Based Controls
19.2.1 Authorization
19.2.2 Access Controls
19.2.3 Views
19.2.4 Backup and Recovery
19.2.5 Integrity
19.2.6 Encryption
19.2.7 RAID (Redundant Array of Independent Disks)
Security in Microsoft Office Access DBMS
Security in Oracle DBMS
DBMSs and Web Security
19.5.1 Proxy Servers
19.5.2 Firewalls
19.5.3 Message Digest Algorithms and Digital Signatures
19.5.4 Digital Certificates
19.5.5 Kerberos
19.5.6 Secure Sockets Layer and Secure HTTP
19.5.7 Secure Electronic Transactions and Secure Transaction
Technology
19.5.8 Java Security
19.5.9 ActiveX Security
542
543
545
546
547
550
550
551
551
552
555
558
562
563
563
564
564
565
565
Chapter Summary
Review Questions
Exercises
570
571
571
Transaction Management
572
Transaction Support
20.1.1 Properties of Transactions
20.1.2 Database Architecture
573
575
576
www.it-ebooks.info
566
566
569
Contents
20.2
20.3
20.4
20.5
Chapter 21
21.1
21.2
21.3
21.4
21.5
|
xxi
Concurrency Control
20.2.1 The Need for Concurrency Control
20.2.2 Serializability and Recoverability
20.2.3 Locking Methods
20.2.4 Deadlock
20.2.5 Timestamping Methods
20.2.6 Multiversion Timestamp Ordering
20.2.7 Optimistic Techniques
20.2.8 Granularity of Data Items
Database Recovery
20.3.1 The Need for Recovery
20.3.2 Transactions and Recovery
20.3.3 Recovery Facilities
20.3.4 Recovery Techniques
20.3.5 Recovery in a Distributed DBMS
Advanced Transaction Models
20.4.1 Nested Transaction Model
20.4.2 Sagas
20.4.3 Multilevel Transaction Model
20.4.4 Dynamic Restructuring
20.4.5 Workflow Models
Concurrency Control and Recovery in Oracle
20.5.1 Oracle’s Isolation Levels
20.5.2 Multiversion Read Consistency
20.5.3 Deadlock Detection
20.5.4 Backup and Recovery
577
577
580
587
594
597
600
601
602
605
606
607
609
612
615
615
616
618
619
620
621
622
623
623
625
625
Chapter Summary
Review Questions
Exercises
626
627
628
Query Processing
630
Overview of Query Processing
Query Decomposition
Heuristical Approach to Query Optimization
21.3.1 Transformation Rules for the Relational Algebra
Operations
21.3.2 Heuristical Processing Strategies
Cost Estimation for the Relational Algebra Operations
21.4.1 Database Statistics
21.4.2 Selection Operation
21.4.3 Join Operation
21.4.4 Projection Operation
21.4.5 The Relational Algebra Set Operations
Enumeration of Alternative Execution Strategies
631
635
639
www.it-ebooks.info
640
645
646
646
647
654
662
664
665
xxii
|
Contents
21.6
21.5.1 Pipelining
21.5.2 Linear Trees
21.5.3 Physical Operators and Execution Strategies
21.5.4 Reducing the Search Space
21.5.5 Enumerating Left-Deep Trees
21.5.6 Semantic Query Optimization
21.5.7 Alternative Approaches to Query Optimization
21.5.8 Distributed Query Optimization
Query Optimization in Oracle
21.6.1 Rule-Based and Cost-Based Optimization
21.6.2 Histograms
21.6.3 Viewing the Execution Plan
665
666
667
668
669
671
672
672
673
673
677
678
Chapter Summary
Review Questions
Exercises
680
681
681
Part 6
Distributed DBMSs and Replication
685
Chapter 22
Distributed DBMSs – Concepts and Design
687
Introduction
22.1.1 Concepts
22.1.2 Advantages and Disadvantages of DDBMSs
22.1.3 Homogeneous and Heterogeneous DDBMSs
Overview of Networking
Functions and Architectures of a DDBMS
22.3.1 Functions of a DDBMS
22.3.2 Reference Architecture for a DDBMS
22.3.3 Reference Architecture for a Federated MDBS
22.3.4 Component Architecture for a DDBMS
Distributed Relational Database Design
22.4.1 Data Allocation
22.4.2 Fragmentation
Transparencies in a DDBMS
22.5.1 Distribution Transparency
22.5.2 Transaction Transparency
22.5.3 Performance Transparency
22.5.4 DBMS Transparency
22.5.5 Summary of Transparencies in a DDBMS
Date’s Twelve Rules for a DDBMS
688
689
693
697
699
703
703
704
705
706
708
709
710
719
719
722
725
728
728
729
Chapter Summary
Review Questions
Exercises
731
732
732
22.1
22.2
22.3
22.4
22.5
22.6
www.it-ebooks.info
Contents
Chapter 23
23.1
23.2
23.3
23.4
23.5
23.6
23.7
Chapter 24
24.1
24.2
24.3
24.4
24.5
24.6
24.7
24.8
|
xxiii
Distributed DBMSs – Advanced Concepts
734
Distributed Transaction Management
Distributed Concurrency Control
23.2.1 Objectives
23.2.2 Distributed Serializability
23.2.3 Locking Protocols
23.2.4 Timestamp Protocols
Distributed Deadlock Management
Distributed Database Recovery
23.4.1 Failures in a Distributed Environment
23.4.2 How Failures Affect Recovery
23.4.3 Two-Phase Commit (2PC)
23.4.4 Three-Phase Commit (3PC)
23.4.5 Network Partitioning
The X/Open Distributed Transaction Processing Model
Distributed Query Optimization
23.6.1 Data Localization
23.6.2 Distributed Joins
23.6.3 Global Optimization
Distribution in Oracle
23.7.1 Oracle’s DDBMS Functionality
735
736
736
737
738
740
741
744
744
745
746
752
756
758
761
762
766
767
772
772
Chapter Summary
Review Questions
Exercises
777
778
778
Replication and Mobile Databases
780
Introduction to Database Replication
Benefits of Database Replication
Applications of Replication
Basic Components of Database Replication
Database Replication Environments
24.5.1 Synchronous Versus Asynchronous Replication
24.5.2 Data Ownership
Replication Servers
24.6.1 Replication Server Functionality
24.6.2 Implementation Issues
Introduction to Mobile Databases
24.7.1 Mobile DBMSs
Oracle Replication
24.8.1 Oracle’s Replication Functionality
781
781
783
783
784
784
784
788
788
789
792
794
794
794
www.it-ebooks.info
xxiv
|
Contents
Part 7
Chapter 25
25.1
25.2
25.3
25.4
25.5
25.6
25.7
Chapter 26
26.1
Chapter Summary
Review Questions
Exercises
799
800
800
Object DBMSs
801
Introduction to Object DBMSs
803
Advanced Database Applications
Weaknesses of RDBMSs
Object-Oriented Concepts
25.3.1 Abstraction, Encapsulation, and Information Hiding
25.3.2 Objects and Attributes
25.3.3 Object Identity
25.3.4 Methods and Messages
25.3.5 Classes
25.3.6 Subclasses, Superclasses, and Inheritance
25.3.7 Overriding and Overloading
25.3.8 Polymorphism and Dynamic Binding
25.3.9 Complex Objects
Storing Objects in a Relational Database
25.4.1 Mapping Classes to Relations
25.4.2 Accessing Objects in the Relational Database
Next-Generation Database Systems
Object-Oriented Database Design
25.6.1 Comparison of Object-Oriented Data Modeling and
Conceptual Data Modeling
25.6.2 Relationships and Referential Integrity
25.6.3 Behavioral Design
Object-Oriented Analysis and Design with UML
25.7.1 UML Diagrams
25.7.2 Usage of UML in the Methodology for Database Design
804
809
814
814
815
816
818
819
820
822
823
824
825
826
827
828
830
Chapter Summary
Review Questions
Exercises
844
845
846
Object-Oriented DBMSs – Concepts
847
Introduction to Object-Oriented Data Models and OODBMSs
26.1.1 Definition of Object-Oriented DBMSs
26.1.2 Functional Data Models
26.1.3 Persistent Programming Languages
26.1.4 The Object-Oriented Database System Manifesto
26.1.5 Alternative Strategies for Developing an OODBMS
849
849
850
854
857
859
www.it-ebooks.info
830
831
834
836
837
842