Database systems: the complete book
Gespeichert in:
Hauptverfasser: | , , |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Upper Saddle River, NJ
Prentice Hall
2009
|
Ausgabe: | 2. ed., internat. ed. |
Schriftenreihe: | Pearson International edition
|
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | XXXVI, 1203 S. Ill. |
ISBN: | 0131354280 9780131354289 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV035145313 | ||
003 | DE-604 | ||
005 | 20110621 | ||
007 | t | ||
008 | 081106s2009 a||| |||| 00||| eng d | ||
020 | |a 0131354280 |9 0-13-135428-0 | ||
020 | |a 9780131354289 |9 978-0-13-135428-9 | ||
035 | |a (OCoLC)316129454 | ||
035 | |a (DE-599)BVBBV035145313 | ||
040 | |a DE-604 |b ger |e rakwb | ||
041 | 0 | |a eng | |
049 | |a DE-29T |a DE-859 |a DE-703 |a DE-83 |a DE-384 |a DE-2070s |a DE-861 |a DE-91G |a DE-355 |a DE-898 | ||
084 | |a ST 270 |0 (DE-625)143638: |2 rvk | ||
084 | |a ST 271 |0 (DE-625)143639: |2 rvk | ||
084 | |a DAT 650f |2 stub | ||
100 | 1 | |a Garcia-Molina, Hector |e Verfasser |4 aut | |
245 | 1 | 0 | |a Database systems |b the complete book |c Hector Garcia-Molina ; Jeffrey D. Ullman ; Jennifer Widom |
250 | |a 2. ed., internat. ed. | ||
264 | 1 | |a Upper Saddle River, NJ |b Prentice Hall |c 2009 | |
300 | |a XXXVI, 1203 S. |b Ill. | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
490 | 0 | |a Pearson International edition | |
650 | 0 | 7 | |a Datenbanksystem |0 (DE-588)4113276-2 |2 gnd |9 rswk-swf |
655 | 7 | |0 (DE-588)4123623-3 |a Lehrbuch |2 gnd-content | |
689 | 0 | 0 | |a Datenbanksystem |0 (DE-588)4113276-2 |D s |
689 | 0 | |5 DE-604 | |
700 | 1 | |a Ullman, Jeffrey D. |d 1942- |e Verfasser |0 (DE-588)123598230 |4 aut | |
700 | 1 | |a Widom, Jennifer |e Verfasser |4 aut | |
856 | 4 | 2 | |m GBV Datenaustausch |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=016812633&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-016812633 |
Datensatz im Suchindex
_version_ | 1804138131766640640 |
---|---|
adam_text | DATABASE SYSTEMS THE COMPLETE BOOK SECOND EDITION HECTOR GARCIA-MOLINA
JEFFREY D. UHMAN JENNIFER WIDOM DEPARTMENT OF COMPUTER SCIENCE STANFORD
UNIVERSITY PEARSON PRENTICE HALL PEARSON EDUCATION INTERNATIONAL TABLE
OF CONTENTS 1 THE WORLDS OF DATABASE SYSTEMS 1 1.1 THE EVOLUTION OF
DATABASE SYSTEMS 1 1.1.1 EARLY DATABASE MANAGEMENT SYSTEMS 2 1.1.2
RELATIONAL DATABASE SYSTEMS 3 1.1.3 SMALLER AND SMALLER SYSTEMS 3 1.1.4
BIGGER AND BIGGER SYSTEMS 4 1.1.5 INFORMATION INTEGRATION 4 1.2 OVERVIEW
OF A DATABASE MANAGEMENT SYSTEM 5 1.2.1 DATA-DEFINITION LANGUAGE
COMMANDS 5 1.2.2 OVERVIEW OF QUERY PROCESSING 5 1.2.3 STORAGE AND BUFFER
MANAGEMENT 7 1.2.4 TRANSACTION PROCESSING 8 1.2.5 THE QUERY PROCESSOR 9
1.3 OUTLINE OF DATABASE-SYSTEM STUDIES 10 1.4 REFERENCES FOR CHAPTER 1
12 1 RELATIONAL DATABASE MODELING 15 2 THE RELATIONAL MODEL OF DATA 17
2.1 AN OVERVIEW OF DATA MODELS 17 2.1.1 WHAT IS A DATA MODEL? 17 2.1.2
IMPORTANT DATA MODELS 18 2.1.3 THE RELATIONAL MODEL IN BRIEF 18 2.1.4
THE SEMISTRUCTURED MODEL IN BRIEF 19 2.1.5 OTHER DATA MODELS 20 2.1.6
COMPARISON OF MODELING APPROACHES 21 2.2 BASICS OF THE RELATIONAL MODEL
21 2.2.1 ATTRIBUTES 22 2.2.2 SCHEMAS 22 2.2.3 TUPLES 22 2.2.4 DOMAINS 23
2.2.5 EQUIVALENT REPRESENTATIONS OF A RELATION 23 XIII XIV TABLE OF
CONTENTS 2.2.6 RELATION INSTANCES 24 2.2.7 KEYS OF RELATIONS 25 2.2.8 AN
EXAMPLE DATABASE SCHEMA 26 2.2.9 EXERCISES FOR SECTION 2.2 28 2.3
DEFINING A RELATION SCHEMA IN SQL 29 2.3.1 RELATIONS IN SQL 29 2.3.2
DATA TYPES 30 2.3.3 SIMPLE TABLE DECLARATIONS 31 2.3.4 MODIFYING
RELATION SCHEMAS 33 2.3.5 DEFAULT VALUES 34 2.3.6 DECLARING KEYS 34
2.3.7 EXERCISES FOR SECTION 2.3 36 2.4 AN ALGEBRAIC QUERY LANGUAGE 38
2.4.1 WHY DO WE NEED A SPECIAL QUERY LANGUAGE? 38 2.4.2 W T HAT IS AN
ALGEBRA? 38 2.4.3 OVERVIEW OF RELATIONAL ALGEBRA 39 2.4.4 SET OPERATIONS
ON RELATIONS 39 2.4.5 PROJECTION 41 2.4.6 SELECTION 42 2.4.7 CARTESIAN
PRODUCT 43 2.4.8 NATURAL JOINS 43 2.4.9 THETA-JOINS 45 2.4.10 COMBINING
OPERATIONS TO FORM QUERIES 47 2.4.11 NAMING AND RENAMING 49 2.4.12
RELATIONSHIPS AMONG OPERATIONS 50 2.4.13 A LINEAR NOTATION FOR ALGEBRAIC
EXPRESSIONS 51 2.4.14 EXERCISES FOR SECTION 2.4 52 2.5 CONSTRAINTS ON
RELATIONS 58 2.5.1 RELATIONAL ALGEBRA AS A CONSTRAINT LANGUAGE 59 2.5.2
REFERENTIAL INTEGRITY CONSTRAINTS 59 2.5.3 KEY CONSTRAINTS 60 2.5.4
ADDITIONAL CONSTRAINT EXAMPLES 61 2.5.5 EXERCISES FOR SECTION 2.5 62 2.6
SUMMARY OF CHAPTER 2 63 2.7 REFERENCES FOR CHAPTER 2 65 3 DESIGN THEORY
FOR RELATIONAL DATABASES 67 3.1 FUNCTIONAL DEPENDENCIES 67 3.1.1
DEFINITION OF FUNCTIONAL DEPENDENCY 68 3.1.2 KEYS OF RELATIONS 70 3.1.3
SUPERKEYS 71 3.1.4 EXERCISES FOR SECTION 3.1 71 3.2 RULES ABOUT
FUNCTIONAL DEPENDENCIES 72 3.2.1 REASONING ABOUT FUNCTIONAL DEPENDENCIES
72 3.2.2 THE SPLITTING/COMBINING RULE 73 TABLE OF CONTENTS XV 3.2.3
TRIVIAL FUNCTIONAL DEPENDENCIES 74 3.2.4 COMPUTING THE CLOSURE OF
ATTRIBUTES 75 3.2.5 WHY THE CLOSURE ALGORITHM WORKS 77 3.2.6 THE
TRANSITIVE RULE 79 3.2.7 CLOSING SETS OF FUNCTIONAL DEPENDENCIES 80
3.2.8 PROJECTING FUNCTIONAL DEPENDENCIES 81 3.2.9 EXERCISES FOR SECTION
3.2 83 3.3 DESIGN OF RELATIONAL DATABASE SCHEMAS 85 3.3.1 ANOMALIES 86
3.3.2 DECOMPOSING RELATIONS 86 3.3.3 BOYCE-CODD NORMAL FORM 88 3.3.4
DECOMPOSITION INTO BCNF 89 3.3.5 EXERCISES FOR SECTION 3.3 92 3.4
DECOMPOSITION: THE GOOD, BAD, AND UGLY 93 3.4.1 RECOVERING INFORMATION
FROM A DECOMPOSITION 94 3.4.2 THE CHASE TEST FOR LOSSLESS JOIN 96 3.4.3
WHY THE CHASE WORKS 99 3.4.4 DEPENDENCY PRESERVATION 100 3.4.5 EXERCISES
FOR SECTION 3.4 102 3.5 THIRD NORMAL FORM 102 3.5.1 DEFINITION OF THIRD
NORMAL FORM 102 3.5.2 THE SYNTHESIS ALGORITHM FOR 3NF SCHEMAS 103 3.5.3
WHY THE 3NF SYNTHESIS ALGORITHM WORKS 104 3.5.4 EXERCISES FOR SECTION
3.5 105 3.6 MULTIVALUED DEPENDENCIES 105 3.6.1 ATTRIBUTE INDEPENDENCE
AND ITS CONSEQUENT REDUNDANCY 106 3.6.2 DEFINITION OF MULTIVALUED
DEPENDENCIES 107 3.6.3 REASONING ABOUT MULTIVALUED DEPENDENCIES 108
3.6.4 FOURTH NORMAL FORM 110 3.6.5 DECOMPOSITION INTO FOURTH NORMAL FORM
ILL 3.6.6 RELATIONSHIPS AMONG NORMAL FORMS 113 3.6.7 EXERCISES FOR
SECTION 3.6 113 3.7 AN ALGORITHM FOR DISCOVERING MVD S 115 3.7.1 THE
CLOSURE AND THE CHASE 115 3.7.2 EXTENDING THE CHASE TO MVD S 116 3.7.3
WHY THE CHASE WORKS FOR MVD S 118 3.7.4 PROJECTING MVD S 119 3.7.5
EXERCISES FOR SECTION 3.7 120 3.8 SUMMARY OF CHAPTER 3 121 3.9
REFERENCES FOR CHAPTER 3 122 XVI TABLE OF CONTENTS 4 HIGH-LEVEL DATABASE
MODELS 125 4.1 THE ENTITY/RELATIONSHIP MODEL 126 4.1.1 ENTITY SETS 126
4.1.2 ATTRIBUTES 126 4.1.3 RELATIONSHIPS 127 4.1.4 ENTITY-RELATIONSHIP
DIAGRAMS 127 4.1.5 INSTANCES OF AN E/R DIAGRAM 128 4.1.6 MULTIPLICITY OF
BINARY E/R RELATIONSHIPS 129 4.1.7 MULTIWAY RELATIONSHIPS 130 4.1.8
ROLES IN RELATIONSHIPS 131 4.1.9 ATTRIBUTES ON RELATIONSHIPS 134 4.1.10
CONVERTING MULTIWAY RELATIONSHIPS TO BINARY 134 4.1.11 SUBCLASSES IN THE
E/R MODEL 135 4.1.12 EXERCISES FOR SECTION 4.1 138 4.2 DESIGN PRINCIPLES
140 4.2.1 FAITHFULNESS 140 4.2.2 AVOIDING REDUNDANCY 141 4.2.3
SIMPLICITY COUNTS 142 4.2.4 CHOOSING THE RIGHT RELATIONSHIPS 142 4.2.5
PICKING THE RIGHT KIND OF ELEMENT 144 4.2.6 EXERCISES FOR SECTION 4.2
145 4.3 CONSTRAINTS IN THE E/R MODEL 148 4.3.1 KEYS IN THE E/R MODEL 148
4.3.2 REPRESENTING KEYS IN THE E/R MODEL 149 4.3.3 REFERENTIAL INTEGRITY
150 4.3.4 DEGREE CONSTRAINTS 151 4.3.5 EXERCISES FOR SECTION 4.3 151 4.4
WEAK ENTITY SETS 152 4.4.1 CAUSES OF WEAK ENTITY SETS 152 4.4.2
REQUIREMENTS FOR WEAK ENTITY SETS 153 4.4.3 WEAK ENTITY SET NOTATION 155
4.4.4 EXERCISES FOR SECTION 4.4 156 4.5 FROM E/R DIAGRAMS TO RELATIONAL
DESIGNS 157 4.5.1 FROM ENTITY SETS TO RELATIONS 157 4.5.2 FROM E/R
RELATIONSHIPS TO RELATIONS 158 4.5.3 COMBINING RELATIONS 160 4.5.4
HANDLING WEAK ENTITY SETS 161 4.5.5 EXERCISES FOR SECTION 4.5 163 4.6
CONVERTING SUBCLASS STRUCTURES TO RELATIONS 165 4.6.1 E/R-STYLE
CONVERSION 166 4.6.2 AN OBJECT-ORIENTED APPROACH 167 4.6.3 USING NULL
VALUES TO COMBINE RELATIONS 168 4.6.4 COMPARISON OF APPROACHES 169 4.6.5
EXERCISES FOR SECTION 4.6 171 4.7 UNIFIED MODELING LANGUAGE 171 TABLE OF
CONTENTS XVII 4.7.1 UML CLASSES 172 4.7.2 KEYS FOR UML CLASSES 173 4.7.3
ASSOCIATIONS 173 4.7.4 SELF-ASSOCIATIONS 175 4.7.5 ASSOCIATION CLASSES
175 4.7.6 SUBCLASSES IN UML 176 4.7.7 AGGREGATIONS AND COMPOSITIONS 177
4.7.8 EXERCISES FOR SECTION 4.7 179 4.8 FROM UML DIAGRAMS TO RELATIONS
179 4.8.1 UML-TO-RELATIONS BASICS 179 4.8.2 FROM UML SUBCLASSES TO
RELATIONS 180 4.8.3 FROM AGGREGATIONS AND COMPOSITIONS TO RELATIONS . .
. . 181 4.8.4 THE UML ANALOG OF WEAK ENTITY SETS 181 4.8.5 EXERCISES FOR
SECTION 4.8 183 4.9 OBJECT DEFINITION LANGUAGE 183 4.9.1 CLASS
DECLARATIONS 184 4.9.2 ATTRIBUTES IN ODL 184 4.9.3 RELATIONSHIPS IN ODL
185 4.9.4 INVERSE RELATIONSHIPS 186 4.9.5 MULTIPLICITY OF RELATIONSHIPS
186 4.9.6 TYPES IN ODL 188 4.9.7 SUBCLASSES IN ODL 190 4.9.8 DECLARING
KEYS IN ODL 191 4.9.9 EXERCISES FOR SECTION 4.9 192 4.10 FROM ODL
DESIGNS TO RELATIONAL DESIGNS 193 4.10.1 FROM ODL CLASSES TO RELATIONS
193 4.10.2 COMPLEX ATTRIBUTES IN CLASSES 194 4.10.3 REPRESENTING
SET-VALUED ATTRIBUTES 195 4.10.4 REPRESENTING OTHER TYPE CONSTRUCTORS
196 4.10.5 REPRESENTING ODL RELATIONSHIPS 198 4.10.6 EXERCISES FOR
SECTION 4.10 198 4.11 SUMMARY OF CHAPTER 4 200 4.12 REFERENCES FOR
CHAPTER 4 202 II RELATIONAL DATABASE PROGRAMMING 203 5 ALGEBRAIC AND
LOGICAL QUERY LANGUAGES 205 5.1 RELATIONAL OPERATIONS ON BAGS 205 5.1.1
WHY BAGS? 206 5.1.2 UNION, INTERSECTION, AND DIFFERENCE OF BAGS 207
5.1.3 PROJECTION OF BAGS 208 5.1.4 SELECTION ON BAGS 209 5.1.5 PRODUCT
OF BAGS 210 5.1.6 JOINS OF BAGS 210 XVLLL TABLE OF CONTENTS 5.1.7
EXERCISES FOR SECTION 5.1 212 5.2 EXTENDED OPERATORS OF RELATIONAL
ALGEBRA 213 5.2.1 DUPLICATE ELIMINATION 214 5.2.2 AGGREGATION OPERATORS
214 5.2.3 GROUPING 215 5.2.4 THE GROUPING OPERATOR 216 5.2.5 EXTENDING
THE PROJECTION OPERATOR 217 5.2.6 THE SORTING OPERATOR 219 5.2.7
OUTERJOINS 219 5.2.8 EXERCISES FOR SECTION 5.2 222 5.3 A LOGIC FOR
RELATIONS 222 5.3.1 PREDICATES AND ATOMS 223 5.3.2 ARITHMETIC ATOMS 223
5.3.3 DATALOG RULES AND QUERIES 224 5.3.4 MEANING OF DATALOG RULES 225
5.3.5 EXTENSIONAL AND INTENSIONAL PREDICATES 228 5.3.6 DATALOG RULES
APPLIED TO BAGS 228 5.3.7 EXERCISES FOR SECTION 5.3 230 5.4 RELATIONAL
ALGEBRA AND DATALOG 230 5.4.1 BOOLEAN OPERATIONS 231 5.4.2 PROJECTION
232 5.4.3 SELECTION 232 5.4.4 PRODUCT 235 5.4.5 JOINS 235 5.4.6
SIMULATING MULTIPLE OPERATIONS WITH DATALOG 236 5.4.7 COMPARISON BETWEEN
DATALOG AND RELATIONAL ALGEBRA . . 238 5.4.8 EXERCISES FOR SECTION 5.4
238 5.5 SUMMARY OF CHAPTER 5 240 5.6 REFERENCES FOR CHAPTER 5 241 6 THE
DATABASE LANGUAGE SQL 243 6.1 SIMPLE QUERIES IN SQL 244 6.1.1 PROJECTION
IN SQL 246 6.1.2 SELECTION IN SQL 248 6.1.3 COMPARISON OF STRINGS 250
6.1.4 PATTERN MATCHING IN SQL 250 6.1.5 DATES AND TIMES 251 6.1.6 NULL
VALUES AND COMPARISONS INVOLVING NULL 252 6.1.7 THE TRUTH-VALUE UNKNOWN
253 6.1.8 ORDERING THE OUTPUT 255 6.1.9 EXERCISES FOR SECTION 6.1 256
6.2 QUERIES INVOLVING MORE THAN ONE RELATION 258 6.2.1 PRODUCTS AND
JOINS IN SQL 259 6.2.2 DISAMBIGUATING ATTRIBUTES 260 6.2.3 TUPLE
VARIABLES 261 TABLE OF CONTENTS XIX 6.2.4 INTERPRETING MULTIRELATION
QUERIES 262 6.2.5 UNION, INTERSECTION, AND DIFFERENCE OF QUERIES 265
6.2.6 EXERCISES FOR SECTION 6.2 267 6.3 SUBQUERIES 268 6.3.1 SUBQUERIES
THAT PRODUCE SCALAR VALUES 269 6.3.2 CONDITIONS INVOLVING RELATIONS 270
6.3.3 CONDITIONS INVOLVING TUPLES 271 6.3.4 CORRELATED SUBQUERIES 273
6.3.5 SUBQUERIES IN FROM CLAUSES 274 6.3.6 SQL JOIN EXPRESSIONS 275
6.3.7 NATURAL JOINS 276 6.3.8 OUTERJOINS 277 6.3.9 EXERCISES FOR SECTION
6.3 279 6.4 FULL-RELATION OPERATIONS 281 6.4.1 ELIMINATING DUPLICATES
281 6.4.2 DUPLICATES IN UNIONS, INTERSECTIONS, AND DIFFERENCES . . . 282
6.4.3 GROUPING AND AGGREGATION IN SQL 283 6.4.4 AGGREGATION OPERATORS
284 6.4.5 GROUPING 285 6.4.6 GROUPING, AGGREGATION, AND NULLS 287 6.4.7
HAVING CLAUSES 288 6.4.8 EXERCISES FOR SECTION 6.4 289 6.5 DATABASE
MODIFICATIONS 291 6.5.1 INSERTION 291 6.5.2 DELETION 292 6.5.3 UPDATES
294 6.5.4 EXERCISES FOR SECTION 6.5 295 6.6 TRANSACTIONS IN SQL 296
6.6.1 SERIALIZABILITY 296 6.6.2 ATOMICITY 298 6.6.3 TRANSACTIONS 299
6.6.4 READ-ONLY TRANSACTIONS 300 6.6.5 DIRTY READS 302 6.6.6 OTHER
ISOLATION LEVELS 304 6.6.7 EXERCISES FOR SECTION 6.6 306 6.7 SUMMARY OF
CHAPTER 6 307 6.8 REFERENCES FOR CHAPTER 6 308 7 CONSTRAINTS AND
TRIGGERS 311 7.1 KEYS AND FOREIGN KEYS 311 7.1.1 DECLARING FOREIGN-KEY
CONSTRAINTS 312 7.1.2 MAINTAINING REFERENTIAL INTEGRITY 313 7.1.3
DEFERRED CHECKING OF CONSTRAINTS 315 7.1.4 EXERCISES FOR SECTION 7.1 318
7.2 CONSTRAINTS ON ATTRIBUTES AND TUPLES 319 XX TABLE OF CONTENTS 7.2.1
NOT-NULL CONSTRAINTS 319 7.2.2 ATTRIBUTE-BASED CHECK CONSTRAINTS 320
7.2.3 TUPLE-BASED CHECK CONSTRAINTS 321 7.2.4 COMPARISON OF TUPLE- AND
ATTRIBUTE-BASED CONSTRAINTS . 323 7.2.5 EXERCISES FOR SECTION 7.2 323
7.3 MODIFICATION OF CONSTRAINTS 325 7.3.1 GIVING NAMES TO CONSTRAINTS
325 7.3.2 ALTERING CONSTRAINTS ON TABLES 326 7.3.3 EXERCISES FOR SECTION
7.3 327 7.4 ASSERTIONS 328 7.4.1 CREATING ASSERTIONS 328 7.4.2 USING
ASSERTIONS 329 7.4.3 EXERCISES FOR SECTION 7.4 330 7.5 TRIGGERS 332
7.5.1 TRIGGERS IN SQL 332 7.5.2 THE OPTIONS FOR TRIGGER DESIGN 334 7.5.3
EXERCISES FOR SECTION 7.5 337 7.6 SUMMARY OF CHAPTER 7 339 7.7
REFERENCES FOR CHAPTER 7 339 8 VIEWS AND INDEXES 341 8.1 VIRTUAL VIEWS
341 8.1.1 DECLARING VIEWS 341 8.1.2 QUERYING VIEWS 343 8.1.3 RENAMING
ATTRIBUTES 343 8.1.4 EXERCISES FOR SECTION 8.1 344 8.2 MODIFYING VIEWS
344 8.2.1 VIEW REMOVAL 345 8.2.2 UPDATABLE VIEWS 345 8.2.3 INSTEAD-OF
TRIGGERS ON VIEWS 347 8.2.4 EXERCISES FOR SECTION 8.2 349 8.3 INDEXES IN
SQL 350 8.3.1 MOTIVATION FOR INDEXES 350 8.3.2 DECLARING INDEXES 351
8.3.3 EXERCISES FOR SECTION 8.3 352 8.4 SELECTION OF INDEXES 352 8.4.1 A
SIMPLE COST MODEL 352 8.4.2 SOME USEFUL INDEXES 353 8.4.3 CALCULATING
THE BEST INDEXES TO CREATE 355 8.4.4 AUTOMATIC SELECTION OF INDEXES TO
CREATE 357 8.4.5 EXERCISES FOR SECTION 8.4 359 8.5 MATERIALIZED VIEWS
359 8.5.1 MAINTAINING A MATERIALIZED VIEW 360 8.5.2 PERIODIC MAINTENANCE
OF MATERIALIZED VIEWS 362 8.5.3 REWRITING QUERIES TO USE MATERIALIZED
VIEWS 362 TABLE OF CONTENTS XXI 8.5.4 AUTOMATIC CREATION OF MATERIALIZED
VIEWS 364 8.5.5 EXERCISES FOR SECTION 8.5 365 8.6 SUMMARY OF CHAPTER 8
366 8.7 REFERENCES FOR CHAPTER 8 367 9 SQL IN A SERVER ENVIRONMENT 369
9.1 THE THREE-TIER ARCHITECTURE 369 9.1.1 THE WEB-SERVER TIER 370 9.1.2
THE APPLICATION TIER 371 9.1.3 THE DATABASE TIER 372 9.2 THE SQL
ENVIRONMENT 372 9.2.1 ENVIRONMENTS 373 9.2.2 SCHEMAS 374 9.2.3 CATALOGS
375 9.2.4 CLIENTS AND SERVERS IN THE SQL ENVIRONMENT 375 9.2.5
CONNECTIONS 376 9.2.6 SESSIONS 377 9.2.7 MODULES 378 9.3 THE
SQL/HOST-LANGUAGE INTERFACE 378 9.3.1 THE IMPEDANCE MISMATCH PROBLEM 380
9.3.2 CONNECTING SQL TO THE HOST LANGUAGE 380 9.3.3 THE DECLARE SECTION
381 9.3.4 USING SHARED VARIABLES 382 9.3.5 SINGLE-ROW SELECT STATEMENTS
383 9.3.6 CURSORS 383 9.3.7 MODIFICATIONS BY CURSOR 386 9.3.8 PROTECTING
AGAINST CONCURRENT UPDATES 387 9.3.9 DYNAMIC SQL 388 9.3.10 EXERCISES
FOR SECTION 9.3 390 9.4 STORED PROCEDURES 391 9.4.1 CREATING PSM
FUNCTIONS AND PROCEDURES 391 9.4.2 SOME SIMPLE STATEMENT FORMS IN PSM
392 9.4.3 BRANCHING STATEMENTS 394 9.4.4 QUERIES IN PSM 395 9.4.5 LOOPS
IN PSM 396 9.4.6 FOR-LOOPS 398 9.4.7 EXCEPTIONS IN PSM 400 9.4.8 USING
PSM FUNCTIONS AND PROCEDURES 402 9.4.9 EXERCISES FOR SECTION 9.4 402 9.5
USING A CALL-LEVEL INTERFACE 404 9.5.1 INTRODUCTION TO SQL/CLI 405 9.5.2
PROCESSING STATEMENTS 407 9.5.3 FETCHING DATA FROM A QUERY RESULT 408
9.5.4 PASSING PARAMETERS TO QUERIES 410 9.5.5 EXERCISES FOR SECTION 9.5
412 XXII TABLE OF CONTENTS 9.6 JDBC 412 9.6.1 INTRODUCTION TO JDBC 412
9.6.2 CREATING STATEMENTS IN JDBC 413 9.6.3 CURSOR OPERATIONS IN JDBC
415 9.6.4 PARAMETER PASSING 416 9.6.5 EXERCISES FOR SECTION 9.6 416 9.7
PHP 416 9.7.1 PHP BASICS 417 9.7.2 ARRAYS 418 9.7.3 THE PEAR DB LIBRARY
419 9.7.4 CREATING A DATABASE CONNECTION USING DB 419 9.7.5 EXECUTING
SQL STATEMENTS 419 9.7.6 CURSOR OPERATIONS IN PHP 420 9.7.7 DYNAMIC SQL
IN PHP 421 9.7.8 EXERCISES FOR SECTION 9.7 422 9.8 SUMMARY OF CHAPTER 9
422 9.9 REFERENCES FOR CHAPTER 9 423 10 ADVANCED TOPICS IN RELATIONAL
DATABASES 425 10.1 SECURITY AND USER AUTHORIZATION IN SQL 425 10.1.1
PRIVILEGES 426 10.1.2 CREATING PRIVILEGES 427 10.1.3 THE
PRIVILEGE-CHECKING PROCESS 428 10.1.4 GRANTING PRIVILEGES 430 10.1.5
GRANT DIAGRAMS 431 10.1.6 REVOKING PRIVILEGES 433 10.1.7 EXERCISES FOR
SECTION 10.1 436 10.2 RECURSION IN SQL 437 10.2.1 DEFINING RECURSIVE
RELATIONS IN SQL 437 10.2.2 PROBLEMATIC EXPRESSIONS IN RECURSIVE SQL 440
10.2.3 EXERCISES FOR SECTION 10.2 443 10.3 THE OBJECT-RELATIONAL MODEL
445 10.3.1 FROM RELATIONS TO OBJECT-RELATIONS 445 10.3.2 NESTED
RELATIONS 446 10.3.3 REFERENCES 447 10.3.4 OBJECT-ORIENTED VERSUS
OBJECT-RELATIONAL 449 10.3.5 EXERCISES FOR SECTION 10.3 450 10.4
USER-DEFINED TYPOS IN SQL 451 10.4.1 DEFINING TYPES IN SQL 451 10.4.2
METHOD DECLARATIONS IN UDT S 452 10.4.3 METHOD DEFINITIONS 453 10.4.4
DECLARING RELATIONS WITH A UDT 454 10.4.5 REFERENCES 454 10.4.6 CREATING
OBJECT ID S FOR TABLES 455 10.4.7 EXERCISES FOR SECTION 10.4 457 TABLE
OF CONTENTS XXIII 10.5 OPERATIONS ON OBJECT-RELATIONAL DATA 457 10.5.1
FOLLOWING REFERENCES 457 10.5.2 ACCESSING COMPONENTS OF TUPLES WITH A
UDT 458 10.5.3 GENERATOR AND MUTATOR FUNCTIONS 460 10.5.4 ORDERING
RELATIONSHIPS ON UDT S 461 10.5.5 EXERCISES FOR SECTION 10.5 463 10.6
ON-LINE ANALYTIC PROCESSING 464 10.6.1 OLAP AND DATA WAREHOUSES 465
10.6.2 OLAP APPLICATIONS 465 10.6.3 A MULTIDIMENSIONAL VIEW OF OLAP DATA
466 10.6.4 STAR SCHEMAS 467 10.6.5 SLICING AND DICING 469 10.6.6
EXERCISES FOR SECTION 10.6 472 10.7 DATA CUBES 473 10.7.1 THE CUBE
OPERATOR 473 10.7.2 THE CUBE OPERATOR IN SQL 475 10.7.3 EXERCISES FOR
SECTION 10.7 477 10.8 SUMMARY OF CHAPTER 10 478 10.9 REFERENCES FOR
CHAPTER 10 480 III MODELING AND PROGRAMMING FOR SEMISTRUCTURED DATA 481
11 THE SEMISTRUCTURED-DATA MODEL 483 11.1 SEMISTRUCTURED DATA 483 11.1.1
MOTIVATION FOR THE SCMISTRUCTURED-DATA MODEL 483 11.1.2 SEMISTRUCTURED
DATA REPRESENTATION 484 11.1.3 INFORMATION INTEGRATION VIA
SEMISTRUCTURED DATA 486 11.1.4 EXERCISES FOR SECTION 11.1 487 11.2 XML
488 11.2.1 SEMANTIC TAGS 488 11.2.2 XML WITH AND WITHOUT A SCHEMA 489
11.2.3 WELL-FORMED XML 489 11.2.4 ATTRIBUTES 490 11.2.5 ATTRIBUTES THAT
CONNECT ELEMENTS 491 11.2.6 NAMESPACES 493 11.2.7 XML AND DATABASES 493
11.2.8 EXERCISES FOR SECTION 11.2 495 11.3 DOCUMENT TYPE DEFINITIONS 495
11.3.1 THE FORM OF A DTD 495 11.3.2 USING A DTD 499 11.3.3 ATTRIBUTE
LISTS 499 11.3.4 IDENTIFIERS AND REFERENCES 500 11.3.5 EXERCISES FOR
SECTION 11.3 502 XXIV TABLE OF CONTENTS 11.4 XML SCHEMA 502 11.4.1 THE
FORM OF AN XML SCHEMA 502 11.4.2 ELEMENTS 503 11.4.3 COMPLEX TYPES 504
11.4.4 ATTRIBUTES 506 11.4.5 RESTRICTED SIMPLE TYPES 507 11.4.6 KEYS IN
XML SCHEMA 509 11.4.7 FOREIGN KEYS IN XML SCHEMA 510 11.4.8 EXERCISES
FOR SECTION 11.4 512 11.5 SUMMARY OF CHAPTER 11 514 11.6 REFERENCES FOR
CHAPTER 11 515 12 PROGRAMMING LANGUAGES FOR XML 517 12.1 XPATH 517
12.1.1 THE XPATH DATA MODEL 518 12.1.2 DOCUMENT NODES 519 12.1.3 PATH
EXPRESSIONS 519 12.1.4 RELATIVE PATH EXPRESSIONS 521 12.1.5 ATTRIBUTES
IN PATH EXPRESSIONS 521 12.1.6 AXES 521 12.1.7 CONTEXT OF EXPRESSIONS
522 12.1.8 WILDCARDS 523 12.1.9 CONDITIONS IN PATH EXPRESSIONS 523
12.1.LOEXERCISES FOR SECTION 12.1 526 12.2 XQUERY 528 12.2.1 XQUERY
BASICS 530 12.2.2 FLWR EXPRESSIONS 530 12.2.3 REPLACEMENT OF VARIABLES
BY THEIR VALUES 534 12.2.4 JOINS IN XQUERY 536 12.2.5 XQUERY COMPARISON
OPERATORS 537 12.2.6 ELIMINATION OF DUPLICATES 538 12.2.7 QUANTIFICATION
IN XQUERY 539 12.2.8 AGGREGATIONS 540 12.2.9 BRANCHING IN XQUERY
EXPRESSIONS 540 12.2.10 ORDERING THE RESULT OF A QUERY 541 12.2.11
EXERCISES FOR SECTION 12.2 543 12.3 EXTENSIBLE STYLESHEET LANGUAGE 544
12.3.1 XSLT BASICS 544 12.3.2 TEMPLATES 544 12.3.3 OBTAINING VALUES FROM
XML DATA 545 12.3.4 RECURSIVE USE OF TEMPLATES 546 12.3.5 ITERATION IN
XSLT 549 12.3.6 CONDITIONALS IN XSLT 551 12.3.7 EXERCISES FOR SECTION
12.3 551 12.4 SUMMARY OF CHAPTER 12 553 TABLE OF CONTENTS XXV 12.5
REFERENCES FOR CHAPTER 12 554 IV DATABASE SYSTEM IMPLEMENTATION 555 13
SECONDARY STORAGE MANAGEMENT 557 13.1 THE MEMORY HIERARCHY 557 13.1.1
THE MEMORY HIERARCHY 557 13.1.2 TRANSFER OF DATA BETWEEN LEVELS 560
13.1.3 VOLATILE AND NONVOLATILE STORAGE 560 13.1.4 VIRTUAL MEMORY 560
13.1.5 EXERCISES FOR SECTION 13.1 561 13.2 DISKS 562 13.2.1 MECHANICS OF
DISKS 562 13.2.2 THE DISK CONTROLLER 564 13.2.3 DISK ACCESS
CHARACTERISTICS 564 13.2.4 EXERCISES FOR SECTION 13.2 567 13.3
ACCELERATING ACCESS TO SECONDARY STORAGE 568 13.3.1 THE I/O MODEL OF
COMPUTATION 568 13.3.2 ORGANIZING DATA BY CYLINDERS 569 13.3.3 USING
MULTIPLE DISKS 570 13.3.4 MIRRORING DISKS 571 13.3.5 DISK SCHEDULING AND
THE ELEVATOR ALGORITHM 571 13.3.6 PREFETCHING AND LARGE-SCALE BUFFERING
573 13.3.7 EXERCISES FOR SECTION 13.3 573 13.4 DISK FAILURES 575 13.4.1
INTERMITTENT FAILURES 576 13.4.2 CHECKSUMS 576 13.4.3 STABLE STORAGE 577
13.4.4 ERROR-HANDLING CAPABILITIES OF STABLE STORAGE 578 13.4.5 RECOVERY
FROM DISK CRASHES 578 13.4.6 MIRRORING AS A REDUNDANCY TECHNIQUE 579
13.4.7 PARITY BLOCKS 580 13.4.8 AN IMPROVEMENT: RAID 5 583 13.4.9 COPING
WITH MULTIPLE DISK CRASHES 584 13.4.10 EXERCISES FOR SECTION 13.4 587
13.5 ARRANGING DATA ON DISK 590 13.5.1 FIXED-LENGTH RECORDS 590 13.5.2
PACKING FIXED-LENGTH RECORDS INTO BLOCKS 592 13.5.3 EXERCISES FOR
SECTION 13.5 593 13.6 REPRESENTING BLOCK AND RECORD ADDRESSES 593 13.6.1
ADDRESSES IN CLIENT-SERVER SYSTEMS 593 13.6.2 LOGICAL AND STRUCTURED
ADDRESSES 595 13.6.3 POINTER SWIZZLING 596 13.6.4 RETURNING BLOCKS TO
DISK 600 XXVI TABLE OF CONTENTS 13.6.5 PINNED RECORDS AND BLOCKS 600
13.6.6 EXERCISES FOR SECTION 13.6 602 13.7 VARIABLE-LENGTH DATA AND
RECORDS 603 13.7.1 RECORDS WITH VARIABLE-LENGTH FIELDS 604 13.7.2
RECORDS WITH REPEATING FIELDS 605 13.7.3 VARIABLE-FORMAT RECORDS 607
13.7.4 RECORDS THAT DO NOT FIT IN A BLOCK 608 13.7.5 BLOBS 608 13.7.6
COLUMN STORES 609 13.7.7 EXERCISES FOR SECTION 13.7 610 13.8 RECORD
MODIFICATIONS 612 13.8.1 INSERTION 612 13.8.2 DELETION 614 13.8.3 UPDATE
615 13.8.4 EXERCISES FOR SECTION 13.8 615 13.9 SUMMARY OF CHAPTER 13 615
13.10REFERENCES FOR CHAPTER 13 617 14 INDEX STRUCTURES 619 14.1
INDEX-STRUCTURE BASICS 620 14.1.1 SEQUENTIAL FILES 621 14.1.2 DENSE
INDEXES 621 14.1.3 SPARSE INDEXES 622 14.1.4 MULTIPLE LEVELS OF INDEX
623 14.1.5 SECONDARY INDEXES 624 14.1.6 APPLICATIONS OF SECONDARY
INDEXES 625 14.1.7 INDIRECTION IN SECONDARY INDEXES 626 14.1.8 DOCUMENT
RETRIEVAL AND INVERTED INDEXES 628 14.1.9 EXERCISES FOR SECTION 14.1 631
14.2 B-TREES 633 14.2.1 THE STRUCTURE OF B-TREES 634 14.2.2 APPLICATIONS
OF B-TREES 637 14.2.3 LOOKUP IN B-TREES 639 14.2.4 RANGE QUERIES 639
14.2.5 INSERTION INTO B-TREES 640 14.2.6 DELETION FROM B-TREES 642
14.2.7 EFFICIENCY OF B-TREES 645 14.2.8 EXERCISES FOR SECTION 14.2 646
14.3 HASH TABLES 648 14.3.1 SECONDARY-STORAGE HASH TABLES 649 14.3.2
INSERTION INTO A HASH TABLE 649 14.3.3 HASH-TABLE DELETION 650 14.3.4
EFFICIENCY OF HASH TABLE INDEXES 651 14.3.5 EXTENSIBLE HASH TABLES 652
14.3.6 INSERTION INTO EXTENSIBLE HASH TABLES 653 TABLE OF CONTENTS XXVII
14.3.7 LINEAR HASH TABLES 655 14.3.8 INSERTION INTO LINEAR HASH TABLES
657 14.3.9 EXERCISES FOR SECTION 14.3 659 14.4 MULTIDIMENSIONAL INDEXES
661 14.4.1 APPLICATIONS OF MULTIDIMENSIONAL INDEXES 661 14.4.2 EXECUTING
RANGE QUERIES USING CONVENTIONAL INDEXES . . 663 14.4.3 EXECUTING
NEAREST-NEIGHBOR QUERIES USING CONVENTIONAL INDEXES 664 14.4.4 OVERVIEW
OF MULTIDIMENSIONAL INDEX STRUCTURES 664 14.5 HASH STRUCTURES FOR
MULTIDIMENSIONAL DATA 665 14.5.1 GRID FILES 665 14.5.2 LOOKUP IN A GRID
FILE 666 14.5.3 INSERTION INTO GRID FILES 667 14.5.4 PERFORMANCE OF GRID
FILES 669 14.5.5 PARTITIONED HASH FUNCTIONS 671 14.5.6 COMPARISON OF
GRID FILES AND PARTITIONED HASHING . . . . 673 14.5.7 EXERCISES FOR
SECTION 14.5 673 14.6 TREE STRUCTURES FOR MULTIDIMENSIONAL DATA 675
14.6.1 MULTIPLE-KEY INDEXES 675 14.6.2 PERFORMANCE OF MULTIPLE-KEY
INDEXES 676 14.6.3 M-TREES 677 14.6.4 OPERATIONS ON KD- TREES 679 14.6.5
ADAPTING FED-TREES TO SECONDARY STORAGE 681 14.6.6 QUAD TREES 681 14.6.7
R-TREES 683 14.6.8 OPERATIONS ON R-TREES 684 14.6.9 EXERCISES FOR
SECTION 14.6 686 14.7 BITMAP INDEXES 688 14.7.1 MOTIVATION FOR BITMAP
INDEXES 689 14.7.2 COMPRESSED BITMAPS 691 14.7.3 OPERATING ON
RUN-LENGTH-ENCODED BIT-VECTORS 693 14.7.4 MANAGING BITMAP INDEXES 693
14.7.5 EXERCISES FOR SECTION 14.7 695 14.8 SUMMARY OF CHAPTER 14 695
14.9 REFERENCES FOR CHAPTER 14 697 15 QUERY EXECUTION 701 15.1
INTRODUCTION TO PHYSICAL-QUERY-PLAN OPERATORS 703 15.1.1 SCANNING TABLES
703 15.1.2 SORTING WHILE SCANNING TABLES 704 15.1.3 THE COMPUTATION
MODEL FOR PHYSICAL OPERATORS 704 15.1.4 PARAMETERS FOR MEASURING COSTS
705 15.1.5 I/O COST FOR SCAN OPERATORS 706 15.1.6 ITERATORS FOR
IMPLEMENTATION OF PHYSICAL OPERATORS .... 707 15.2 ONE-PASS ALGORITHMS
709 TABLE OF CONTENTS 15.2.1 ONE-PASS ALGORITHMS FOR TUPLE-AT-A-TIME
OPERATIONS . . 711 15.2.2 ONE-PASS ALGORITHMS FOR UNARY, FULL-RELATION
OPERATIONS 712 15.2.3 ONE-PASS ALGORITHMS FOR BINARY OPERATIONS 715
15.2.4 EXERCISES FOR SECTION 15.2 718 3 NESTED-LOOP JOINS 718 15.3.1
TUPLE-BASED NESTED-LOOP JOIN 719 15.3.2 AN ITERATOR FOR TUPLE-BASED
NESTED-LOOP JOIN 719 15.3.3 BLOCK-BASED NESTED-LOOP JOIN ALGORITHM 719
15.3.4 ANALYSIS OF NESTED-LOOP JOIN 721 15.3.5 SUMMARY OF ALGORITHMS SO
FAR 722 15.3.6 EXERCISES FOR SECTION 15.3 722 4 TWO-PASS ALGORITHMS
BASED ON SORTING 723 15.4.1 TWO-PHASE, MULTIWAY MERGE-SORT 723 15.4.2
DUPLICATE ELIMINATION USING SORTING 725 15.4.3 GROUPING AND AGGREGATION
USING SORTING 726 15.4.4 A SORT-BASED UNION ALGORITHM 726 15.4.5
SORT-BASED INTERSECTION AND DIFFERENCE 727 15.4.6 A SIMPLE SORT-BASED
JOIN ALGORITHM 728 15.4.7 ANALYSIS OF SIMPLE SORT-JOIN 729 15.4.8 A MORE
EFFICIENT SORT-BASED JOIN 729 15.4.9 SUMMARY OF SORT-BASED ALGORITHMS
730 15.4.10EXERCISESFOR SECTION 15.4 730 5 TWO-PASS ALGORITHMS BASED ON
HASHING 732 15.5.1 PARTITIONING RELATIONS BY HASHING 732 15.5.2 A
HASH-BASED ALGORITHM FOR DUPLICATE ELIMINATION . . . 732 15.5.3
HASH-BASED GROUPING AND AGGREGATION 733 15.5.4 HASH-BASED UNION,
INTERSECTION, AND DIFFERENCE 734 15.5.5 THE HASH-JOIN ALGORITHM 734
15.5.6 SAVING SOME DISK I/O S 735 15.5.7 SUMMARY OF HASH-BASED
ALGORITHMS 737 15.5.8 EXERCISES FOR SECTION 15.5 738 6 INDEX-BASED
ALGORITHMS 739 15.6.1 CLUSTERING AND NONCLUSTERING INDEXES 739 15.6.2
INDEX-BASED SELECTION 740 15.6.3 JOINING BY USING AN INDEX 742 15.6.4
JOINS USING A SORTED INDEX 743 15.6.5 EXERCISES FOR SECTION 15.6 745 7
BUFFER MANAGEMENT 746 15.7.1 BUFFER MANAGEMENT ARCHITECTURE 746 15.7.2
BUFFER MANAGEMENT STRATEGIES 747 15.7.3 THE RELATIONSHIP BETWEEN
PHYSICAL OPERATOR SELECTION AND BUFFER MANAGEMENT 750 15.7.4 EXERCISES
FOR SECTION 15.7 751 8 ALGORITHMS USING MORE THAN TWO PASSES 752 15.8.1
MULTIPASS SORT-BASED ALGORITHMS 752 TABLE OF CONTENTS XXIX 15.8.2
PERFORMANCE OF MULTIPASS, SORT-BASED ALGORITHMS . . . . 753 15.8.3
MULTIPASS HASH-BASED ALGORITHMS 754 15.8.4 PERFORMANCE OF MULTIPASS
HASH-BASED ALGORITHMS . . . . 754 15.8.5 EXERCISES FOR SECTION 15.8 755
15.9 SUMMARY OF CHAPTER 15 756 15.10REFERENCES FOR CHAPTER 15 757 16 THE
QUERY COMPILER 759 16.1 PARSING AND PREPROCESSING 760 16.1.1 SYNTAX
ANALYSIS AND PARSE TREES 760 16.1.2 A GRAMMAR FOR A SIMPLE SUBSET OF SQL
761 16.1.3 THE PREPROCESSOR 764 16.1.4 PREPROCESSING QUERIES INVOLVING
VIEWS 765 16.1.5 EXERCISES FOR SECTION 16.1 767 16.2 ALGEBRAIC LAWS FOR
IMPROVING QUERY PLANS 768 16.2.1 COMMUTATIVE AND ASSOCIATIVE LAWS 768
16.2.2 LAWS INVOLVING SELECTION 770 16.2.3 PUSHING SELECTIONS 772 16.2.4
LAWS INVOLVING PROJECTION 774 16.2.5 LAWS ABOUT JOINS AND PRODUCTS 776
16.2.6 LAWS INVOLVING DUPLICATE ELIMINATION 777 16.2.7 LAWS INVOLVING
GROUPING AND AGGREGATION 777 16.2.8 EXERCISES FOR SECTION 16.2 780 16.3
FROM PARSE TREES TO LOGICAL QUERY PLANS 781 16.3.1 CONVERSION TO
RELATIONAL ALGEBRA 782 16.3.2 REMOVING SUBQUERIES FROM CONDITIONS 783
16.3.3 IMPROVING THE LOGICAL QUERY PLAN 788 16.3.4 GROUPING
ASSOCIATIVE/COMMUTATIVE OPERATORS 790 16.3.5 EXERCISES FOR SECTION 16.3
791 16.4 ESTIMATING THE COST OF OPERATIONS 792 16.4.1 ESTIMATING SIZES
OF INTERMEDIATE RELATIONS 793 16.4.2 ESTIMATING THE SIZE OF A PROJECTION
794 16.4.3 ESTIMATING THE SIZE OF A SELECTION 794 16.4.4 ESTIMATING THE
SIZE OF A JOIN 797 16.4.5 NATURAL JOINS WITH MULTIPLE JOIN ATTRIBUTES
799 16.4.6 JOINS OF MANY RELATIONS 800 16.4.7 ESTIMATING SIZES FOR OTHER
OPERATIONS 801 16.4.8 EXERCISES FOR SECTION 16.4 802 16.5 INTRODUCTION
TO COST-BASED PLAN SELECTION 803 16.5.1 OBTAINING ESTIMATES FOR SIZE
PARAMETERS 804 16.5.2 COMPUTATION OF STATISTICS 807 16.5.3 HEURISTICS
FOR REDUCING THE COST OF LOGICAL QUERY PLANS . 808 16.5.4 APPROACHES TO
ENUMERATING PHYSICAL PLANS 810 16.5.5 EXERCISES FOR SECTION 16.5 813
16.6 CHOOSING AN ORDER FOR JOINS 814 XXX TABLE OF CONTENTS 16.6.1
SIGNIFICANCE OF LEFT AND RIGHT JOIN ARGUMENTS 815 16.6.2 JOIN TREES 815
16.6.3 LEFT-DEEP JOIN TREES 816 16.6.4 DYNAMIC PROGRAMMING TO SELECT A
JOIN ORDER AND GROUPING819 16.6.5 DYNAMIC PROGRAMMING WITH MORE DETAILED
COST FUNCTIONS823 16.6.6 A GREEDY ALGORITHM FOR SELECTING A JOIN ORDER
824 16.6.7 EXERCISES FOR SECTION 16.6 825 16.7 COMPLETING THE
PHYSICAL-QUERY-PLAN 826 16.7.1 CHOOSING A SELECTION METHOD 827 16.7.2
CHOOSING A JOIN METHOD 829 16.7.3 PIPELINING VERSUS MATERIALIZATION 830
16.7.4 PIPELINING UNARY OPERATIONS 830 16.7.5 PIPELINING BINARY
OPERATIONS 830 16.7.6 NOTATION FOR PHYSICAL QUERY PLANS 834 16.7.7
ORDERING OF PHYSICAL OPERATIONS 837 16.7.8 EXERCISES FOR SECTION 16.7
838 16.8 SUMMARY OF CHAPTER 16 839 16.9 REFERENCES FOR CHAPTER 16 841 17
COPING WITH SYSTEM FAILURES 843 17.1 ISSUES AND MODELS FOR RESILIENT
OPERATION 843 17.1.1 FAILURE MODES 844 17.1.2 MORE ABOUT TRANSACTIONS
845 17.1.3 CORRECT EXECUTION OF TRANSACTIONS 846 17.1.4 THE PRIMITIVE
OPERATIONS OF TRANSACTIONS 848 17.1.5 EXERCISES FOR SECTION 17.1 851
17.2 UNDO LOGGING 851 17.2.1 LOG RECORDS 851 17.2.2 THE UNDO-LOGGING
RULES 853 17.2.3 RECOVERY USING UNDO LOGGING 855 17.2.4 CHECKPOINTING
857 17.2.5 NONQUIESCENT CHECKPOINTING 858 17.2.6 EXERCISES FOR SECTION
17.2 862 17.3 REDO LOGGING 863 17.3.1 THE REDO-LOGGING RULE 863 17.3.2
RECOVERY WITH REDO LOGGING 864 17.3.3 CHECKPOINTING A REDO LOG 866
17.3.4 RECOVERY WITH A CHECKPOINTED REDO LOG 867 17.3.5 EXERCISES FOR
SECTION 17.3 868 17.4 UNDO/REDO LOGGING 869 17.4.1 THE UNDO/REDO RULES
870 17.4.2 RECOVERY WITH UNDO/REDO LOGGING 870 17.4.3 CHECKPOINTING AN
UNDO/REDO LOG 872 17.4.4 EXERCISES FOR SECTION 17.4 874 17.5 PROTECTING
AGAINST MEDIA FAILURES 875 TABLE OF CONTENTS XXXI 17.5.1 THE ARCHIVE 875
17.5.2 NONQUIESCENT ARCHIVING 875 17.5.3 RECOVERY USING AN ARCHIVE AND
LOG 878 17.5.4 EXERCISES FOR SECTION 17.5 879 17.6 SUMMARY OF CHAPTER 17
879 17.7 REFERENCES FOR CHAPTER 17 881 18 CONCURRENCY CONTROL 883 18.1
SERIAL AND SERIALIZABLE SCHEDULES 884 18.1.1 SCHEDULES 884 18.1.2 SERIAL
SCHEDULES 885 18.1.3 SERIALIZABLE SCHEDULES 886 18.1.4 THE EFFECT OF
TRANSACTION SEMANTICS 887 18.1.5 A NOTATION FOR TRANSACTIONS AND
SCHEDULES 889 18.1.6 EXERCISES FOR SECTION 18.1 889 18.2
CONFLICT-SERIALIZABILITY 890 18.2.1 CONFLICTS 890 18.2.2 PRECEDENCE
GRAPHS AND A TEST FOR CONFLICT-SERIALIZABILITY 892 18.2.3 WHY THE
PRECEDENCE-GRAPH TEST WORKS 894 18.2.4 EXERCISES FOR SECTION 18.2 895
18.3 ENFORCING SERIALIZABILITY BY LOCKS 897 18.3.1 LOCKS 898 18.3.2 THE
LOCKING SCHEDULER 900 18.3.3 TWO-PHASE LOCKING 900 18.3.4 WHY TWO-PHASE
LOCKING WORKS 901 18.3.5 EXERCISES FOR SECTION 18.3 903 18.4 LOCKING
SYSTEMS WITH SEVERAL LOCK MODES 905 18.4.1 SHARED AND EXCLUSIVE LOCKS
905 18.4.2 COMPATIBILITY MATRICES 907 18.4.3 UPGRADING LOCKS 908 18.4.4
UPDATE LOCKS 909 18.4.5 INCREMENT LOCKS 911 18.4.6 EXERCISES FOR SECTION
18.4 913 18.5 AN ARCHITECTURE FOR A LOCKING SCHEDULER 915 18.5.1 A
SCHEDULER THAT INSERTS LOCK ACTIONS 915 18.5.2 THE LOCK TABLE 918 18.5.3
EXERCISES FOR SECTION 18.5 921 18.6 HIERARCHIES OF DATABASE ELEMENTS 921
18.6.1 LOCKS WITH MULTIPLE GRANULARITY 921 18.6.2 WARNING LOCKS 922
18.6.3 PHANTOMS AND HANDLING INSERTIONS CORRECTLY 926 18.6.4 EXERCISES
FOR SECTION 18.6 927 18.7 THE TREE PROTOCOL 927 18.7.1 MOTIVATION FOR
TREE-BASED LOCKING 927 18.7.2 RULES FOR ACCESS TO TREE-STRUCTURED DATA
928 XXXN TABLE OF CONTENTS 18.7.3 WHY THE TREE PROTOCOL WORKS 929 18.7.4
EXERCISES FOR SECTION 18.7 932 18.8 CONCURRENCY CONTROL BY TIMESTAMPS
933 18.8.1 TIMESTAMPS 934 18.8.2 PHYSICALLY UNREALIZABLE BEHAVIORS 934
18.8.3 PROBLEMS WITH DIRTY DATA 935 18.8.4 THE RULES FOR TIMESTAMP-BASED
SCHEDULING 937 18.8.5 MULTIVERSION TIMESTAMPS 939 18.8.6 TIMESTAMPS
VERSUS LOCKING 941 18.8.7 EXERCISES FOR SECTION 18.8 942 18.9
CONCURRENCY CONTROL BY VALIDATION 942 18.9.1 ARCHITECTURE OF A
VALIDATION-BASED SCHEDULER 942 18.9.2 THE VALIDATION RULES 943 18.9.3
COMPARISON OF THREE CONCURRENCY-CONTROL MECHANISMS . 946 18.9.4
EXERCISES FOR SECTION 18.9 948 18.10SUMMARY OF CHAPTER 18 948
18.11REFERENCES FOR CHAPTER 18 950 19 MORE ABOUT TRANSACTION MANAGEMENT
953 19.1 SERIALIZABILITY AND RECOVERABILITY 953 19.1.1 THE DIRTY-DATA
PROBLEM 954 19.1.2 CASCADING ROLLBACK 955 19.1.3 RECOVERABLE SCHEDULES
956 19.1.4 SCHEDULES THAT AVOID CASCADING ROLLBACK 957 19.1.5 MANAGING
ROLLBACKS USING LOCKING 957 19.1.6 GROUP COMMIT 959 19.1.7 LOGICAL
LOGGING 960 19.1.8 RECOVERY FROM LOGICAL LOGS 963 19.1.9 EXERCISES FOR
SECTION 19.1 965 19.2 DEADLOCKS 966 19.2.1 DEADLOCK DETECTION BY TIMEOUT
967 19.2.2 THE WAITS-FOR GRAPH 967 19.2.3 DEADLOCK PREVENTION BY
ORDERING ELEMENTS 970 19.2.4 DETECTING DEADLOCKS BY TIMESTAMPS 970
19.2.5 COMPARISON OF DEADLOCK-MANAGEMENT METHODS 972 19.2.6 EXERCISES
FOR SECTION 19.2 974 19.3 LONG-DURATION TRANSACTIONS 975 19.3.1 PROBLEMS
OF LONG TRANSACTIONS 976 19.3.2 SAGAS 978 19.3.3 COMPENSATING
TRANSACTIONS 979 19.3.4 WHY COMPENSATING TRANSACTIONS WORK 980 19.3.5
EXERCISES FOR SECTION 19.3 981 19.4 SUMMARY OF CHAPTER 19 982 19.5
REFERENCES FOR CHAPTER 19 983 TABLE OF CONTENTS XXXIII 20 PARALLEL AND
DISTRIBUTED DATABASES 985 20.1 PARALLEL ALGORITHMS ON RELATIONS 985
20.1.1 MODELS OF PARALLELISM 986 20.1.2 TUPLE-AT-A-TIME OPERATIONS IN
PARALLEL 989 20.1.3 PARALLEL ALGORITHMS FOR FULL-RELATION OPERATIONS 989
20.1.4 PERFORMANCE OF PARALLEL ALGORITHMS 990 20.1.5 EXERCISES FOR
SECTION 20.1 993 20.2 THE MAP-REDUCE PARALLELISM FRAMEWORK 993 20.2.1
THE STORAGE MODEL 993 20.2.2 THE MAP FUNCTION 994 20.2.3 THE REDUCE
FUNCTION 995 20.2.4 EXERCISES FOR SECTION 20.2 996 20.3 DISTRIBUTED
DATABASES 997 20.3.1 DISTRIBUTION OF DATA 997 20.3.2 DISTRIBUTED
TRANSACTIONS 998 20.3.3 DATA REPLICATION 999 20.3.4 EXERCISES FOR
SECTION 20.3 1000 20.4 DISTRIBUTED QUERY PROCESSING 1000 20.4.1 THE
DISTRIBUTED JOIN PROBLEM 1000 20.4.2 SEMIJOIN REDUCTIONS 1001 20.4.3
JOINS OF MANY RELATIONS 1002 20.4.4 ACYCLIC HYPERGRAPHS 1003 20.4.5 FULL
REDUCERS FOR ACYCLIC HYPERGRAPHS 1005 20.4.6 WHY THE FULL-REDUCER
ALGORITHM WORKS 1006 20.4.7 EXERCISES FOR SECTION 20.4 1007 20.5
DISTRIBUTED COMMIT 1008 20.5.1 SUPPORTING DISTRIBUTED ATOMICITY 1008
20.5.2 TWO-PHASE COMMIT 1009 20.5.3 RECOVERY OF DISTRIBUTED TRANSACTIONS
1011 20.5.4 EXERCISES FOR SECTION 20.5 1013 20.6 DISTRIBUTED LOCKING
1014 20.6.1 CENTRALIZED LOCK SYSTEMS 1015 20.6.2 A COST MODEL FOR
DISTRIBUTED LOCKING ALGORITHMS .... 1015 20.6.3 LOCKING REPLICATED
ELEMENTS 1016 20.6.4 PRIMARY-COPY LOCKING 1017 20.6.5 GLOBAL LOCKS FROM
LOCAL LOCKS 1017 20.6.6 EXERCISES FOR SECTION 20.6 1019 20.7
PEER-TO-PEER DISTRIBUTED SEARCH 1020 20.7.1 PEER-TO-PEER NETWORKS 1020
20.7.2 THE DISTRIBUTED-HASHING PROBLEM 1021 20.7.3 CENTRALIZED SOLUTIONS
FOR DISTRIBUTED HASHING 1022 20.7.4 CHORD CIRCLES 1022 20.7.5 LINKS IN
CHORD CIRCLES 1024 20.7.6 SEARCH USING FINGER TABLES 1024 20.7.7 ADDING
NEW NODES 1027 XXXIV TABLE OF CONTENTS 20.7.8 WHEN A PEER LEAVES THE
NETWORK 1030 20.7.9 WHEN A PEER FAILS 1030 20.7.10 EXERCISES FOR SECTION
20.7 1031 20.8 SUMMARY OF CHAPTER 20 1031 20.9 REFERENCES FOR CHAPTER 20
1033 V OTHER ISSUES IN MANAGEMENT OF MASSIVE DATA 1035 21 INFORMATION
INTEGRATION 1037 21.1 INTRODUCTION TO INFORMATION INTEGRATION 1037
21.1.1 WHY INFORMATION INTEGRATION? 1038 21.1.2 THE HETEROGENEITY
PROBLEM 1040 21.2 MODES OF INFORMATION INTEGRATION 1041 21.2.1 FEDERATED
DATABASE SYSTEMS 1042 21.2.2 DATA WAREHOUSES 1043 21.2.3 MEDIATORS 1046
21.2.4 EXERCISES FOR SECTION 21.2 1048 21.3 WRAPPERS IN MEDIATOR-BASED
SYSTEMS 1049 21.3.1 TEMPLATES FOR QUERY PATTERNS 1050 21.3.2 WRAPPER
GENERATORS 1051 21.3.3 FILTERS 1052 21.3.4 OTHER OPERATIONS AT THE
WRAPPER 1053 21.3.5 EXERCISES FOR SECTION 21.3 1054 21.4
CAPABILITY-BASED OPTIMIZATION 1056 21.4.1 THE PROBLEM OF LIMITED SOURCE
CAPABILITIES 1056 21.4.2 A NOTATION FOR DESCRIBING SOURCE CAPABILITIES
1057 21.4.3 CAPABILITY-BASED QUERY-PLAN SELECTION 1058 21.4.4 ADDING
COST-BASED OPTIMIZATION 1060 21.4.5 EXERCISES FOR SECTION 21.4 1060 21.5
OPTIMIZING MEDIATOR QUERIES 1061 21.5.1 SIMPLIFIED ADORNMENT NOTATION
1061 21.5.2 OBTAINING ANSWERS FOR SUBGOALS 1062 21.5.3 THE CHAIN
ALGORITHM 1063 21.5.4 INCORPORATING UNION VIEWS AT THE MEDIATOR 1067
21.5.5 EXERCISES FOR SECTION 21.5 1068 21.6 LOCAL-AS-VIEW MEDIATORS 1069
21.6.1 MOTIVATION FOR LAV MEDIATORS 1069 21.6.2 TERMINOLOGY FOR LAV
MEDIATION 1070 21.6.3 EXPANDING SOLUTIONS 1071 21.6.4 CONTAINMENT OF
CONJUNCTIVE QUERIES 1073 21.6.5 WHY THE CONTAINMENT-MAPPING TEST WORKS
1075 21.6.6 FINDING SOLUTIONS TO A MEDIATOR QUERY 1076 21.6.7 WHY THE
LMSS THEOREM HOLDS 1077 21.6.8 EXERCISES FOR SECTION 21.6 1078 TABLE OF
CONTENTS XXXV 21.7 ENTITY RESOLUTION 1078 21.7.1 DECIDING WHETHER
RECORDS REPRESENT A COMMON ENTITY . 1079 21.7.2 MERGING SIMILAR RECORDS
1081 21.7.3 USEFUL PROPERTIES OF SIMILARITY AND MERGE FUNCTIONS . . .
1082 21.7.4 THE R-SWOOSH ALGORITHM FOR 1* AR RECORDS 1083 21.7.5 WHY
R-SWOOSH WORKS 1086 21.7.6 OTHER APPROACHES TO ENTITY RESOLUTION 1086
21.7.7 EXERCISES FOR SECTION 21.7 1087 21.8 SUMMARY OF CHAPTER 21 1089
21.9 REFERENCES FOR CHAPTER 21 1091 22 DATA MINING 1093 22.1
FREQUENT-ITEMSET MINING 1093 22.1.1 THE MARKET-BASKET MODEL 1094 22.1.2
BASIC DEFINITIONS 1095 22.1.3 ASSOCIATION RULES 1097 22.1.4 THE
COMPUTATION MODEL FOR FREQUENT ITEMSETS 1098 22.1.5 EXERCISES FOR
SECTION 22.1 1099 22.2 ALGORITHMS FOR FINDING FREQUENT ITEMSETS 1100
22.2.1 THE DISTRIBUTION OF FREQUENT ITEMSETS 1100 22.2.2 THE NAIVE
ALGORITHM FOR FINDING FREQUENT ITEMSETS . . . 1101 22.2.3 THE A-PRIORI
ALGORITHM 1102 22.2.4 IMPLEMENTATION OF THE A-PRIORI ALGORITHM 1104
22.2.5 MAKING BETTER USE OF MAIN MEMORY 1105 22.2.6 WHEN TO USE THE PCY
ALGORITHM 1106 22.2.7 THE MULTISTAGE ALGORITHM 1107 22.2.8 EXERCISES FOR
SECTION 22.2 1109 22.3 FINDING SIMILAR ITEMS 1110 22.3.1 THE JACCARD
MEASURE OF SIMILARITY 1110 22.3.2 APPLICATIONS OF JACCARD SIMILARITY
1110 22.3.3 MINHASHING 1112 22.3.4 MINHASHING AND JACCARD DISTANCE 1113
22.3.5 WHY MINHASHING WORKS 1113 22.3.6 IMPLEMENTING MINHASHING 1114
22.3.7 EXERCISES FOR SECTION 22.3 1115 22.4 LOCALITY-SENSITIVE HASHING
1116 22.4.1 ENTITY RESOLUTION AS AN EXAMPLE OF LSH 1117 22.4.2
LOCALITY-SENSITIVE HASHING OF SIGNATURES 1118 22.4.3 COMBINING
MINHASHING AND LOCALITY-SENSITIVE HASHING . . 1121 22.4.4 EXERCISES FOR
SECTION 22.4 1122 22.5 CLUSTERING OF LARGE-SCALE DATA 1123 22.5.1
APPLICATIONS OF CLUSTERING 1123 22.5.2 DISTANCE MEASURES 1125 22.5.3
AGGLOMERATIVE CLUSTERING 1128 22.5.4 A;-MEANS ALGORITHMS 1130 XXXVI
TABLE OF CONTENTS 22.5.5 FC-MEANS FOR LARGE-SCALE DATA 1132 22.5.6
PROCESSING A MEMORY LOAD OF POINTS 1133 22.5.7 EXERCISES FOR SECTION
22.5 1136 22.6 SUMMARY OF CHAPTER 22 1137 22.7 REFERENCES FOR CHAPTER 22
1139 23 DATABASE SYSTEMS AN D THE INTERNET 1141 23.1 THE ARCHITECTURE OF
A SEARCH ENGINE 1141 23.1.1 COMPONENTS OF A SEARCH ENGINE 1142 23.1.2
WEB CRAWLERS 1143 23.1.3 QUERY PROCESSING IN SEARCH ENGINES 1146 23.1.4
RANKING PAGES 1146 23.2 PAGERANK FOR IDENTIFYING IMPORTANT PAGES 1147
23.2.1 THE INTUITION BEHIND PAGERANK 1147 23.2.2 RECURSIVE FORMULATION
OF PAGERANK - FIRST TRY 1148 23.2.3 SPIDER TRAPS AND DEAD ENDS 1150
23.2.4 PAGERANK ACCOUNTING FOR SPIDER TRAPS AND DEAD ENDS . 1153 23.2.5
EXERCISES FOR SECTION 23.2 1154 23.3 TOPIC-SPECIFIC PAGERANK 1156 23.3.1
TELEPORT SETS 1156 23.3.2 CALCULATING A TOPIC-SPECIFIC PAGERANK 1158
23.3.3 LINK SPAM 1159 23.3.4 TOPIC-SPECIFIC PAGERANK AND LINK SPAM 1160
23.3.5 EXERCISES FOR SECTION 23.3 1161 23.4 DATA STREAMS 1161 23.4.1
DATA-STREAM-MANAGEMENT SYSTEMS 1162 23.4.2 STREAM APPLICATIONS 1163
23.4.3 A DATA-STREAM DATA MODEL 1164 23.4.4 CONVERTING STREAMS INTO
RELATIONS 1165 23.4.5 CONVERTING RELATIONS INTO STREAMS 1166 23.4.6
EXERCISES FOR SECTION 23.4 1168 23.5 DATA MINING OF STREAMS 1169 23.5.1
MOTIVATION 1169 23.5.2 COUNTING BITS 1171 23.5.3 COUNTING THE NUMBER OF
DISTINCT ELEMENTS 1175 23.5.4 EXERCISES FOR SECTION 23.5 1176 23.6
SUMMARY OF CHAPTER 23 1177 23.7 REFERENCES FOR CHAPTER 23 1179 INDEX
1183
|
adam_txt |
DATABASE SYSTEMS THE COMPLETE BOOK SECOND EDITION HECTOR GARCIA-MOLINA
JEFFREY D. UHMAN JENNIFER WIDOM DEPARTMENT OF COMPUTER SCIENCE STANFORD
UNIVERSITY PEARSON PRENTICE HALL PEARSON EDUCATION INTERNATIONAL TABLE
OF CONTENTS 1 THE WORLDS OF DATABASE SYSTEMS 1 1.1 THE EVOLUTION OF
DATABASE SYSTEMS 1 1.1.1 EARLY DATABASE MANAGEMENT SYSTEMS 2 1.1.2
RELATIONAL DATABASE SYSTEMS 3 1.1.3 SMALLER AND SMALLER SYSTEMS 3 1.1.4
BIGGER AND BIGGER SYSTEMS 4 1.1.5 INFORMATION INTEGRATION 4 1.2 OVERVIEW
OF A DATABASE MANAGEMENT SYSTEM 5 1.2.1 DATA-DEFINITION LANGUAGE
COMMANDS 5 1.2.2 OVERVIEW OF QUERY PROCESSING 5 1.2.3 STORAGE AND BUFFER
MANAGEMENT 7 1.2.4 TRANSACTION PROCESSING 8 1.2.5 THE QUERY PROCESSOR 9
1.3 OUTLINE OF DATABASE-SYSTEM STUDIES 10 1.4 REFERENCES FOR CHAPTER 1
12 1 RELATIONAL DATABASE MODELING 15 2 THE RELATIONAL MODEL OF DATA 17
2.1 AN OVERVIEW OF DATA MODELS 17 2.1.1 WHAT IS A DATA MODEL? 17 2.1.2
IMPORTANT DATA MODELS 18 2.1.3 THE RELATIONAL MODEL IN BRIEF 18 2.1.4
THE SEMISTRUCTURED MODEL IN BRIEF 19 2.1.5 OTHER DATA MODELS 20 2.1.6
COMPARISON OF MODELING APPROACHES 21 2.2 BASICS OF THE RELATIONAL MODEL
21 2.2.1 ATTRIBUTES 22 2.2.2 SCHEMAS 22 2.2.3 TUPLES 22 2.2.4 DOMAINS 23
2.2.5 EQUIVALENT REPRESENTATIONS OF A RELATION 23 XIII XIV TABLE OF
CONTENTS 2.2.6 RELATION INSTANCES 24 2.2.7 KEYS OF RELATIONS 25 2.2.8 AN
EXAMPLE DATABASE SCHEMA 26 2.2.9 EXERCISES FOR SECTION 2.2 28 2.3
DEFINING A RELATION SCHEMA IN SQL 29 2.3.1 RELATIONS IN SQL 29 2.3.2
DATA TYPES 30 2.3.3 SIMPLE TABLE DECLARATIONS 31 2.3.4 MODIFYING
RELATION SCHEMAS 33 2.3.5 DEFAULT VALUES 34 2.3.6 DECLARING KEYS 34
2.3.7 EXERCISES FOR SECTION 2.3 36 2.4 AN ALGEBRAIC QUERY LANGUAGE 38
2.4.1 WHY DO WE NEED A SPECIAL QUERY LANGUAGE? 38 2.4.2 W T HAT IS AN
ALGEBRA? 38 2.4.3 OVERVIEW OF RELATIONAL ALGEBRA 39 2.4.4 SET OPERATIONS
ON RELATIONS 39 2.4.5 PROJECTION 41 2.4.6 SELECTION 42 2.4.7 CARTESIAN
PRODUCT 43 2.4.8 NATURAL JOINS 43 2.4.9 THETA-JOINS 45 2.4.10 COMBINING
OPERATIONS TO FORM QUERIES 47 2.4.11 NAMING AND RENAMING 49 2.4.12
RELATIONSHIPS AMONG OPERATIONS 50 2.4.13 A LINEAR NOTATION FOR ALGEBRAIC
EXPRESSIONS 51 2.4.14 EXERCISES FOR SECTION 2.4 52 2.5 CONSTRAINTS ON
RELATIONS 58 2.5.1 RELATIONAL ALGEBRA AS A CONSTRAINT LANGUAGE 59 2.5.2
REFERENTIAL INTEGRITY CONSTRAINTS 59 2.5.3 KEY CONSTRAINTS 60 2.5.4
ADDITIONAL CONSTRAINT EXAMPLES 61 2.5.5 EXERCISES FOR SECTION 2.5 62 2.6
SUMMARY OF CHAPTER 2 63 2.7 REFERENCES FOR CHAPTER 2 65 3 DESIGN THEORY
FOR RELATIONAL DATABASES 67 3.1 FUNCTIONAL DEPENDENCIES 67 3.1.1
DEFINITION OF FUNCTIONAL DEPENDENCY 68 3.1.2 KEYS OF RELATIONS 70 3.1.3
SUPERKEYS 71 3.1.4 EXERCISES FOR SECTION 3.1 71 3.2 RULES ABOUT
FUNCTIONAL DEPENDENCIES 72 3.2.1 REASONING ABOUT FUNCTIONAL DEPENDENCIES
72 3.2.2 THE SPLITTING/COMBINING RULE 73 TABLE OF CONTENTS XV 3.2.3
TRIVIAL FUNCTIONAL DEPENDENCIES 74 3.2.4 COMPUTING THE CLOSURE OF
ATTRIBUTES 75 3.2.5 WHY THE CLOSURE ALGORITHM WORKS 77 3.2.6 THE
TRANSITIVE RULE 79 3.2.7 CLOSING SETS OF FUNCTIONAL DEPENDENCIES 80
3.2.8 PROJECTING FUNCTIONAL DEPENDENCIES 81 3.2.9 EXERCISES FOR SECTION
3.2 83 3.3 DESIGN OF RELATIONAL DATABASE SCHEMAS 85 3.3.1 ANOMALIES 86
3.3.2 DECOMPOSING RELATIONS 86 3.3.3 BOYCE-CODD NORMAL FORM 88 3.3.4
DECOMPOSITION INTO BCNF 89 3.3.5 EXERCISES FOR SECTION 3.3 92 3.4
DECOMPOSITION: THE GOOD, BAD, AND UGLY 93 3.4.1 RECOVERING INFORMATION
FROM A DECOMPOSITION 94 3.4.2 THE CHASE TEST FOR LOSSLESS JOIN 96 3.4.3
WHY THE CHASE WORKS 99 3.4.4 DEPENDENCY PRESERVATION 100 3.4.5 EXERCISES
FOR SECTION 3.4 102 3.5 THIRD NORMAL FORM 102 3.5.1 DEFINITION OF THIRD
NORMAL FORM 102 3.5.2 THE SYNTHESIS ALGORITHM FOR 3NF SCHEMAS 103 3.5.3
WHY THE 3NF SYNTHESIS ALGORITHM WORKS 104 3.5.4 EXERCISES FOR SECTION
3.5 105 3.6 MULTIVALUED DEPENDENCIES 105 3.6.1 ATTRIBUTE INDEPENDENCE
AND ITS CONSEQUENT REDUNDANCY 106 3.6.2 DEFINITION OF MULTIVALUED
DEPENDENCIES 107 3.6.3 REASONING ABOUT MULTIVALUED DEPENDENCIES 108
3.6.4 FOURTH NORMAL FORM 110 3.6.5 DECOMPOSITION INTO FOURTH NORMAL FORM
ILL 3.6.6 RELATIONSHIPS AMONG NORMAL FORMS 113 3.6.7 EXERCISES FOR
SECTION 3.6 113 3.7 AN ALGORITHM FOR DISCOVERING MVD'S 115 3.7.1 THE
CLOSURE AND THE CHASE 115 3.7.2 EXTENDING THE CHASE TO MVD'S 116 3.7.3
WHY THE CHASE WORKS FOR MVD'S 118 3.7.4 PROJECTING MVD'S 119 3.7.5
EXERCISES FOR SECTION 3.7 120 3.8 SUMMARY OF CHAPTER 3 121 3.9
REFERENCES FOR CHAPTER 3 122 XVI TABLE OF CONTENTS 4 HIGH-LEVEL DATABASE
MODELS 125 4.1 THE ENTITY/RELATIONSHIP MODEL 126 4.1.1 ENTITY SETS 126
4.1.2 ATTRIBUTES 126 4.1.3 RELATIONSHIPS 127 4.1.4 ENTITY-RELATIONSHIP
DIAGRAMS 127 4.1.5 INSTANCES OF AN E/R DIAGRAM 128 4.1.6 MULTIPLICITY OF
BINARY E/R RELATIONSHIPS 129 4.1.7 MULTIWAY RELATIONSHIPS 130 4.1.8
ROLES IN RELATIONSHIPS 131 4.1.9 ATTRIBUTES ON RELATIONSHIPS 134 4.1.10
CONVERTING MULTIWAY RELATIONSHIPS TO BINARY 134 4.1.11 SUBCLASSES IN THE
E/R MODEL 135 4.1.12 EXERCISES FOR SECTION 4.1 138 4.2 DESIGN PRINCIPLES
140 4.2.1 FAITHFULNESS 140 4.2.2 AVOIDING REDUNDANCY 141 4.2.3
SIMPLICITY COUNTS 142 4.2.4 CHOOSING THE RIGHT RELATIONSHIPS 142 4.2.5
PICKING THE RIGHT KIND OF ELEMENT 144 4.2.6 EXERCISES FOR SECTION 4.2
145 4.3 CONSTRAINTS IN THE E/R MODEL 148 4.3.1 KEYS IN THE E/R MODEL 148
4.3.2 REPRESENTING KEYS IN THE E/R MODEL 149 4.3.3 REFERENTIAL INTEGRITY
150 4.3.4 DEGREE CONSTRAINTS 151 4.3.5 EXERCISES FOR SECTION 4.3 151 4.4
WEAK ENTITY SETS 152 4.4.1 CAUSES OF WEAK ENTITY SETS 152 4.4.2
REQUIREMENTS FOR WEAK ENTITY SETS 153 4.4.3 WEAK ENTITY SET NOTATION 155
4.4.4 EXERCISES FOR SECTION 4.4 156 4.5 FROM E/R DIAGRAMS TO RELATIONAL
DESIGNS 157 4.5.1 FROM ENTITY SETS TO RELATIONS 157 4.5.2 FROM E/R
RELATIONSHIPS TO RELATIONS 158 4.5.3 COMBINING RELATIONS 160 4.5.4
HANDLING WEAK ENTITY SETS 161 4.5.5 EXERCISES FOR SECTION 4.5 163 4.6
CONVERTING SUBCLASS STRUCTURES TO RELATIONS 165 4.6.1 E/R-STYLE
CONVERSION 166 4.6.2 AN OBJECT-ORIENTED APPROACH 167 4.6.3 USING NULL
VALUES TO COMBINE RELATIONS 168 4.6.4 COMPARISON OF APPROACHES 169 4.6.5
EXERCISES FOR SECTION 4.6 171 4.7 UNIFIED MODELING LANGUAGE 171 TABLE OF
CONTENTS XVII 4.7.1 UML CLASSES 172 4.7.2 KEYS FOR UML CLASSES 173 4.7.3
ASSOCIATIONS 173 4.7.4 SELF-ASSOCIATIONS 175 4.7.5 ASSOCIATION CLASSES
175 4.7.6 SUBCLASSES IN UML 176 4.7.7 AGGREGATIONS AND COMPOSITIONS 177
4.7.8 EXERCISES FOR SECTION 4.7 179 4.8 FROM UML DIAGRAMS TO RELATIONS
179 4.8.1 UML-TO-RELATIONS BASICS 179 4.8.2 FROM UML SUBCLASSES TO
RELATIONS 180 4.8.3 FROM AGGREGATIONS AND COMPOSITIONS TO RELATIONS . .
. . 181 4.8.4 THE UML ANALOG OF WEAK ENTITY SETS 181 4.8.5 EXERCISES FOR
SECTION 4.8 183 4.9 OBJECT DEFINITION LANGUAGE 183 4.9.1 CLASS
DECLARATIONS 184 4.9.2 ATTRIBUTES IN ODL 184 4.9.3 RELATIONSHIPS IN ODL
185 4.9.4 INVERSE RELATIONSHIPS 186 4.9.5 MULTIPLICITY OF RELATIONSHIPS
186 4.9.6 TYPES IN ODL 188 4.9.7 SUBCLASSES IN ODL 190 4.9.8 DECLARING
KEYS IN ODL 191 4.9.9 EXERCISES FOR SECTION 4.9 192 4.10 FROM ODL
DESIGNS TO RELATIONAL DESIGNS 193 4.10.1 FROM ODL CLASSES TO RELATIONS
193 4.10.2 COMPLEX ATTRIBUTES IN CLASSES 194 4.10.3 REPRESENTING
SET-VALUED ATTRIBUTES 195 4.10.4 REPRESENTING OTHER TYPE CONSTRUCTORS
196 4.10.5 REPRESENTING ODL RELATIONSHIPS 198 4.10.6 EXERCISES FOR
SECTION 4.10 198 4.11 SUMMARY OF CHAPTER 4 200 4.12 REFERENCES FOR
CHAPTER 4 202 II RELATIONAL DATABASE PROGRAMMING 203 5 ALGEBRAIC AND
LOGICAL QUERY LANGUAGES 205 5.1 RELATIONAL OPERATIONS ON BAGS 205 5.1.1
WHY BAGS? 206 5.1.2 UNION, INTERSECTION, AND DIFFERENCE OF BAGS 207
5.1.3 PROJECTION OF BAGS 208 5.1.4 SELECTION ON BAGS 209 5.1.5 PRODUCT
OF BAGS 210 5.1.6 JOINS OF BAGS 210 XVLLL TABLE OF CONTENTS 5.1.7
EXERCISES FOR SECTION 5.1 212 5.2 EXTENDED OPERATORS OF RELATIONAL
ALGEBRA 213 5.2.1 DUPLICATE ELIMINATION 214 5.2.2 AGGREGATION OPERATORS
214 5.2.3 GROUPING 215 5.2.4 THE GROUPING OPERATOR 216 5.2.5 EXTENDING
THE PROJECTION OPERATOR 217 5.2.6 THE SORTING OPERATOR 219 5.2.7
OUTERJOINS 219 5.2.8 EXERCISES FOR SECTION 5.2 222 5.3 A LOGIC FOR
RELATIONS 222 5.3.1 PREDICATES AND ATOMS 223 5.3.2 ARITHMETIC ATOMS 223
5.3.3 DATALOG RULES AND QUERIES 224 5.3.4 MEANING OF DATALOG RULES 225
5.3.5 EXTENSIONAL AND INTENSIONAL PREDICATES 228 5.3.6 DATALOG RULES
APPLIED TO BAGS 228 5.3.7 EXERCISES FOR SECTION 5.3 230 5.4 RELATIONAL
ALGEBRA AND DATALOG 230 5.4.1 BOOLEAN OPERATIONS 231 5.4.2 PROJECTION
232 5.4.3 SELECTION 232 5.4.4 PRODUCT 235 5.4.5 JOINS 235 5.4.6
SIMULATING MULTIPLE OPERATIONS WITH DATALOG 236 5.4.7 COMPARISON BETWEEN
DATALOG AND RELATIONAL ALGEBRA . . 238 5.4.8 EXERCISES FOR SECTION 5.4
238 5.5 SUMMARY OF CHAPTER 5 240 5.6 REFERENCES FOR CHAPTER 5 241 6 THE
DATABASE LANGUAGE SQL 243 6.1 SIMPLE QUERIES IN SQL 244 6.1.1 PROJECTION
IN SQL 246 6.1.2 SELECTION IN SQL 248 6.1.3 COMPARISON OF STRINGS 250
6.1.4 PATTERN MATCHING IN SQL 250 6.1.5 DATES AND TIMES 251 6.1.6 NULL
VALUES AND COMPARISONS INVOLVING NULL 252 6.1.7 THE TRUTH-VALUE UNKNOWN
253 6.1.8 ORDERING THE OUTPUT 255 6.1.9 EXERCISES FOR SECTION 6.1 256
6.2 QUERIES INVOLVING MORE THAN ONE RELATION 258 6.2.1 PRODUCTS AND
JOINS IN SQL 259 6.2.2 DISAMBIGUATING ATTRIBUTES 260 6.2.3 TUPLE
VARIABLES 261 TABLE OF CONTENTS XIX 6.2.4 INTERPRETING MULTIRELATION
QUERIES 262 6.2.5 UNION, INTERSECTION, AND DIFFERENCE OF QUERIES 265
6.2.6 EXERCISES FOR SECTION 6.2 267 6.3 SUBQUERIES 268 6.3.1 SUBQUERIES
THAT PRODUCE SCALAR VALUES 269 6.3.2 CONDITIONS INVOLVING RELATIONS 270
6.3.3 CONDITIONS INVOLVING TUPLES 271 6.3.4 CORRELATED SUBQUERIES 273
6.3.5 SUBQUERIES IN FROM CLAUSES 274 6.3.6 SQL JOIN EXPRESSIONS 275
6.3.7 NATURAL JOINS 276 6.3.8 OUTERJOINS 277 6.3.9 EXERCISES FOR SECTION
6.3 279 6.4 FULL-RELATION OPERATIONS 281 6.4.1 ELIMINATING DUPLICATES
281 6.4.2 DUPLICATES IN UNIONS, INTERSECTIONS, AND DIFFERENCES . . . 282
6.4.3 GROUPING AND AGGREGATION IN SQL 283 6.4.4 AGGREGATION OPERATORS
284 6.4.5 GROUPING 285 6.4.6 GROUPING, AGGREGATION, AND NULLS 287 6.4.7
HAVING CLAUSES 288 6.4.8 EXERCISES FOR SECTION 6.4 289 6.5 DATABASE
MODIFICATIONS 291 6.5.1 INSERTION 291 6.5.2 DELETION 292 6.5.3 UPDATES
294 6.5.4 EXERCISES FOR SECTION 6.5 295 6.6 TRANSACTIONS IN SQL 296
6.6.1 SERIALIZABILITY 296 6.6.2 ATOMICITY 298 6.6.3 TRANSACTIONS 299
6.6.4 READ-ONLY TRANSACTIONS 300 6.6.5 DIRTY READS 302 6.6.6 OTHER
ISOLATION LEVELS 304 6.6.7 EXERCISES FOR SECTION 6.6 306 6.7 SUMMARY OF
CHAPTER 6 307 6.8 REFERENCES FOR CHAPTER 6 308 7 CONSTRAINTS AND
TRIGGERS 311 7.1 KEYS AND FOREIGN KEYS 311 7.1.1 DECLARING FOREIGN-KEY
CONSTRAINTS 312 7.1.2 MAINTAINING REFERENTIAL INTEGRITY 313 7.1.3
DEFERRED CHECKING OF CONSTRAINTS 315 7.1.4 EXERCISES FOR SECTION 7.1 318
7.2 CONSTRAINTS ON ATTRIBUTES AND TUPLES 319 XX TABLE OF CONTENTS 7.2.1
NOT-NULL CONSTRAINTS 319 7.2.2 ATTRIBUTE-BASED CHECK CONSTRAINTS 320
7.2.3 TUPLE-BASED CHECK CONSTRAINTS 321 7.2.4 COMPARISON OF TUPLE- AND
ATTRIBUTE-BASED CONSTRAINTS . 323 7.2.5 EXERCISES FOR SECTION 7.2 323
7.3 MODIFICATION OF CONSTRAINTS 325 7.3.1 GIVING NAMES TO CONSTRAINTS
325 7.3.2 ALTERING CONSTRAINTS ON TABLES 326 7.3.3 EXERCISES FOR SECTION
7.3 327 7.4 ASSERTIONS 328 7.4.1 CREATING ASSERTIONS 328 7.4.2 USING
ASSERTIONS 329 7.4.3 EXERCISES FOR SECTION 7.4 330 7.5 TRIGGERS 332
7.5.1 TRIGGERS IN SQL 332 7.5.2 THE OPTIONS FOR TRIGGER DESIGN 334 7.5.3
EXERCISES FOR SECTION 7.5 337 7.6 SUMMARY OF CHAPTER 7 339 7.7
REFERENCES FOR CHAPTER 7 339 8 VIEWS AND INDEXES 341 8.1 VIRTUAL VIEWS
341 8.1.1 DECLARING VIEWS 341 8.1.2 QUERYING VIEWS 343 8.1.3 RENAMING
ATTRIBUTES 343 8.1.4 EXERCISES FOR SECTION 8.1 344 8.2 MODIFYING VIEWS
344 8.2.1 VIEW REMOVAL 345 8.2.2 UPDATABLE VIEWS 345 8.2.3 INSTEAD-OF
TRIGGERS ON VIEWS 347 8.2.4 EXERCISES FOR SECTION 8.2 349 8.3 INDEXES IN
SQL 350 8.3.1 MOTIVATION FOR INDEXES 350 8.3.2 DECLARING INDEXES 351
8.3.3 EXERCISES FOR SECTION 8.3 352 8.4 SELECTION OF INDEXES 352 8.4.1 A
SIMPLE COST MODEL 352 8.4.2 SOME USEFUL INDEXES 353 8.4.3 CALCULATING
THE BEST INDEXES TO CREATE 355 8.4.4 AUTOMATIC SELECTION OF INDEXES TO
CREATE 357 8.4.5 EXERCISES FOR SECTION 8.4 359 8.5 MATERIALIZED VIEWS
359 8.5.1 MAINTAINING A MATERIALIZED VIEW 360 8.5.2 PERIODIC MAINTENANCE
OF MATERIALIZED VIEWS 362 8.5.3 REWRITING QUERIES TO USE MATERIALIZED
VIEWS 362 TABLE OF CONTENTS XXI 8.5.4 AUTOMATIC CREATION OF MATERIALIZED
VIEWS 364 8.5.5 EXERCISES FOR SECTION 8.5 365 8.6 SUMMARY OF CHAPTER 8
366 8.7 REFERENCES FOR CHAPTER 8 367 9 SQL IN A SERVER ENVIRONMENT 369
9.1 THE THREE-TIER ARCHITECTURE 369 9.1.1 THE WEB-SERVER TIER 370 9.1.2
THE APPLICATION TIER 371 9.1.3 THE DATABASE TIER 372 9.2 THE SQL
ENVIRONMENT 372 9.2.1 ENVIRONMENTS 373 9.2.2 SCHEMAS 374 9.2.3 CATALOGS
375 9.2.4 CLIENTS AND SERVERS IN THE SQL ENVIRONMENT 375 9.2.5
CONNECTIONS 376 9.2.6 SESSIONS 377 9.2.7 MODULES 378 9.3 THE
SQL/HOST-LANGUAGE INTERFACE 378 9.3.1 THE IMPEDANCE MISMATCH PROBLEM 380
9.3.2 CONNECTING SQL TO THE HOST LANGUAGE 380 9.3.3 THE DECLARE SECTION
381 9.3.4 USING SHARED VARIABLES 382 9.3.5 SINGLE-ROW SELECT STATEMENTS
383 9.3.6 CURSORS 383 9.3.7 MODIFICATIONS BY CURSOR 386 9.3.8 PROTECTING
AGAINST CONCURRENT UPDATES 387 9.3.9 DYNAMIC SQL 388 9.3.10 EXERCISES
FOR SECTION 9.3 390 9.4 STORED PROCEDURES 391 9.4.1 CREATING PSM
FUNCTIONS AND PROCEDURES 391 9.4.2 SOME SIMPLE STATEMENT FORMS IN PSM
392 9.4.3 BRANCHING STATEMENTS 394 9.4.4 QUERIES IN PSM 395 9.4.5 LOOPS
IN PSM 396 9.4.6 FOR-LOOPS 398 9.4.7 EXCEPTIONS IN PSM 400 9.4.8 USING
PSM FUNCTIONS AND PROCEDURES 402 9.4.9 EXERCISES FOR SECTION 9.4 402 9.5
USING A CALL-LEVEL INTERFACE 404 9.5.1 INTRODUCTION TO SQL/CLI 405 9.5.2
PROCESSING STATEMENTS 407 9.5.3 FETCHING DATA FROM A QUERY RESULT 408
9.5.4 PASSING PARAMETERS TO QUERIES 410 9.5.5 EXERCISES FOR SECTION 9.5
412 XXII TABLE OF CONTENTS 9.6 JDBC 412 9.6.1 INTRODUCTION TO JDBC 412
9.6.2 CREATING STATEMENTS IN JDBC 413 9.6.3 CURSOR OPERATIONS IN JDBC
415 9.6.4 PARAMETER PASSING 416 9.6.5 EXERCISES FOR SECTION 9.6 416 9.7
PHP 416 9.7.1 PHP BASICS 417 9.7.2 ARRAYS 418 9.7.3 THE PEAR DB LIBRARY
419 9.7.4 CREATING A DATABASE CONNECTION USING DB 419 9.7.5 EXECUTING
SQL STATEMENTS 419 9.7.6 CURSOR OPERATIONS IN PHP 420 9.7.7 DYNAMIC SQL
IN PHP 421 9.7.8 EXERCISES FOR SECTION 9.7 422 9.8 SUMMARY OF CHAPTER 9
422 9.9 REFERENCES FOR CHAPTER 9 423 10 ADVANCED TOPICS IN RELATIONAL
DATABASES 425 10.1 SECURITY AND USER AUTHORIZATION IN SQL 425 10.1.1
PRIVILEGES 426 10.1.2 CREATING PRIVILEGES 427 10.1.3 THE
PRIVILEGE-CHECKING PROCESS 428 10.1.4 GRANTING PRIVILEGES 430 10.1.5
GRANT DIAGRAMS 431 10.1.6 REVOKING PRIVILEGES 433 10.1.7 EXERCISES FOR
SECTION 10.1 436 10.2 RECURSION IN SQL 437 10.2.1 DEFINING RECURSIVE
RELATIONS IN SQL 437 10.2.2 PROBLEMATIC EXPRESSIONS IN RECURSIVE SQL 440
10.2.3 EXERCISES FOR SECTION 10.2 443 10.3 THE OBJECT-RELATIONAL MODEL
445 10.3.1 FROM RELATIONS TO OBJECT-RELATIONS 445 10.3.2 NESTED
RELATIONS 446 10.3.3 REFERENCES 447 10.3.4 OBJECT-ORIENTED VERSUS
OBJECT-RELATIONAL 449 10.3.5 EXERCISES FOR SECTION 10.3 450 10.4
USER-DEFINED TYPOS IN SQL 451 10.4.1 DEFINING TYPES IN SQL 451 10.4.2
METHOD DECLARATIONS IN UDT'S 452 10.4.3 METHOD DEFINITIONS 453 10.4.4
DECLARING RELATIONS WITH A UDT 454 10.4.5 REFERENCES 454 10.4.6 CREATING
OBJECT ID'S FOR TABLES 455 10.4.7 EXERCISES FOR SECTION 10.4 457 TABLE
OF CONTENTS XXIII 10.5 OPERATIONS ON OBJECT-RELATIONAL DATA 457 10.5.1
FOLLOWING REFERENCES 457 10.5.2 ACCESSING COMPONENTS OF TUPLES WITH A
UDT 458 10.5.3 GENERATOR AND MUTATOR FUNCTIONS 460 10.5.4 ORDERING
RELATIONSHIPS ON UDT'S 461 10.5.5 EXERCISES FOR SECTION 10.5 463 10.6
ON-LINE ANALYTIC PROCESSING 464 10.6.1 OLAP AND DATA WAREHOUSES 465
10.6.2 OLAP APPLICATIONS 465 10.6.3 A MULTIDIMENSIONAL VIEW OF OLAP DATA
466 10.6.4 STAR SCHEMAS 467 10.6.5 SLICING AND DICING 469 10.6.6
EXERCISES FOR SECTION 10.6 472 10.7 DATA CUBES 473 10.7.1 THE CUBE
OPERATOR 473 10.7.2 THE CUBE OPERATOR IN SQL 475 10.7.3 EXERCISES FOR
SECTION 10.7 477 10.8 SUMMARY OF CHAPTER 10 478 10.9 REFERENCES FOR
CHAPTER 10 480 III MODELING AND PROGRAMMING FOR SEMISTRUCTURED DATA 481
11 THE SEMISTRUCTURED-DATA MODEL 483 11.1 SEMISTRUCTURED DATA 483 11.1.1
MOTIVATION FOR THE SCMISTRUCTURED-DATA MODEL 483 11.1.2 SEMISTRUCTURED
DATA REPRESENTATION 484 11.1.3 INFORMATION INTEGRATION VIA
SEMISTRUCTURED DATA 486 11.1.4 EXERCISES FOR SECTION 11.1 487 11.2 XML
488 11.2.1 SEMANTIC TAGS 488 11.2.2 XML WITH AND WITHOUT A SCHEMA 489
11.2.3 WELL-FORMED XML 489 11.2.4 ATTRIBUTES 490 11.2.5 ATTRIBUTES THAT
CONNECT ELEMENTS 491 11.2.6 NAMESPACES 493 11.2.7 XML AND DATABASES 493
11.2.8 EXERCISES FOR SECTION 11.2 495 11.3 DOCUMENT TYPE DEFINITIONS 495
11.3.1 THE FORM OF A DTD 495 11.3.2 USING A DTD 499 11.3.3 ATTRIBUTE
LISTS 499 11.3.4 IDENTIFIERS AND REFERENCES 500 11.3.5 EXERCISES FOR
SECTION 11.3 502 XXIV TABLE OF CONTENTS 11.4 XML SCHEMA 502 11.4.1 THE
FORM OF AN XML SCHEMA 502 11.4.2 ELEMENTS 503 11.4.3 COMPLEX TYPES 504
11.4.4 ATTRIBUTES 506 11.4.5 RESTRICTED SIMPLE TYPES 507 11.4.6 KEYS IN
XML SCHEMA 509 11.4.7 FOREIGN KEYS IN XML SCHEMA 510 11.4.8 EXERCISES
FOR SECTION 11.4 512 11.5 SUMMARY OF CHAPTER 11 514 11.6 REFERENCES FOR
CHAPTER 11 515 12 PROGRAMMING LANGUAGES FOR XML 517 12.1 XPATH 517
12.1.1 THE XPATH DATA MODEL 518 12.1.2 DOCUMENT NODES 519 12.1.3 PATH
EXPRESSIONS 519 12.1.4 RELATIVE PATH EXPRESSIONS 521 12.1.5 ATTRIBUTES
IN PATH EXPRESSIONS 521 12.1.6 AXES 521 12.1.7 CONTEXT OF EXPRESSIONS
522 12.1.8 WILDCARDS 523 12.1.9 CONDITIONS IN PATH EXPRESSIONS 523
12.1.LOEXERCISES FOR SECTION 12.1 526 12.2 XQUERY 528 12.2.1 XQUERY
BASICS 530 12.2.2 FLWR EXPRESSIONS 530 12.2.3 REPLACEMENT OF VARIABLES
BY THEIR VALUES 534 12.2.4 JOINS IN XQUERY 536 12.2.5 XQUERY COMPARISON
OPERATORS 537 12.2.6 ELIMINATION OF DUPLICATES 538 12.2.7 QUANTIFICATION
IN XQUERY 539 12.2.8 AGGREGATIONS 540 12.2.9 BRANCHING IN XQUERY
EXPRESSIONS 540 12.2.10 ORDERING THE RESULT OF A QUERY 541 12.2.11
EXERCISES FOR SECTION 12.2 543 12.3 EXTENSIBLE STYLESHEET LANGUAGE 544
12.3.1 XSLT BASICS 544 12.3.2 TEMPLATES 544 12.3.3 OBTAINING VALUES FROM
XML DATA 545 12.3.4 RECURSIVE USE OF TEMPLATES 546 12.3.5 ITERATION IN
XSLT 549 12.3.6 CONDITIONALS IN XSLT 551 12.3.7 EXERCISES FOR SECTION
12.3 551 12.4 SUMMARY OF CHAPTER 12 553 TABLE OF CONTENTS XXV 12.5
REFERENCES FOR CHAPTER 12 554 IV DATABASE SYSTEM IMPLEMENTATION 555 13
SECONDARY STORAGE MANAGEMENT 557 13.1 THE MEMORY HIERARCHY 557 13.1.1
THE MEMORY HIERARCHY 557 13.1.2 TRANSFER OF DATA BETWEEN LEVELS 560
13.1.3 VOLATILE AND NONVOLATILE STORAGE 560 13.1.4 VIRTUAL MEMORY 560
13.1.5 EXERCISES FOR SECTION 13.1 561 13.2 DISKS 562 13.2.1 MECHANICS OF
DISKS 562 13.2.2 THE DISK CONTROLLER 564 13.2.3 DISK ACCESS
CHARACTERISTICS 564 13.2.4 EXERCISES FOR SECTION 13.2 567 13.3
ACCELERATING ACCESS TO SECONDARY STORAGE 568 13.3.1 THE I/O MODEL OF
COMPUTATION 568 13.3.2 ORGANIZING DATA BY CYLINDERS 569 13.3.3 USING
MULTIPLE DISKS 570 13.3.4 MIRRORING DISKS 571 13.3.5 DISK SCHEDULING AND
THE ELEVATOR ALGORITHM 571 13.3.6 PREFETCHING AND LARGE-SCALE BUFFERING
573 13.3.7 EXERCISES FOR SECTION 13.3 573 13.4 DISK FAILURES 575 13.4.1
INTERMITTENT FAILURES 576 13.4.2 CHECKSUMS 576 13.4.3 STABLE STORAGE 577
13.4.4 ERROR-HANDLING CAPABILITIES OF STABLE STORAGE 578 13.4.5 RECOVERY
FROM DISK CRASHES 578 13.4.6 MIRRORING AS A REDUNDANCY TECHNIQUE 579
13.4.7 PARITY BLOCKS 580 13.4.8 AN IMPROVEMENT: RAID 5 583 13.4.9 COPING
WITH MULTIPLE DISK CRASHES 584 13.4.10 EXERCISES FOR SECTION 13.4 587
13.5 ARRANGING DATA ON DISK 590 13.5.1 FIXED-LENGTH RECORDS 590 13.5.2
PACKING FIXED-LENGTH RECORDS INTO BLOCKS 592 13.5.3 EXERCISES FOR
SECTION 13.5 593 13.6 REPRESENTING BLOCK AND RECORD ADDRESSES 593 13.6.1
ADDRESSES IN CLIENT-SERVER SYSTEMS 593 13.6.2 LOGICAL AND STRUCTURED
ADDRESSES 595 13.6.3 POINTER SWIZZLING 596 13.6.4 RETURNING BLOCKS TO
DISK 600 XXVI TABLE OF CONTENTS 13.6.5 PINNED RECORDS AND BLOCKS 600
13.6.6 EXERCISES FOR SECTION 13.6 602 13.7 VARIABLE-LENGTH DATA AND
RECORDS 603 13.7.1 RECORDS WITH VARIABLE-LENGTH FIELDS 604 13.7.2
RECORDS WITH REPEATING FIELDS 605 13.7.3 VARIABLE-FORMAT RECORDS 607
13.7.4 RECORDS THAT DO NOT FIT IN A BLOCK 608 13.7.5 BLOBS 608 13.7.6
COLUMN STORES 609 13.7.7 EXERCISES FOR SECTION 13.7 610 13.8 RECORD
MODIFICATIONS 612 13.8.1 INSERTION 612 13.8.2 DELETION 614 13.8.3 UPDATE
615 13.8.4 EXERCISES FOR SECTION 13.8 615 13.9 SUMMARY OF CHAPTER 13 615
13.10REFERENCES FOR CHAPTER 13 617 14 INDEX STRUCTURES 619 14.1
INDEX-STRUCTURE BASICS 620 14.1.1 SEQUENTIAL FILES 621 14.1.2 DENSE
INDEXES 621 14.1.3 SPARSE INDEXES 622 14.1.4 MULTIPLE LEVELS OF INDEX
623 14.1.5 SECONDARY INDEXES 624 14.1.6 APPLICATIONS OF SECONDARY
INDEXES 625 14.1.7 INDIRECTION IN SECONDARY INDEXES 626 14.1.8 DOCUMENT
RETRIEVAL AND INVERTED INDEXES 628 14.1.9 EXERCISES FOR SECTION 14.1 631
14.2 B-TREES 633 14.2.1 THE STRUCTURE OF B-TREES 634 14.2.2 APPLICATIONS
OF B-TREES 637 14.2.3 LOOKUP IN B-TREES 639 14.2.4 RANGE QUERIES 639
14.2.5 INSERTION INTO B-TREES 640 14.2.6 DELETION FROM B-TREES 642
14.2.7 EFFICIENCY OF B-TREES 645 14.2.8 EXERCISES FOR SECTION 14.2 646
14.3 HASH TABLES 648 14.3.1 SECONDARY-STORAGE HASH TABLES 649 14.3.2
INSERTION INTO A HASH TABLE 649 14.3.3 HASH-TABLE DELETION 650 14.3.4
EFFICIENCY OF HASH TABLE INDEXES 651 14.3.5 EXTENSIBLE HASH TABLES 652
14.3.6 INSERTION INTO EXTENSIBLE HASH TABLES 653 TABLE OF CONTENTS XXVII
14.3.7 LINEAR HASH TABLES 655 14.3.8 INSERTION INTO LINEAR HASH TABLES
657 14.3.9 EXERCISES FOR SECTION 14.3 659 14.4 MULTIDIMENSIONAL INDEXES
661 14.4.1 APPLICATIONS OF MULTIDIMENSIONAL INDEXES 661 14.4.2 EXECUTING
RANGE QUERIES USING CONVENTIONAL INDEXES . . 663 14.4.3 EXECUTING
NEAREST-NEIGHBOR QUERIES USING CONVENTIONAL INDEXES 664 14.4.4 OVERVIEW
OF MULTIDIMENSIONAL INDEX STRUCTURES 664 14.5 HASH STRUCTURES FOR
MULTIDIMENSIONAL DATA 665 14.5.1 GRID FILES 665 14.5.2 LOOKUP IN A GRID
FILE 666 14.5.3 INSERTION INTO GRID FILES 667 14.5.4 PERFORMANCE OF GRID
FILES 669 14.5.5 PARTITIONED HASH FUNCTIONS 671 14.5.6 COMPARISON OF
GRID FILES AND PARTITIONED HASHING . . . . 673 14.5.7 EXERCISES FOR
SECTION 14.5 673 14.6 TREE STRUCTURES FOR MULTIDIMENSIONAL DATA 675
14.6.1 MULTIPLE-KEY INDEXES 675 14.6.2 PERFORMANCE OF MULTIPLE-KEY
INDEXES 676 14.6.3 M-TREES 677 14.6.4 OPERATIONS ON KD- TREES 679 14.6.5
ADAPTING FED-TREES TO SECONDARY STORAGE 681 14.6.6 QUAD TREES 681 14.6.7
R-TREES 683 14.6.8 OPERATIONS ON R-TREES 684 14.6.9 EXERCISES FOR
SECTION 14.6 686 14.7 BITMAP INDEXES 688 14.7.1 MOTIVATION FOR BITMAP
INDEXES 689 14.7.2 COMPRESSED BITMAPS 691 14.7.3 OPERATING ON
RUN-LENGTH-ENCODED BIT-VECTORS 693 14.7.4 MANAGING BITMAP INDEXES 693
14.7.5 EXERCISES FOR SECTION 14.7 695 14.8 SUMMARY OF CHAPTER 14 695
14.9 REFERENCES FOR CHAPTER 14 697 15 QUERY EXECUTION 701 15.1
INTRODUCTION TO PHYSICAL-QUERY-PLAN OPERATORS 703 15.1.1 SCANNING TABLES
703 15.1.2 SORTING WHILE SCANNING TABLES 704 15.1.3 THE COMPUTATION
MODEL FOR PHYSICAL OPERATORS 704 15.1.4 PARAMETERS FOR MEASURING COSTS
705 15.1.5 I/O COST FOR SCAN OPERATORS 706 15.1.6 ITERATORS FOR
IMPLEMENTATION OF PHYSICAL OPERATORS . 707 15.2 ONE-PASS ALGORITHMS
709 TABLE OF CONTENTS 15.2.1 ONE-PASS ALGORITHMS FOR TUPLE-AT-A-TIME
OPERATIONS . . 711 15.2.2 ONE-PASS ALGORITHMS FOR UNARY, FULL-RELATION
OPERATIONS 712 15.2.3 ONE-PASS ALGORITHMS FOR BINARY OPERATIONS 715
15.2.4 EXERCISES FOR SECTION 15.2 718 3 NESTED-LOOP JOINS 718 15.3.1
TUPLE-BASED NESTED-LOOP JOIN 719 15.3.2 AN ITERATOR FOR TUPLE-BASED
NESTED-LOOP JOIN 719 15.3.3 BLOCK-BASED NESTED-LOOP JOIN ALGORITHM 719
15.3.4 ANALYSIS OF NESTED-LOOP JOIN 721 15.3.5 SUMMARY OF ALGORITHMS SO
FAR 722 15.3.6 EXERCISES FOR SECTION 15.3 722 4 TWO-PASS ALGORITHMS
BASED ON SORTING 723 15.4.1 TWO-PHASE, MULTIWAY MERGE-SORT 723 15.4.2
DUPLICATE ELIMINATION USING SORTING 725 15.4.3 GROUPING AND AGGREGATION
USING SORTING 726 15.4.4 A SORT-BASED UNION ALGORITHM 726 15.4.5
SORT-BASED INTERSECTION AND DIFFERENCE 727 15.4.6 A SIMPLE SORT-BASED
JOIN ALGORITHM 728 15.4.7 ANALYSIS OF SIMPLE SORT-JOIN 729 15.4.8 A MORE
EFFICIENT SORT-BASED JOIN 729 15.4.9 SUMMARY OF SORT-BASED ALGORITHMS
730 15.4.10EXERCISESFOR SECTION 15.4 730 5 TWO-PASS ALGORITHMS BASED ON
HASHING 732 15.5.1 PARTITIONING RELATIONS BY HASHING 732 15.5.2 A
HASH-BASED ALGORITHM FOR DUPLICATE ELIMINATION . . . 732 15.5.3
HASH-BASED GROUPING AND AGGREGATION 733 15.5.4 HASH-BASED UNION,
INTERSECTION, AND DIFFERENCE 734 15.5.5 THE HASH-JOIN ALGORITHM 734
15.5.6 SAVING SOME DISK I/O'S 735 15.5.7 SUMMARY OF HASH-BASED
ALGORITHMS 737 15.5.8 EXERCISES FOR SECTION 15.5 738 6 INDEX-BASED
ALGORITHMS 739 15.6.1 CLUSTERING AND NONCLUSTERING INDEXES 739 15.6.2
INDEX-BASED SELECTION 740 15.6.3 JOINING BY USING AN INDEX 742 15.6.4
JOINS USING A SORTED INDEX 743 15.6.5 EXERCISES FOR SECTION 15.6 745 7
BUFFER MANAGEMENT 746 15.7.1 BUFFER MANAGEMENT ARCHITECTURE 746 15.7.2
BUFFER MANAGEMENT STRATEGIES 747 15.7.3 THE RELATIONSHIP BETWEEN
PHYSICAL OPERATOR SELECTION AND BUFFER MANAGEMENT 750 15.7.4 EXERCISES
FOR SECTION 15.7 751 8 ALGORITHMS USING MORE THAN TWO PASSES 752 15.8.1
MULTIPASS SORT-BASED ALGORITHMS 752 TABLE OF CONTENTS XXIX 15.8.2
PERFORMANCE OF MULTIPASS, SORT-BASED ALGORITHMS . . . . 753 15.8.3
MULTIPASS HASH-BASED ALGORITHMS 754 15.8.4 PERFORMANCE OF MULTIPASS
HASH-BASED ALGORITHMS . . . . 754 15.8.5 EXERCISES FOR SECTION 15.8 755
15.9 SUMMARY OF CHAPTER 15 756 15.10REFERENCES FOR CHAPTER 15 757 16 THE
QUERY COMPILER 759 16.1 PARSING AND PREPROCESSING 760 16.1.1 SYNTAX
ANALYSIS AND PARSE TREES 760 16.1.2 A GRAMMAR FOR A SIMPLE SUBSET OF SQL
761 16.1.3 THE PREPROCESSOR 764 16.1.4 PREPROCESSING QUERIES INVOLVING
VIEWS 765 16.1.5 EXERCISES FOR SECTION 16.1 767 16.2 ALGEBRAIC LAWS FOR
IMPROVING QUERY PLANS 768 16.2.1 COMMUTATIVE AND ASSOCIATIVE LAWS 768
16.2.2 LAWS INVOLVING SELECTION 770 16.2.3 PUSHING SELECTIONS 772 16.2.4
LAWS INVOLVING PROJECTION 774 16.2.5 LAWS ABOUT JOINS AND PRODUCTS 776
16.2.6 LAWS INVOLVING DUPLICATE ELIMINATION 777 16.2.7 LAWS INVOLVING
GROUPING AND AGGREGATION 777 16.2.8 EXERCISES FOR SECTION 16.2 780 16.3
FROM PARSE TREES TO LOGICAL QUERY PLANS 781 16.3.1 CONVERSION TO
RELATIONAL ALGEBRA 782 16.3.2 REMOVING SUBQUERIES FROM CONDITIONS 783
16.3.3 IMPROVING THE LOGICAL QUERY PLAN 788 16.3.4 GROUPING
ASSOCIATIVE/COMMUTATIVE OPERATORS 790 16.3.5 EXERCISES FOR SECTION 16.3
791 16.4 ESTIMATING THE COST OF OPERATIONS 792 16.4.1 ESTIMATING SIZES
OF INTERMEDIATE RELATIONS 793 16.4.2 ESTIMATING THE SIZE OF A PROJECTION
794 16.4.3 ESTIMATING THE SIZE OF A SELECTION 794 16.4.4 ESTIMATING THE
SIZE OF A JOIN 797 16.4.5 NATURAL JOINS WITH MULTIPLE JOIN ATTRIBUTES
799 16.4.6 JOINS OF MANY RELATIONS 800 16.4.7 ESTIMATING SIZES FOR OTHER
OPERATIONS 801 16.4.8 EXERCISES FOR SECTION 16.4 802 16.5 INTRODUCTION
TO COST-BASED PLAN SELECTION 803 16.5.1 OBTAINING ESTIMATES FOR SIZE
PARAMETERS 804 16.5.2 COMPUTATION OF STATISTICS 807 16.5.3 HEURISTICS
FOR REDUCING THE COST OF LOGICAL QUERY PLANS . 808 16.5.4 APPROACHES TO
ENUMERATING PHYSICAL PLANS 810 16.5.5 EXERCISES FOR SECTION 16.5 813
16.6 CHOOSING AN ORDER FOR JOINS 814 XXX TABLE OF CONTENTS 16.6.1
SIGNIFICANCE OF LEFT AND RIGHT JOIN ARGUMENTS 815 16.6.2 JOIN TREES 815
16.6.3 LEFT-DEEP JOIN TREES 816 16.6.4 DYNAMIC PROGRAMMING TO SELECT A
JOIN ORDER AND GROUPING819 16.6.5 DYNAMIC PROGRAMMING WITH MORE DETAILED
COST FUNCTIONS823 16.6.6 A GREEDY ALGORITHM FOR SELECTING A JOIN ORDER
824 16.6.7 EXERCISES FOR SECTION 16.6 825 16.7 COMPLETING THE
PHYSICAL-QUERY-PLAN 826 16.7.1 CHOOSING A SELECTION METHOD 827 16.7.2
CHOOSING A JOIN METHOD 829 16.7.3 PIPELINING VERSUS MATERIALIZATION 830
16.7.4 PIPELINING UNARY OPERATIONS 830 16.7.5 PIPELINING BINARY
OPERATIONS 830 16.7.6 NOTATION FOR PHYSICAL QUERY PLANS 834 16.7.7
ORDERING OF PHYSICAL OPERATIONS 837 16.7.8 EXERCISES FOR SECTION 16.7
838 16.8 SUMMARY OF CHAPTER 16 839 16.9 REFERENCES FOR CHAPTER 16 841 17
COPING WITH SYSTEM FAILURES 843 17.1 ISSUES AND MODELS FOR RESILIENT
OPERATION 843 17.1.1 FAILURE MODES 844 17.1.2 MORE ABOUT TRANSACTIONS
845 17.1.3 CORRECT EXECUTION OF TRANSACTIONS 846 17.1.4 THE PRIMITIVE
OPERATIONS OF TRANSACTIONS 848 17.1.5 EXERCISES FOR SECTION 17.1 851
17.2 UNDO LOGGING 851 17.2.1 LOG RECORDS 851 17.2.2 THE UNDO-LOGGING
RULES 853 17.2.3 RECOVERY USING UNDO LOGGING 855 17.2.4 CHECKPOINTING
857 17.2.5 NONQUIESCENT CHECKPOINTING 858 17.2.6 EXERCISES FOR SECTION
17.2 862 17.3 REDO LOGGING 863 17.3.1 THE REDO-LOGGING RULE 863 17.3.2
RECOVERY WITH REDO LOGGING 864 17.3.3 CHECKPOINTING A REDO LOG 866
17.3.4 RECOVERY WITH A CHECKPOINTED REDO LOG 867 17.3.5 EXERCISES FOR
SECTION 17.3 868 17.4 UNDO/REDO LOGGING 869 17.4.1 THE UNDO/REDO RULES
870 17.4.2 RECOVERY WITH UNDO/REDO LOGGING 870 17.4.3 CHECKPOINTING AN
UNDO/REDO LOG 872 17.4.4 EXERCISES FOR SECTION 17.4 874 17.5 PROTECTING
AGAINST MEDIA FAILURES 875 TABLE OF CONTENTS XXXI 17.5.1 THE ARCHIVE 875
17.5.2 NONQUIESCENT ARCHIVING 875 17.5.3 RECOVERY USING AN ARCHIVE AND
LOG 878 17.5.4 EXERCISES FOR SECTION 17.5 879 17.6 SUMMARY OF CHAPTER 17
879 17.7 REFERENCES FOR CHAPTER 17 881 18 CONCURRENCY CONTROL 883 18.1
SERIAL AND SERIALIZABLE SCHEDULES 884 18.1.1 SCHEDULES 884 18.1.2 SERIAL
SCHEDULES 885 18.1.3 SERIALIZABLE SCHEDULES 886 18.1.4 THE EFFECT OF
TRANSACTION SEMANTICS 887 18.1.5 A NOTATION FOR TRANSACTIONS AND
SCHEDULES 889 18.1.6 EXERCISES FOR SECTION 18.1 889 18.2
CONFLICT-SERIALIZABILITY 890 18.2.1 CONFLICTS 890 18.2.2 PRECEDENCE
GRAPHS AND A TEST FOR CONFLICT-SERIALIZABILITY 892 18.2.3 WHY THE
PRECEDENCE-GRAPH TEST WORKS 894 18.2.4 EXERCISES FOR SECTION 18.2 895
18.3 ENFORCING SERIALIZABILITY BY LOCKS 897 18.3.1 LOCKS 898 18.3.2 THE
LOCKING SCHEDULER 900 18.3.3 TWO-PHASE LOCKING 900 18.3.4 WHY TWO-PHASE
LOCKING WORKS 901 18.3.5 EXERCISES FOR SECTION 18.3 903 18.4 LOCKING
SYSTEMS WITH SEVERAL LOCK MODES 905 18.4.1 SHARED AND EXCLUSIVE LOCKS
905 18.4.2 COMPATIBILITY MATRICES 907 18.4.3 UPGRADING LOCKS 908 18.4.4
UPDATE LOCKS 909 18.4.5 INCREMENT LOCKS 911 18.4.6 EXERCISES FOR SECTION
18.4 913 18.5 AN ARCHITECTURE FOR A LOCKING SCHEDULER 915 18.5.1 A
SCHEDULER THAT INSERTS LOCK ACTIONS 915 18.5.2 THE LOCK TABLE 918 18.5.3
EXERCISES FOR SECTION 18.5 921 18.6 HIERARCHIES OF DATABASE ELEMENTS 921
18.6.1 LOCKS WITH MULTIPLE GRANULARITY 921 18.6.2 WARNING LOCKS 922
18.6.3 PHANTOMS AND HANDLING INSERTIONS CORRECTLY 926 18.6.4 EXERCISES
FOR SECTION 18.6 927 18.7 THE TREE PROTOCOL 927 18.7.1 MOTIVATION FOR
TREE-BASED LOCKING 927 18.7.2 RULES FOR ACCESS TO TREE-STRUCTURED DATA
928 XXXN TABLE OF CONTENTS 18.7.3 WHY THE TREE PROTOCOL WORKS 929 18.7.4
EXERCISES FOR SECTION 18.7 932 18.8 CONCURRENCY CONTROL BY TIMESTAMPS
933 18.8.1 TIMESTAMPS 934 18.8.2 PHYSICALLY UNREALIZABLE BEHAVIORS 934
18.8.3 PROBLEMS WITH DIRTY DATA 935 18.8.4 THE RULES FOR TIMESTAMP-BASED
SCHEDULING 937 18.8.5 MULTIVERSION TIMESTAMPS 939 18.8.6 TIMESTAMPS
VERSUS LOCKING 941 18.8.7 EXERCISES FOR SECTION 18.8 942 18.9
CONCURRENCY CONTROL BY VALIDATION 942 18.9.1 ARCHITECTURE OF A
VALIDATION-BASED SCHEDULER 942 18.9.2 THE VALIDATION RULES 943 18.9.3
COMPARISON OF THREE CONCURRENCY-CONTROL MECHANISMS . 946 18.9.4
EXERCISES FOR SECTION 18.9 948 18.10SUMMARY OF CHAPTER 18 948
18.11REFERENCES FOR CHAPTER 18 950 19 MORE ABOUT TRANSACTION MANAGEMENT
953 19.1 SERIALIZABILITY AND RECOVERABILITY 953 19.1.1 THE DIRTY-DATA
PROBLEM 954 19.1.2 CASCADING ROLLBACK 955 19.1.3 RECOVERABLE SCHEDULES
956 19.1.4 SCHEDULES THAT AVOID CASCADING ROLLBACK 957 19.1.5 MANAGING
ROLLBACKS USING LOCKING 957 19.1.6 GROUP COMMIT 959 19.1.7 LOGICAL
LOGGING 960 19.1.8 RECOVERY FROM LOGICAL LOGS 963 19.1.9 EXERCISES FOR
SECTION 19.1 965 19.2 DEADLOCKS 966 19.2.1 DEADLOCK DETECTION BY TIMEOUT
967 19.2.2 THE WAITS-FOR GRAPH 967 19.2.3 DEADLOCK PREVENTION BY
ORDERING ELEMENTS 970 19.2.4 DETECTING DEADLOCKS BY TIMESTAMPS 970
19.2.5 COMPARISON OF DEADLOCK-MANAGEMENT METHODS 972 19.2.6 EXERCISES
FOR SECTION 19.2 974 19.3 LONG-DURATION TRANSACTIONS 975 19.3.1 PROBLEMS
OF LONG TRANSACTIONS 976 19.3.2 SAGAS 978 19.3.3 COMPENSATING
TRANSACTIONS 979 19.3.4 WHY COMPENSATING TRANSACTIONS WORK 980 19.3.5
EXERCISES FOR SECTION 19.3 981 19.4 SUMMARY OF CHAPTER 19 982 19.5
REFERENCES FOR CHAPTER 19 983 TABLE OF CONTENTS XXXIII 20 PARALLEL AND
DISTRIBUTED DATABASES 985 20.1 PARALLEL ALGORITHMS ON RELATIONS 985
20.1.1 MODELS OF PARALLELISM 986 20.1.2 TUPLE-AT-A-TIME OPERATIONS IN
PARALLEL 989 20.1.3 PARALLEL ALGORITHMS FOR FULL-RELATION OPERATIONS 989
20.1.4 PERFORMANCE OF PARALLEL ALGORITHMS 990 20.1.5 EXERCISES FOR
SECTION 20.1 993 20.2 THE MAP-REDUCE PARALLELISM FRAMEWORK 993 20.2.1
THE STORAGE MODEL 993 20.2.2 THE MAP FUNCTION 994 20.2.3 THE REDUCE
FUNCTION 995 20.2.4 EXERCISES FOR SECTION 20.2 996 20.3 DISTRIBUTED
DATABASES 997 20.3.1 DISTRIBUTION OF DATA 997 20.3.2 DISTRIBUTED
TRANSACTIONS 998 20.3.3 DATA REPLICATION 999 20.3.4 EXERCISES FOR
SECTION 20.3 1000 20.4 DISTRIBUTED QUERY PROCESSING 1000 20.4.1 THE
DISTRIBUTED JOIN PROBLEM 1000 20.4.2 SEMIJOIN REDUCTIONS 1001 20.4.3
JOINS OF MANY RELATIONS 1002 20.4.4 ACYCLIC HYPERGRAPHS 1003 20.4.5 FULL
REDUCERS FOR ACYCLIC HYPERGRAPHS 1005 20.4.6 WHY THE FULL-REDUCER
ALGORITHM WORKS 1006 20.4.7 EXERCISES FOR SECTION 20.4 1007 20.5
DISTRIBUTED COMMIT 1008 20.5.1 SUPPORTING DISTRIBUTED ATOMICITY 1008
20.5.2 TWO-PHASE COMMIT 1009 20.5.3 RECOVERY OF DISTRIBUTED TRANSACTIONS
1011 20.5.4 EXERCISES FOR SECTION 20.5 1013 20.6 DISTRIBUTED LOCKING
1014 20.6.1 CENTRALIZED LOCK SYSTEMS 1015 20.6.2 A COST MODEL FOR
DISTRIBUTED LOCKING ALGORITHMS . 1015 20.6.3 LOCKING REPLICATED
ELEMENTS 1016 20.6.4 PRIMARY-COPY LOCKING 1017 20.6.5 GLOBAL LOCKS FROM
LOCAL LOCKS 1017 20.6.6 EXERCISES FOR SECTION 20.6 1019 20.7
PEER-TO-PEER DISTRIBUTED SEARCH 1020 20.7.1 PEER-TO-PEER NETWORKS 1020
20.7.2 THE DISTRIBUTED-HASHING PROBLEM 1021 20.7.3 CENTRALIZED SOLUTIONS
FOR DISTRIBUTED HASHING 1022 20.7.4 CHORD CIRCLES 1022 20.7.5 LINKS IN
CHORD CIRCLES 1024 20.7.6 SEARCH USING FINGER TABLES 1024 20.7.7 ADDING
NEW NODES 1027 XXXIV TABLE OF CONTENTS 20.7.8 WHEN A PEER LEAVES THE
NETWORK 1030 20.7.9 WHEN A PEER FAILS 1030 20.7.10 EXERCISES FOR SECTION
20.7 1031 20.8 SUMMARY OF CHAPTER 20 1031 20.9 REFERENCES FOR CHAPTER 20
1033 V OTHER ISSUES IN MANAGEMENT OF MASSIVE DATA 1035 21 INFORMATION
INTEGRATION 1037 21.1 INTRODUCTION TO INFORMATION INTEGRATION 1037
21.1.1 WHY INFORMATION INTEGRATION? 1038 21.1.2 THE HETEROGENEITY
PROBLEM 1040 21.2 MODES OF INFORMATION INTEGRATION 1041 21.2.1 FEDERATED
DATABASE SYSTEMS 1042 21.2.2 DATA WAREHOUSES 1043 21.2.3 MEDIATORS 1046
21.2.4 EXERCISES FOR SECTION 21.2 1048 21.3 WRAPPERS IN MEDIATOR-BASED
SYSTEMS 1049 21.3.1 TEMPLATES FOR QUERY PATTERNS 1050 21.3.2 WRAPPER
GENERATORS 1051 21.3.3 FILTERS 1052 21.3.4 OTHER OPERATIONS AT THE
WRAPPER 1053 21.3.5 EXERCISES FOR SECTION 21.3 1054 21.4
CAPABILITY-BASED OPTIMIZATION 1056 21.4.1 THE PROBLEM OF LIMITED SOURCE
CAPABILITIES 1056 21.4.2 A NOTATION FOR DESCRIBING SOURCE CAPABILITIES
1057 21.4.3 CAPABILITY-BASED QUERY-PLAN SELECTION 1058 21.4.4 ADDING
COST-BASED OPTIMIZATION 1060 21.4.5 EXERCISES FOR SECTION 21.4 1060 21.5
OPTIMIZING MEDIATOR QUERIES 1061 21.5.1 SIMPLIFIED ADORNMENT NOTATION
1061 21.5.2 OBTAINING ANSWERS FOR SUBGOALS 1062 21.5.3 THE CHAIN
ALGORITHM 1063 21.5.4 INCORPORATING UNION VIEWS AT THE MEDIATOR 1067
21.5.5 EXERCISES FOR SECTION 21.5 1068 21.6 LOCAL-AS-VIEW MEDIATORS 1069
21.6.1 MOTIVATION FOR LAV MEDIATORS 1069 21.6.2 TERMINOLOGY FOR LAV
MEDIATION 1070 21.6.3 EXPANDING SOLUTIONS 1071 21.6.4 CONTAINMENT OF
CONJUNCTIVE QUERIES 1073 21.6.5 WHY THE CONTAINMENT-MAPPING TEST WORKS
1075 21.6.6 FINDING SOLUTIONS TO A MEDIATOR QUERY 1076 21.6.7 WHY THE
LMSS THEOREM HOLDS 1077 21.6.8 EXERCISES FOR SECTION 21.6 1078 TABLE OF
CONTENTS XXXV 21.7 ENTITY RESOLUTION 1078 21.7.1 DECIDING WHETHER
RECORDS REPRESENT A COMMON ENTITY . 1079 21.7.2 MERGING SIMILAR RECORDS
1081 21.7.3 USEFUL PROPERTIES OF SIMILARITY AND MERGE FUNCTIONS . . .
1082 21.7.4 THE R-SWOOSH ALGORITHM FOR 1* AR RECORDS 1083 21.7.5 WHY
R-SWOOSH WORKS 1086 21.7.6 OTHER APPROACHES TO ENTITY RESOLUTION 1086
21.7.7 EXERCISES FOR SECTION 21.7 1087 21.8 SUMMARY OF CHAPTER 21 1089
21.9 REFERENCES FOR CHAPTER 21 1091 22 DATA MINING 1093 22.1
FREQUENT-ITEMSET MINING 1093 22.1.1 THE MARKET-BASKET MODEL 1094 22.1.2
BASIC DEFINITIONS 1095 22.1.3 ASSOCIATION RULES 1097 22.1.4 THE
COMPUTATION MODEL FOR FREQUENT ITEMSETS 1098 22.1.5 EXERCISES FOR
SECTION 22.1 1099 22.2 ALGORITHMS FOR FINDING FREQUENT ITEMSETS 1100
22.2.1 THE DISTRIBUTION OF FREQUENT ITEMSETS 1100 22.2.2 THE NAIVE
ALGORITHM FOR FINDING FREQUENT ITEMSETS . . . 1101 22.2.3 THE A-PRIORI
ALGORITHM 1102 22.2.4 IMPLEMENTATION OF THE A-PRIORI ALGORITHM 1104
22.2.5 MAKING BETTER USE OF MAIN MEMORY 1105 22.2.6 WHEN TO USE THE PCY
ALGORITHM 1106 22.2.7 THE MULTISTAGE ALGORITHM 1107 22.2.8 EXERCISES FOR
SECTION 22.2 1109 22.3 FINDING SIMILAR ITEMS 1110 22.3.1 THE JACCARD
MEASURE OF SIMILARITY 1110 22.3.2 APPLICATIONS OF JACCARD SIMILARITY
1110 22.3.3 MINHASHING 1112 22.3.4 MINHASHING AND JACCARD DISTANCE 1113
22.3.5 WHY MINHASHING WORKS 1113 22.3.6 IMPLEMENTING MINHASHING 1114
22.3.7 EXERCISES FOR SECTION 22.3 1115 22.4 LOCALITY-SENSITIVE HASHING
1116 22.4.1 ENTITY RESOLUTION AS AN EXAMPLE OF LSH 1117 22.4.2
LOCALITY-SENSITIVE HASHING OF SIGNATURES 1118 22.4.3 COMBINING
MINHASHING AND LOCALITY-SENSITIVE HASHING . . 1121 22.4.4 EXERCISES FOR
SECTION 22.4 1122 22.5 CLUSTERING OF LARGE-SCALE DATA 1123 22.5.1
APPLICATIONS OF CLUSTERING 1123 22.5.2 DISTANCE MEASURES 1125 22.5.3
AGGLOMERATIVE CLUSTERING 1128 22.5.4 A;-MEANS ALGORITHMS 1130 XXXVI
TABLE OF CONTENTS 22.5.5 FC-MEANS FOR LARGE-SCALE DATA 1132 22.5.6
PROCESSING A MEMORY LOAD OF POINTS 1133 22.5.7 EXERCISES FOR SECTION
22.5 1136 22.6 SUMMARY OF CHAPTER 22 1137 22.7 REFERENCES FOR CHAPTER 22
1139 23 DATABASE SYSTEMS AN D THE INTERNET 1141 23.1 THE ARCHITECTURE OF
A SEARCH ENGINE 1141 23.1.1 COMPONENTS OF A SEARCH ENGINE 1142 23.1.2
WEB CRAWLERS 1143 23.1.3 QUERY PROCESSING IN SEARCH ENGINES 1146 23.1.4
RANKING PAGES 1146 23.2 PAGERANK FOR IDENTIFYING IMPORTANT PAGES 1147
23.2.1 THE INTUITION BEHIND PAGERANK 1147 23.2.2 RECURSIVE FORMULATION
OF PAGERANK - FIRST TRY 1148 23.2.3 SPIDER TRAPS AND DEAD ENDS 1150
23.2.4 PAGERANK ACCOUNTING FOR SPIDER TRAPS AND DEAD ENDS . 1153 23.2.5
EXERCISES FOR SECTION 23.2 1154 23.3 TOPIC-SPECIFIC PAGERANK 1156 23.3.1
TELEPORT SETS 1156 23.3.2 CALCULATING A TOPIC-SPECIFIC PAGERANK 1158
23.3.3 LINK SPAM 1159 23.3.4 TOPIC-SPECIFIC PAGERANK AND LINK SPAM 1160
23.3.5 EXERCISES FOR SECTION 23.3 1161 23.4 DATA STREAMS 1161 23.4.1
DATA-STREAM-MANAGEMENT SYSTEMS 1162 23.4.2 STREAM APPLICATIONS 1163
23.4.3 A DATA-STREAM DATA MODEL 1164 23.4.4 CONVERTING STREAMS INTO
RELATIONS 1165 23.4.5 CONVERTING RELATIONS INTO STREAMS 1166 23.4.6
EXERCISES FOR SECTION 23.4 1168 23.5 DATA MINING OF STREAMS 1169 23.5.1
MOTIVATION 1169 23.5.2 COUNTING BITS 1171 23.5.3 COUNTING THE NUMBER OF
DISTINCT ELEMENTS 1175 23.5.4 EXERCISES FOR SECTION 23.5 1176 23.6
SUMMARY OF CHAPTER 23 1177 23.7 REFERENCES FOR CHAPTER 23 1179 INDEX
1183 |
any_adam_object | 1 |
any_adam_object_boolean | 1 |
author | Garcia-Molina, Hector Ullman, Jeffrey D. 1942- Widom, Jennifer |
author_GND | (DE-588)123598230 |
author_facet | Garcia-Molina, Hector Ullman, Jeffrey D. 1942- Widom, Jennifer |
author_role | aut aut aut |
author_sort | Garcia-Molina, Hector |
author_variant | h g m hgm j d u jd jdu j w jw |
building | Verbundindex |
bvnumber | BV035145313 |
classification_rvk | ST 270 ST 271 |
classification_tum | DAT 650f |
ctrlnum | (OCoLC)316129454 (DE-599)BVBBV035145313 |
discipline | Informatik |
discipline_str_mv | Informatik |
edition | 2. ed., internat. ed. |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01660nam a2200409 c 4500</leader><controlfield tag="001">BV035145313</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20110621 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">081106s2009 a||| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">0131354280</subfield><subfield code="9">0-13-135428-0</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9780131354289</subfield><subfield code="9">978-0-13-135428-9</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)316129454</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV035145313</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rakwb</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-29T</subfield><subfield code="a">DE-859</subfield><subfield code="a">DE-703</subfield><subfield code="a">DE-83</subfield><subfield code="a">DE-384</subfield><subfield code="a">DE-2070s</subfield><subfield code="a">DE-861</subfield><subfield code="a">DE-91G</subfield><subfield code="a">DE-355</subfield><subfield code="a">DE-898</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 270</subfield><subfield code="0">(DE-625)143638:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 271</subfield><subfield code="0">(DE-625)143639:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">DAT 650f</subfield><subfield code="2">stub</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Garcia-Molina, Hector</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Database systems</subfield><subfield code="b">the complete book</subfield><subfield code="c">Hector Garcia-Molina ; Jeffrey D. Ullman ; Jennifer Widom</subfield></datafield><datafield tag="250" ind1=" " ind2=" "><subfield code="a">2. ed., internat. ed.</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Upper Saddle River, NJ</subfield><subfield code="b">Prentice Hall</subfield><subfield code="c">2009</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XXXVI, 1203 S.</subfield><subfield code="b">Ill.</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="0" ind2=" "><subfield code="a">Pearson International edition</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Datenbanksystem</subfield><subfield code="0">(DE-588)4113276-2</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="655" ind1=" " ind2="7"><subfield code="0">(DE-588)4123623-3</subfield><subfield code="a">Lehrbuch</subfield><subfield code="2">gnd-content</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Datenbanksystem</subfield><subfield code="0">(DE-588)4113276-2</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Ullman, Jeffrey D.</subfield><subfield code="d">1942-</subfield><subfield code="e">Verfasser</subfield><subfield code="0">(DE-588)123598230</subfield><subfield code="4">aut</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Widom, Jennifer</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">GBV Datenaustausch</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=016812633&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-016812633</subfield></datafield></record></collection> |
genre | (DE-588)4123623-3 Lehrbuch gnd-content |
genre_facet | Lehrbuch |
id | DE-604.BV035145313 |
illustrated | Illustrated |
index_date | 2024-07-02T22:28:34Z |
indexdate | 2024-07-09T21:23:19Z |
institution | BVB |
isbn | 0131354280 9780131354289 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-016812633 |
oclc_num | 316129454 |
open_access_boolean | |
owner | DE-29T DE-859 DE-703 DE-83 DE-384 DE-2070s DE-861 DE-91G DE-BY-TUM DE-355 DE-BY-UBR DE-898 DE-BY-UBR |
owner_facet | DE-29T DE-859 DE-703 DE-83 DE-384 DE-2070s DE-861 DE-91G DE-BY-TUM DE-355 DE-BY-UBR DE-898 DE-BY-UBR |
physical | XXXVI, 1203 S. Ill. |
publishDate | 2009 |
publishDateSearch | 2009 |
publishDateSort | 2009 |
publisher | Prentice Hall |
record_format | marc |
series2 | Pearson International edition |
spelling | Garcia-Molina, Hector Verfasser aut Database systems the complete book Hector Garcia-Molina ; Jeffrey D. Ullman ; Jennifer Widom 2. ed., internat. ed. Upper Saddle River, NJ Prentice Hall 2009 XXXVI, 1203 S. Ill. txt rdacontent n rdamedia nc rdacarrier Pearson International edition Datenbanksystem (DE-588)4113276-2 gnd rswk-swf (DE-588)4123623-3 Lehrbuch gnd-content Datenbanksystem (DE-588)4113276-2 s DE-604 Ullman, Jeffrey D. 1942- Verfasser (DE-588)123598230 aut Widom, Jennifer Verfasser aut GBV Datenaustausch application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=016812633&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Garcia-Molina, Hector Ullman, Jeffrey D. 1942- Widom, Jennifer Database systems the complete book Datenbanksystem (DE-588)4113276-2 gnd |
subject_GND | (DE-588)4113276-2 (DE-588)4123623-3 |
title | Database systems the complete book |
title_auth | Database systems the complete book |
title_exact_search | Database systems the complete book |
title_exact_search_txtP | Database systems the complete book |
title_full | Database systems the complete book Hector Garcia-Molina ; Jeffrey D. Ullman ; Jennifer Widom |
title_fullStr | Database systems the complete book Hector Garcia-Molina ; Jeffrey D. Ullman ; Jennifer Widom |
title_full_unstemmed | Database systems the complete book Hector Garcia-Molina ; Jeffrey D. Ullman ; Jennifer Widom |
title_short | Database systems |
title_sort | database systems the complete book |
title_sub | the complete book |
topic | Datenbanksystem (DE-588)4113276-2 gnd |
topic_facet | Datenbanksystem Lehrbuch |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=016812633&sequence=000001&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT garciamolinahector databasesystemsthecompletebook AT ullmanjeffreyd databasesystemsthecompletebook AT widomjennifer databasesystemsthecompletebook |