index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... ·...

21
Index Boldface numbers indicate illustrations and tables. A Access control, 76 ALTER TABLE and, 323 ACCESSCTRL, 81, 90 Actionable compression, 10, 63, 164 Activation time for triggers, 337 Adaptive compression, 10 Add-on products for DB2, 35, 48–51 ADMIN_CMD, 17 ADMIN_MOVE_TABLE (), 7 Administrative views, 7 ADO, 142 ADO.NET, 15, 142 Advanced Copy Services (ACS), 10, 40 Advanced Database Administrator. See IBM Certified Advanced Database Administrator, DB2 10.1 Advanced recovery, 48, 50 AFTER trigger, 126, 337, 341, 342–343 AIX, 36, 38, 43, 76 Aliases, 14, 117, 123–124 ALL clause, SELECT, 180, 184 ALTER, 87 nicknames and, 88 tables and, 85 ALTER INDEX, 336–337 compression and, 163–164 ALTER SEQUENCE, 125 ALTER TABLE, 321–323 access control and, 323 compression and, 163 locks and, 364–366, 373 ALTERIN, 84 Ambiguous cursors, 231 Analytics, 4, 9 ANALYTICS, 59–60 Analyze, 11 ANY clause SELECT and, 184 Apache, 41 Application developer. See IBM Certified Application Developer, DB2 9.7 Application period, 160 Application time, 160 Application-period tables, 3 Application-period temporal tables, 161 SELECT and, 236 Approximate Huffman encoding, 10, 63, 63, 164 Arithmetic expressions, XML, 241 ARRAY, 71 label-based access control (LBAC) and, 103 Arrays, 17 Assembler, 130, 250 Assignment statements, 16 ASYNC mode, 57 ATTACH/DETACH PARTITION, 153 Audit, 8, 13, 43 Authentication, 76–79, 144 CLIENT, 78 DATA_ENCRYPT, 78 DATA_ENCRYPT_CMP, 78

Upload: others

Post on 08-Jul-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

Index

Boldface numbers indicate illustrations and tables.

AAccess control, 76

ALTER TABLE and, 323ACCESSCTRL, 81, 90Actionable compression, 10, 63, 164Activation time for triggers, 337Adaptive compression, 10Add-on products for DB2, 35, 48–51ADMIN_CMD, 17ADMIN_MOVE_TABLE (), 7Administrative views, 7ADO, 142ADO.NET, 15, 142Advanced Copy Services (ACS), 10, 40Advanced Database Administrator. See IBM Certified

Advanced Database Administrator, DB2 10.1Advanced recovery, 48, 50AFTER trigger, 126, 337, 341, 342–343AIX, 36, 38, 43, 76Aliases, 14, 117, 123–124ALL clause, SELECT, 180, 184ALTER, 87

nicknames and, 88tables and, 85

ALTER INDEX, 336–337compression and, 163–164

ALTER SEQUENCE, 125ALTER TABLE, 321–323

access control and, 323compression and, 163

locks and, 364–366, 373ALTERIN, 84Ambiguous cursors, 231Analytics, 4, 9ANALYTICS, 59–60Analyze, 11ANY clause

SELECT and, 184Apache, 41Application developer. See IBM Certified Application

Developer, DB2 9.7Application period, 160Application time, 160Application-period tables, 3Application-period temporal tables, 161

SELECT and, 236Approximate Huffman encoding, 10, 63, 63, 164Arithmetic expressions, XML, 241ARRAY, 71

label-based access control (LBAC) and, 103Arrays, 17Assembler, 130, 250Assignment statements, 16ASYNC mode, 57ATTACH/DETACH PARTITION, 153Audit, 8, 13, 43Authentication, 76–79, 144

CLIENT, 78DATA_ENCRYPT, 78DATA_ENCRYPT_CMP, 78

Page 2: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

Index 483

Distributed Computing Environment (DCE) Security Services in, 77

GSS_SERVER_ENCRYPT, 79GSSPLUGIN, 79KERBEROS, 78KRB_SERVER_ENCRYPT, 78–79location for, 77–79passwords in, 77SERVER, 78SERVER_ENCRYPT, 78user IDs in, 77

Authorities and privileges, 2, 5, 8, 14, 75, 79–97ACCESSCTRL, 81administrative, 80authorization ID privilege in, 84DATAACCESS, 82database privileges in, 82–83DBADM, 81explicitly granting, 90granting, 89–94implicitly granting, 89–90indexes, 86indirectly granting, 90LBAC and, 80–81nicknames, 88object privileges in, 82–83packages, 87RCAC and, 80–81REVOKE and revoking, 94–97roles and, 92–93routines, 87schema privileges in, 84SECADM, 81, 82separation of management and security-related tasks

in, 82sequence privileges and, 86–87server, 87–88SQLADM, 82SYSADM, 80, 82SYSCTRL, 80SYSMAINT, 80–81SYSMON, 81table privileges in, 85table space privilege in, 84variables, 89view privileges in, 85–86WLMADM, 82

workload privileges, 89XML schema repository (XSR) objects, 89

Authorization ID privilege, 84Authorization levels, 75Auto-monitoring, 7Automatic maintenance, 42Automatic storage, 7, 42Automatic storage (AS) table space, 134Autonomic features, 9, 42–43Availability

pureScale and, 56workload management and, 52

BBackup and recovery, 7, 12, 41, 43, 45. See also high

availability disaster recovery (HADR),Advanced Recovery feature for, 50High-Performance Unload for, 50Merge Backup for, 50Recovery Expert for, 50

Backup compression, 10, 39Base tables, 119, 152, 267, 324, 324–326

temporary tables vs., 324–326BEFORE triggers, 126, 337, 341–342BETWEEN, 152

SELECT and, 183, 187–188BIGINT, 124, 269, 304Binary large object (BLOB), 274, 305BIND, packages, 87BINDADD, 83Binder, 131Binding/rebinding, 15, 83, 131

deferred, 131Bitemporal (time-travel) tables, 3, 161

SELECT and, 237Blink Ultra, 57–58BLOBs, 274, 305BLU Acceleration, 4, 9–10, 35, 43, 45, 48, 49, 57–68

Blink Ultra project and, 57–58column organized tables and column store in, 61–62,

62, 68compression in, 62–64, 63configuring for, using db2set and WORKLOAD

ANALYTICS, 59–60data skipping in, 67

Page 3: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

484 Index

design principles of, 58–67encoding in, 62–64, 63IBM Smart Analytics Optimizer for DB2 for z/OS and,

58implementation and use of, 58–60Informix Warehouse accelerator and, 58memory caching in, 66–67online transaction processing (OLTP) and, 68parallel vector processing in, 64–65, 65parallelism in, 65–66query performance in, 59REORG and, 59RUNSTATS and, 59shadow tables and, 159single instruction multiple data (SIMD) processing in,

64–65, 65transaction processing in, 66–67use of, 68

Boundaries, transaction, 256Buffer pools, 12, 131–132

transaction management and, 256Built-in functions, 14, 69, 165Business Application Continuity, 43, 45, 48, 49Business time, 160

CC/C++, 130, 250Cache memory, 82

BLU Acceleration and, 66–67CALL, 339

stored procedures and, 253–256Call Level Interface (CLI)

connectivity and, 151isolation levels and, 359

Call Level Interface/Open Database Connectivity (CLI/ODBC), 15

Cartesian products, join operations, 211–212CASCADED CHECK OPTION, 330–331, 331, 332CASE expressions, SELECT, 207–211CAST, 266Cast expressions, XML, 241Casting, in data types, 69Catalog. See System catalogCATALOG/UNCATALOG DATABASE, 140–141,

142–145, 147–148, 147

CATALOG/UNCATALOG TCPIP NODE, 145–147Cataloging/uncataloging

database and CATALOG/UNCATALOG DATABASE, 142–145

DCS database, CATALOG/UNCATALOG DCS DATABASE and, 147–148

nodes, CATALOG/UNCATALOG TCPIP NODE, 145–147

Cells, 119Certificate of completion, 32–33Certification process, 18–33

arranging to take exams in, 20–22certificate for, 32–33cost of exams for, 22Fulfillment ID and Validation Number in, 32identification needed to take exams in, 22information required for registration in, 21objectives of exams in, 20pass and fail in, 31preparing for the exams, in, 18–20previous exams taken and, 22sample questions and practice exams for, 20score report for, 31, 32taking the exams, 22–33

Chaining, 124Change Data Capture (CDC), 46Change transaction, 366–367, 367CHAR VARYING, 271, 305. See also VARCHARCHAR/CHARACTER, 71, 265, 271, 305Character data string data types, 270–272

CHAR/CHARACTER, 271, 305fixed length, 270–271fixed-length double-byte (DBCS), 271, 305GRAPHIC, 271, 305large object (CLOB), 274multibyte-byte character set (MBCS) and, 274national fixed-length, 271–272, 305national varying-length, 272NCHAR/NVARCHAR, 272single-byte character set (SBCS) and, 274Unicode and, 271–272VARCHAR/CHAR VARYING/CHARACTER

VARYING, 271, 305VARGRAPHIC, 271, 305varying-length double-byte, 271, 305varying-length, 271, 305

Page 4: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

Index 485

Character large object (CLOB), 265, 274, 305CHARACTER VARYING, 271, 305. See also VARCHARCHARVAR, 271, 305CHECK, 3, 7, 267, 277, 282–283, 283

CREATE TABLE and, 304, 306, 309Check conditions, 283CHECK OPTION, 328–331 329, 331, 332Child table/row, referential integrity constraints, 285, 286CLIENT authentication, 78CLOBs, 265, 274, 305Cluster Caching Facility (CF), 55Cluster Services (CS), 55Clustering, 123

indexes and, 335insert time clustering tables (ICT), 119, 158multidimensional clustering (MDC) tables, 12, 44, 53,

59, 119, 154–158, 155, 156, 157range-clustered tables (RCT) and, 12, 119, 154,

264–265COBOL, 130, 250Codd, Edgar Frank (Ted), 36CODEUNITS16, string unit attributes, 266CODEUNITS32, string unit attributes, 266Column data size, 10Column masks, 100–101Column-organized tables, 10, 45, 61–62, 62, 68

db2convert and, 69Column Table Queue (CTQ), 10Column-level LBAC, 108–109Columnar Data Engine (CDE), 10Columns, 119Command Line Processor (CLP)

connectivity and, 151isolation levels and, 359SQL and, 166

COMMIT, 5, 14, 256–260, 257, 258, 259isolation levels and, 350locks and, 360

Common table expressions, 205–207Comparison expressions, XML, 241Comparison functions, 127Comparison operators, 184–186. See also Relational

predicates and WHERECompatibility features in DB2 10.5, 69–73

enabling, 72–73

Compatibility of locks, 373, 374Compatibility, Oracle data types, 276Compatibility, SQL, 39, 165, 263–266

extended row size support, 264–265NULL index keys and, 265string unit attributes and, 265–266

Compression, 7, 10, 12, 39, 162–164actionable, 10, 63, 164adaptive row, 163approximate Huffman encoding and, 10. 63, 63, 164BLU Acceleration and, 62–64, 63CREATE/ALTER INDEX and, 163–164row, 163static, 163

Concurrency, 256, 345–380. See also Transactions and transaction management

consistency of data and, 346currently committed (CC) semantics and, 368–373, 368isolation levels and, 345, 347–360. See also Isolation

levelslocks and locking in, 345, 347, 360–380, 360. See also

Locks and Lockingtransactions and, 347

Conditional expressions, XML, 241Configuration, 9, 43Configuration Manager, 47CONNECT, 83CONNECT BY PRIOR, 71Connection concentrator, 44Connectivity, 8, 83, 144

Call Level Interface (CLI) and, 151Command Line Processor (CLP) and, 151CONNECT and, 148–151Database Connection Services (DCS), 142dormant connections and, 151Open Database Connectivity (ODBC) and, 151SET CONNECTION, 150, 150type 1 and type 2, 115, 150–151, 150

Consistency of data, 346Constraints, 3, 7, 15, 267, 277–302

CHECK, 277, 282–283, 283, 304default, 277, 278–280, 280informational, 277, 301–302, 302, 308, 309NOT NULL, 277, 278, 279, 282, 308primary key and UNIQUE, 282

Page 5: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

486 Index

referential integrity, 277, 283–301, 284, 304, 307, 309. See also Referential integrity

table check, 282–283. See also CHECKUNIQUE, 277, 280–282, 281, 304, 306, 309

Constructor expressions, XML, 241Containers, in table spaces, 132Continuous data ingest (CDI), 46CONTROL, 90

indexes and, 86–87nicknames and, 88packages and, 87tables and, 85views and, 85

Control statements, 16Control structures, 130Core-friendly parellelism in BLU, 65–66Cost of certification exams, 22Crash recover, 7CREATE DATABASE, 136–139CREATE EVENT MONITOR, 82CREATE FUNCTION, 17, 244–248, 252CREATE INDEX, 265, 333

compression and, 163–164CREATE MASK, 100–101CREATE PERMISSION, row and column access control

(RCAC), 98–99CREATE PROCEDURE, 16, 251–253CREATE ROLE, 92CREATE SECURITY LABEL, 106CREATE SECURITY LABEL COMPONENT, 103–104CREATE SECURITY POLICY, 105CREATE TABLE, 264, 303–321

CHECK constraint in, 304, 306, 309compression and, 163data type definitions in, built-in, 304–306examples of, 315–321identity columns and, 310–313informational constraint in, 308, 309LIKE and, 313–314NOT NULL constraint in, 308referential integrity constraint and, 304, 307, 309–310schemas and, 314–315similar tables, with LIKE, 313–314syntax of, 303–304UNIQUE constraint in, 304, 306, 309

CREATE TRIGGER, 17, 337–344CREATE TRUSTED CONTEXT, 111CREATE VIEW, 327–328

WITH CHECK OPTION, 7CREATE_EXERNAL_ROUTINE, 83CREATE_NOT_FENCED_ROUTINE, 83CREATE_SECURE_OBJECT, 83Created global temporary tables, 162, 324CREATETAB, 83CREATIN, 84CUBE, GROUP BY, 197–199Currently committed (CC) semantics, 368–373. See

also Concurrency; Transactions and transaction management

enabling, 372overriding, 372–373

CURRVAL, 70Cursor scope, 14Cursor stability (CS) isolation level, 3, 6, 349, 353–354,

355Cursor-controlled transaction, 366–367, 367Cursors, 16

ambiguous, 231DECLARE CURSOR and, 231–232FETCH and, 232insensitive, 72read-only, 231results and results sets using, 231–232updatable, 231

DData Architect, 47Data concurrency. See ConcurrencyData constraints. See ConstraintsData Control Language (DCL), 3, 5, 166Data Definition Language (DDL), 3, 5, 47, 88, 115, 166Data dictionaries, 72Data encryption key (DEK), 113Data Manipulation Language (DML), 3, 5, 88, 166,

167–237. See also DELETE, INSERT, SELECT, UPDATE

XML and, 237–243Data objects, 117–131Data Partitioning Feature (DPF), 12, 46, 53–54, 54Data skipping, 10, 67

Page 6: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

Index 487

Data Studio, 7, 9, 12, 17, 38–39, 140indexes and, 123SQL and, 166

Data types, 3, 5, 14, 127–128, 265–266, 267, 268–277. See also specific data types

ARRAY, 71CREATE TABLE and, 304–306built-in, 304distinct, 127, 277implicit casting in, 69Oracle, compatibility of, 276reference/referenced types and, 162sequences and, 124–125string unit attributes and, 265–266structured, 127–128, 277sub, 128super, 128typed tables and, 162Unicode and, 266user-defined. See User-defined data typesweak typing in, 69XML, 275–276

Data warehouse, 2, 4, 35, 51DATA_ENCRYPT authentication, 78DATA_ENCRYPT_CMP authentication, 78DATAACCESS, 82

row and column access control (RCAC) and, 97, 102Database administrator. See IBM Certified Database

Administrator, DB2 10.1; IBM Certified Database Administrator, DB2 10.5; IBM Certified Advanced Database Administrator, DB2 10.1

Database associate. See IBM Certified Database Associate, DB2 10.1; IBM Certified Database Associate, DB2 10.5

Database Connection Services (DCS)cataloging/uncataloging database, CATALOG/

UNCATALOG DCS DATABASE and, 147–148directory for, 142

Database creation and CREATE DATABASE, 136–139Database managed space (DMS) table space, 134Database Manager, 36Database privileges, 82–83Database workloads. See Workload managementDatabases, 116–117, 116

cataloging/uncataloging, 142–145connecting to and CONNECT, 148–151

DATE and dates, 272–273, 272, 276, 305DB2 10.1 Advanced Database Admin for LUW (Exam

614), 13DB2 10.1 DBA for LUW (Exam 611), 8, 11, 13, 19DB2 10.1 Fundamentals (Exam 610), 8, 11, 13, 15, 17DB2 10.5 compatibility features, 69–73DB2 10.5 DBA for LUW Upgrade (Exam 311), 11DB2 10.5 Fundamentals for LUW (Exam 615), 8, 11, 13,

20, 35, 75, 115, 165, 267, 345DB2 9 Family Fundamentals (Exam 730), 8, 11, 13, 15, 17DB2 9.7 Application Development (Exam 543), 15DB2 9.7 certification roles, 14–17DB2 9.7 SQL Procedure Developer (Exam 545), 17DB2 Advanced Enterprise Server Edition (AESE), 37, 48DB2 Advanced Workgroup Server Edition (AWSE), 37,

45–47DB2 CLI, 142DB2 Connect, 46, 144DB2 Enterprise Server Edition (ESE), 37, 38, 44–45DB2 Express Server Edition, 37, 40–42DB2 Express-C, 37, 38–40DB2 Family of products, 36–48DB2 for Common Servers, 36DB2 for z/OS, 37, 38, 48DB2 V8.1 Family Fundamentals (Exam 700), 15, 17DB2 Workgroup Server Edition (WSE), 37, 42–43DB2_EVALUNCOMMITTED, 369DB2_SKIPDELETED, 369DB2_SKIPINSERTED, 368db2convert, 11, 69DB2LBACRULES, 104db2move, 7DB2SECURITYLABEL data type, 108db2set, BLU Acceleration, 59–60DBADM, 81DBCLOB, 266, 274, 306Deadlocks, 378–380, 379DEC/DECIMAL, 124, 269, 304DECFLOAT, 270, 304Decimal points, 270Decision support system (DSS), 2, 4DECLARE, 339

stored procedures and, 255–256DECLARE CURSOR, SELECT, 231–232

Page 7: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

488 Index

Declared global temporary tables, 17, 162, 324Default constraints, 267, 277, 278–280, 280Deferred binding, 131DELETE, 72, 90, 165, 166, 174–177

Delete Rule in, 293–296, 294, 295, 297–300global temporary tables and, 162nicknames and, 88positioned deletes and, 175propagation of, 296referential integrity constraints and, 293–296, 294, 295,

297–300searched deletes and, 175SELECT and, 174tables and, 85temporal or time-travel tables and, 232–234triggers and, 340TRUNCATE and, 175–177views and, 86WHERE clause and, 174WHERE CURRENT and, 175XML and, 240

Delete Rule, referential integrity constraints, 293–296, 294, 295, 297–300

Deleteable view, 120Descendant table/row, referential integrity constraints, 286Design Advisor, 7

indexes and, 123DETACH PARTITION, 153Diagnostics, 12Directory files, DB2, 140–142

CATALOG DATABASE and, 140–141Database Connection Services (DCS), 142LIST DATABASE DIRECTORY and, 140–141LIST NODE DIRECTORY and, 142local database, 141node, 141–142system database, 140–141

Dirty reads, 348Discovery, 8DISTINCT, 70

SELECT and, 180, 183Distinct data type, 127, 277Distributed Computing Environment (DCE) Security

Services, 77Distributed platforms, 36Distributed units of work, 15

DML, 14Dormant connections, 151DOUBLE/DOUBLE PRECISION, 270, 304Double-byte large object (DBCLOB), 266, 274, 306DROP EVENT MONITOR, 82DROPIN, 84DUAL, 71Dynamic random access memory (DRAM), 57Dynamic SQL, 14

EEclipse, 38Editions of the DB2 Family, 35, 37–48, 37Elimination, partition, 153–154Embedded application construct statements, 166Embedded SQL, 15, 142

isolation levels and, 359Encoding, 164

BLU Acceleration and, 62–64, 63Encryption, 40, 42, 43, 45, 46, 48–50, 112–113Enterprise Server Edition (ESE), 38Equal-to, 184–186Error handling, 16Escalation of locks, 376–378, 377Ethernet, 56Event, in triggers, 337Event monitors, 82Exam 311, 11Exam 543, 15Exam 545, 17Exam 610, 8, 11, 13, 15, 17Exam 611, 8, 11, 13, 19Exam 614, 13Exam 615, 8, 11, 13, 20, 35, 75, 115, 165, 267, 345Exam 700, 15, 17Exam 730, 8, 11, 13, 15, 17EXCEPT, 70

SELECT and, 228, 228, 230, 230EXCEPT ALL

SELECT and, 229, 229, 230, 230Exclusive (X) locks, 363EXECUTE

packages and, 87routines and, 87

Page 8: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

Index 489

EXISTS, SELECT, 184, 192–193Explain, 7, 10, 17EXPLAIN, 83Explicit Hierarchical Locking Multi-Tenancy Feature, 10Explicitly granting authorities and privileges, 90EXPORT, 7Expression-based index, 10Extensible markup language. See XMLExtents, in table spaces, 133External routines, 83External scalar user-defined function, 128, 243External stored procedures, 130External table user-defined function, 128–129, 243–244Extract, transform, load (ETL) solutions, 46

FFALSE values

CHECK and, 283SELECT and, 183, 199, 208–211

Federal Information Processing Standard (FIPS), 50Federated databases/federation, 13, 39, 44, 87–88FETCH

isolation levels and, 354SELECT and, 232

FETCH FIRSTSELECT and, 179, 183, 202–204

Fields, 119Fine-grained access control (FGAC), 98Firing, of triggers, 337FIRST, 72Fixed-length character data, 270–271Fixed-length double-byte (DBCS) character data, 271,

305. See also GRAPHICFixed-Term License (FTL), 40FixPacks, 10FLOAT, 269, 270, 304Floating data type, double-precision, 270Floating data type, single-precision, 269Floating-point, decimal, 270FLUSH EVENT MONITOR, 82FLUSH OPTIMIZATION PROFILE CACHE, 82FLUSH PACKAGE CACHE, 7, 82FLWOR expressions, in XML, 241FOR, 339

Foreign key, 283. See also Referential integrityreferential integrity constraints and, 285, 286

FROM clause, SELECT, 183Fulfillment ID and Validation Number, 32Functions, 17

built-in. See Built-in functionscomparison, 127scalar, 69–70SQL/XML, 240user-defined. See User-defined functions

GGeneral Parallel File System (GPFS), 55GET DIAGNOSTIC, 339Global declared temporary tables, 15, 162Global variables, 17, 70GRANT and granting authorities/privileges, 2, 5, 75,

89–94roles, 92–93security labels to users, 107

Granularity of triggers, 337GRAPHIC, 71, 265, 271, 305greater-than/greater-than or equal to, 184–186GROUP, 165GROUP BY, 122

SELECT and, 179, 183, 194–196GROUP BY CUBE

SELECT and, 197–199GROUP BY ROLLUP

SELECT and, 196–197Grouping, 5GSS_SERVER_ENCRYPT authentication, 79GSSPLUGIN authentication, 79

HHACMP Reliable Services Clustering Technology

(RCST), 56HADR. See High Availability Disaster Recovery (HADR)HAVING, SELECT and, 179, 183, 199–200Health monitoring, 43High availability (HA) features, 8High Availability Disaster Recovery (HADR), 8, 10, 12,

40, 41pureScale and, 57

Page 9: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

490 Index

High availability environments, 53High volume environments, 52High-Performance Unload, 50History of DB2 development, 36–48History tables, 119, 161HP-UX, 36, 43, 76Huffman encoding, 10, 63, 63, 164

IIBM and DB2 development, 36–48IBM Certified Advanced Database Administrator, DB2

10.1 for LUWcertification, 12–13knowledge required for, 12–13prerequisite exams for, 13roadmap to certification for, 13

IBM Certified Application Developer, DB2 9.7certification, 14–15knowledge required for, 14prerequisite exams for, 15roadmap to certification for, 16

IBM Certified Database Administrator, DB2 10.1DBA for LUW, 6–8knowledge required for, 6–8prerequisite exams for, 8roadmap to certification for, 9

IBM Certified Database Administrator, DB2 10.5DBA for LUW upgrade certification, 9–11prerequisite exams for, 11required knowledge for, 9–11roadmap to certification for, 11

IBM Certified Database Associate, DB2 10.1Fundamentals certification, 2–4required knowledge for, 2–3roadmap to certification for, 4

IBM Certified Database Associate, DB2 10.5Fundamentals certification, 4–6required knowledge for, 4–6roadmap to certification for, 6

IBM Certified Solution Developer, DB2 9.7 SQL Procedure

certification, 16–17knowledge required for, 16–17prerequisite exams for, 17roadmap to certification for, 18

IBM Insight conference, 21IBM Knowledge Center, 19IBM Smart Analytics Optimizer for DB2 for z/OS, 58Identifier length, 71Identity columns, CREATE TABLE and, 310–313IF, 339IMPLICIT_SCHEMA, 83Implicitly granting authorities and privileges, 89–90IMPORT, 7IN, 152

SELECT and, 184, 190–192INCLUDE, indexes and, 334INDEX

nicknames and, 88tables and, 85

Index key columns, 10Indexes, 3, 5, 12, 117, 121–123, 122, 267, 332–337

ALTER INDEX and, 336–337clustering and, 123, 335compression and, 163–164CREATE INDEX and, 265, 333expression-based, 10INCLUDE clause and, 334keys or key columns in, 121NULL keys in, 71, 265online transaction processing (OLTP) and, 336partitioning and, 153privileges for, 86REORG and, 335unique and UNIQUE clause and, 265, 334

Indirectly granting authorities and privileges, 90InfiniBand, 56Informational constraints, 3, 7, 277, 301–302, 302

CREATE TABLE and, 308, 309Informix, 39, 41Informix Warehouse accelerator, 58InfoSphere, shadow tables and, 159InfoSphere Optim Query Tuner, 69InfoSphere Optim, 46–47Ingest, 7Ingres, 36Inline LOBs, 275Inner joins, 212–216, 212, 216INOUT, 72INSERT, 165, 166, 167–170

Page 10: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

Index 491

global temporary tables and, 162Insert Rule for, 287–290, 288, 289locks and, 361, 362, 363, 367nicknames and, 88NULL/NOT NULL in, 168referential integrity constraints and, 286–290SELECT and, 169, 177subselects and, 169tables and, 85temporal or time-travel tables and, 232–234triggers and, 340VALUES clause in, 168views and, 86, 328XML and, 239

Insert Rule, referential integrity constraints and, 287–290, 288, 289

Insert time clustering (ITC) tables, 12, 119, 158pureScale and, 57

Insertable view, 120Instances, 6, 116–117, 116INSTEAD OF triggers, 126, 337, 341, 343–344INT/INTEGER, 124, 269, 304Intent exclusive (IX) locks, 362Intent none (IN) locks, 361Intent share (IS) locks, 361Intent to change transaction, 366–367, 367Interleaved transactions, 347International DB2 User’s Group (IDUG) conference, 21INTERSECT, SELECT and, 226, 226, 230, 230INTERSECT ALL, SELECT and, 227, 227, 230, 230IS NOT NULL, 152Isolation levels, 3, 5, 6, 14, 345, 347–360

Call Level Interface (CLI) and, 359choosing proper, 358Command Line Processor (CLP) and, 359COMMIT and, 350currently committed (CC) semantics and, 368–373cursor stability (CS), 349, 353–354, 355Embedded SQL and, 359FETCH and, 354Java Database Connectivity (JDBC)

and, 359locks and locking in, 349Open Database Connectivity (ODBC) and, 359read stability (RS), 349, 352, 353repeatable read (RR), 349–350, 351ROLLBACK and, 350

SELECT and, 179, 183, 204–205, 349, 359, 370, 371setting the level of, in different applications, 359specifying, 358–360SQL for Java (SQLJ) and, 359uncommitted read (UR), 349, 356, 357

ITERATE, 339

JJava, 47, 130, 250Java Database Connectivity (JDBC), 15, 142

isolation levels and, 359Java Message Service (JMS), 46Join operations, 71, 211–223

Cartesian products and, 211–212full outer, 217–223, 218, 220, 221, 222inner, 212–216, 212, 216left outer, 217–223, 218, 220, 221, 222outer, 212, 217–223, 218, 220, 221, 222right outer, 217–223, 218, 220, 221, 222, 217

KKERBEROS authentication, 78Keys, 121

primary, 10unique, 10

Key columns, 121KRB_SERVER_ENCRYPT authentication, 78–79

LLabel-based access control (LBAC), 5, 8, 40, 41, 75,

102–109ARRAY in, 103authorities and privileges and, 80–81column-level, 108–109CREATE SECURITY LABEL COMPONENT in,

103–104CREATE SECURITY LABEL in, 106CREATE SECURITY POLICY in, 105DB2LBACRULES in, 104DB2SECURITYLABEL data type for, 108granting security labels to users in, 107implementing, 108multilevel security in, 102SECADM and, 102security label components in, 103

Page 11: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

492 Index

security labels in, 105–106security policies in, 104–105SET in, 103TREE in, 103

Languages for DB2, 40, 43, 45, 47Large objects (LOBs), 2, 14, 127, 274–275

inline, 275LAST, 72LBAC. See label-based access control (LBAC)Least recently used (LRU), 66LEAVE, 339Less-than/less-than or equal to, 184–186Lightweight Directory Access Protocol (LDAP), 8LIKE

CREATE TABLE and, 313–314SELECT and, 183, 188–190

LIMIT, 72Linux, 36, 38, 41, 76LIST DATABASE DIRECTORY, 140–141LIST NODE DIRECTORY, 142Load, 11LOAD, 7, 83LOBs, 2, 14, 127, 274–275. See also Large objectsLOCAL CHECK OPTION, 328–329, 329Local database directory, 141Lock count, 361Lock list, 376LOCK TABLE, 3, 5, 364–366, 373Lock waits, 378Locks and locking, 3, 5, 345, 347, 349, 360–380, 360

acquiring, with ALTER or LOCK TABLE, 364–366ALTER TABLE and, 364–366, 373attributes of, 361avoidance of, 367–368COMMIT and, 360compatibility of, 373, 374conversion of, 374–376, 375currently committed (CC) semantics and, 368–373deadlocks and, 378–380, 379duration of, or lock count, 361enabling currently committed (CC) semantics, 372escalation of, 376–378, 377exclusive (X), 363INSERT and, 361, 362, 363, 367intent exclusive (IX), 362

intent none (IN), 361intent share (IS), 361isolation levels and, 204–205lock list and, 376LOCK TABLE and, 364–366, 373maxlocks and, 376, 377next key weak exclusive (NW), 362object of, 361overriding currently committed (CC) semantics, 372performance issues and, 373–380ROLLBACK and, 360scan share (NS), 362SELECT and, 204–205, 361, 362, 363, 367, 368selecting locks to acquire, 366–367share (S), 362share with intent exclusive (SIX), 362size of, 361state (mode), 361, 361–363super exclusive (Z), 363timeouts and, 378transaction types and associated, 366–367, 367update (U), 363UPDATE and, 361, 362, 363, 367victim process and, 380waits, 378

Log buffer, 135Logging, 12

buffer for, 135transaction log files and, 131, 135–136, 136write-ahead, 135

Logical expressions, XML and, 241Logical partition (LPAR), 55

MMaintenance, 42Management console, 46Masks, column masks, 100–101Materialized query table (MQT), 15, 44, 53, 59, 119,

158–159Maxlocks, 376, 377MDC. See Multidimensional clustered (MDC) tablesMemory, 12, 43, 57

BLU Acceleration and, 66–67buffer pools in, 131–132

MERGE triggers, 340

Page 12: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

Index 493

Merge Backup, 50Metadata, 135Methods, 128. See also User-defined functionsMigration, 10MINUS, 70Modules, 17Mon_GET_ROUTEIN, 10Monitoring, 7, 10, 43, 82Most recently used (MRU), 66MQT. See materialized query table (MQT)Multi-temperature data, 7, 12, 44Multibyte-byte character set (MBCS), 274Multidimensional clustered (MDC) tables, 12, 44, 53, 59,

119, 154–158, 155, 156, 157Multilevel security, 102. See also Label-based access

control (LBAC)MVS operating system, 36MySAP Business Suite, 41MySQL, 69, 72

NNaming conventions, 14

nicknames in, 88National character large objects (NCLOB), 274, 306National fixed-length character string, 271–272, 305National Institute of Standards and Technology (NIST)

requirements, 50National varying-length character string, 272Native encryption, 40, 42, 46, 112–113NCHAR/NATIONAL CHARACTER, 272, 305NCHAR/NVARCHAR, 272NCLOB, 70, 274, 306Net Search Extender, 39NEXT, 72Next key weak exclusive (NW) locks, 362NEXT VALUE, 70, 87

sequences and, 125NEXTVAL, 70Nickname privileges, 88Node directory, 141–142Nodes, 53

cataloging/uncataloging, and CATALOG/UNCATALOG TCPIP NODE, 145–147

Nonrelational data, 2

Nonrepeatable reads, 348NoSQL, 45NOT, 152NOT BETWEEN, 152Not equal, 184–186NOT NULL, 3, 7, 267, 277, 278, 279, 282

CREATE TABLE and, 308NTFS, 38NULL/NOT NULL, 71

index keys and, 265INSERT and, 168passwords and, 77SELECT and, 180, 184, 193–194

NULL key, 10NUM/NUMERIC, 269NUMBER, 71, 276Numeric data/numbers, 268–270

big integer, 269DEC/DECIMAL, 269DECFLOAT, 270decimal points in, 270DOUBLE/DOUBLE PRECISION, 270FLOAT, 269, 270floating, double-precision, 270floating, single-precision, 269floating-point, decimal, 270INT/INTEGER, 269NUM/NUMERIC, 269precision in, 268, 269REAL, 269sign in, 268SMALLINT, 269

NVARCHAR, 305NVARCHAR2, 276

OObject privileges, 82–83Objectives of the certification exams, 20Objects, 3, 5, 7OCTETS, string unit attributes, 266ODBC. See Open Database Connectivity (ODBC)OFFSET, 72Offset coding, 63OLE DB, 15, 142OLE DB external table UDF, 129

Page 13: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

494 Index

OLE DB external table user-defined function, 244OLTP. See Online transaction processing (OLTP)Online reorganization, 41Online transaction processing (OLTP), 2, 4, 35, 51, 52–53,

68, 159BLU Acceleration and, 68indexes and, 336

OPEN, global temporary tables and, 162Open Database Connectivity (ODBC), 142

connectivity and, 151isolation levels and, 359

Operating systems for DB2, 41, 43, 45, 47Optim, 46–47, 50Optim Query Workload Tuner, 11Optim Workload Table Organization Advisor, 11Optimizer, informational constraints and, 301–302, 302Oracle, 10, 44, 69, 88

compatibility/compatibility data, 3, 5pseuodcolumns in, 71

Oracle PL/SQL, 17ORDER BY, 122

SELECT and, 179, 183, 200–202OS/2, 36Outer joins, 71, 212, 217–223, 218, 220, 221, 222

PPackages, 15, 82, 117, 130–131

privileges for, 87Pages, in table spaces, 132Parallel transaction, 347Parallel vector processing, BLU Acceleration and, 64–65,

65Parallelism, 13, 45

BLU Acceleration and, 65–66core-friendly, in BLU, 65–66

Parameter passing, 5Parameters, 15Parent key, parent table, referential integrity constraints

and, 285, 285, 286Parent row, referential integrity constraints and, 286Partition elimination, 153–154Partitioned tables, 119, 152–154, 153. See also range-

partitioned tablesPartitioning, 7, 43, 53

ATTACH/DETACH PARTITION and, 153

elimination of, 153–154indexes and, 153tables and, 152–154, 153

PASSTHRU, 88, 258Passwords, 77

NULL, 77Path expressions, XML and, 241Pearson VUE, 20–21Performance management, 12, 43, 45, 48, 50–51

high performance environments and, 52high availability environments and, 53high volume environments and, 52locks and, 373–380pureScale and, 56stored procedures and, 250workload management and, 51–52

Performance Manager, 47Phantom transactions, 348PHP, 15PL/I, 130, 250PL/SQL, 70, 72Positioned deletes, 175Positioned updates, 173Postgre–SQL, 72Practice exams, 20. See also Taking the certification examsPrecision, numeric data and, 268, 269Precompilers, 130–131Prefetch, 10PREPARE, 82Preparing to take certification exams, 18–20PREVIOUS, 72PREVIOUS VALUE, 70, 87

sequences and, 125Primary database, 41Primary key, 10

referential integrity constraints and, 285UNIQUE constraints and, 282

Privileges. See Authorities and privilegesProblem Determination Tool (db2pd), 7Procedures, 16, 17

stored. See Stored proceduresPropagation, 296Pseudocolumn, 71Public Key Cryptography Standard 12 (PKCS12), 113Publications to study for certification, 19

Page 14: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

Index 495

pureQuery Runtime, 47pureScale, 8, 10, 13, 46

application transparency in, 55availability of, 56capacity of, 55Cluster Caching Facility (CF) and, 55Cluster Services (CS) and, 55DB 10.5 enhancements to, 57General Parallel File System (GPFS) and, 55HACMP Reliable Services Clustering Technology

(RCST) in, 56HADR and, 57insert time clustering (ITC) tables in, 57performance of, 56Remote Direct Memory Access (RDMA) and, 55shared data architecture of, 55Tivoli System Automation for Multiplatforms (SAMP)

and, 56workload management and, 55–57, 56

pureXML, 39, 237. See also XML

QQ replication, 47Qualifiers, schema, 117, 314–315Queries, 14, 15, 47, 59

BLU Acceleration and, 68compression and, 164materialized query tables (MQTs) and, 158–159parallelism for, 45partition elimination and, 153–154predicates in, 152SELECT and. See SELECTsub-, 177

Query optimizer, 12Query Tuner, 47QUIESCE_CONNECT, 83

RRAM, BLU Acceleration and, 66–67Random ordering, 10Range-clustered tables (RCT), 12, 119, 154, 264–265Range-partitioned tables, 12, 152–154, 153. See also

Partitioned tablesRCAC. See row and column access control (RCAC)RDO, 142

READ, 89Read stability (RS) isolation level, 349, 352, 353Read-only cursors, 231Read-only transaction, 366–367, 367Read-only view, 120REAL, 269, 304REBIND, 7Records, 119Recovery Expert, 50Recovery. See Backup and recoveryRed Hat Enterprise Linux (RHEL), 41Redbooks, 19–20Reference/referenced types, 162REFERENCES

nicknames and, 88tables and, 85

REFERENCING, 340Referential constraint. See Referential integrityReferential cycle, 286Referential integrity, 3, 7, 15, 267, 277, 283–301, 284

child table/row in, 285, 286CREATE TABLE and, 304, 307, 309–310DELETE and, 293–296, 294, 295, 297–300Delete Rule in, 293–296, 294, 295, 297–300descendant table/row in, 286foreign key in, 285, 286INSERT and, 286–290Insert Rule for, 287–290, 288, 289parent key, parent table and, 285, 285, 286parent row and, 286primary key and, 285propagation through, 296referential cycle in, 286self-referencing table/row in, 286terminology of, 285–286unique key and, 285UPDATE and, 286–287, 290–293, 291, 292Update Rule for, 290–293, 291, 292

REFRESH IMMEDIATE/DEFERRED, MQTs and, 159REFRESH TABLE, 159Registering stored procedures, 250Regular table. See Base tableRelational database management system (RDBMS), 69Relational predicates and WHERE, 183, 184–186Reliable Services Clustering Technology (RCST), 56

Page 15: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

496 Index

Remote Direct Memory Access (RDMA), 55REORG, 7, 10, 82

BLU Acceleration and, 59indexes and, 335multidimensional clustering (MDC) tables and, 155tables and, 85

Reorganization, 41REORGCHK, 7Repeatable read (RR) isolation level, 349–350, 351Replication, 13, 47Replication, SQL, 41Resource Description Framework (RDF), 45Result sets, 177REVOKE and revoking authorities and privileges, 94–97Revoking authorities/privileges, 2, 5, 75REXX, 130, 250RoCE Ethernet, 56Roles, 3, 5, 75, 92–93Roles in DB2 10.1 and 10.5 certification, 2–18Roll forward recovery, 7ROLLBACK, 5, 14, 256–260, 257, 258, 259

isolation levels and, 350locks and, 360

ROLLUP, GROUP BY, 196–197Root tables, 162Routines, 83

privileges for, 87Row and column access control (RCAC), 3, 5, 8, 40–41,

75, 97–102authorities and privileges and, 80–81activating, 102column masks in, 100–101CREATE PERMISSION in, 98–99DATAACCESS authority for, 97, 102row permissions in, 98–99

Row compression, 7Row permissions, in RCAC, 98–99Row size support, 10ROWID, 71ROWNUM, 71Rows, 119

size of, 71, 264–265RS/6000, 36RUNSTATS, 7

BLU Acceleration and, 59

SSample questions, 20SAVEPOINT, 5, 14, 260–263, 262Scalability, workload management and, 52Scalar functions, 69–70Scalar user-defined function, 243, 244–249Scan share (NS) locks, 362Schemas, 3, 14, 83, 117–118, 118

CREATE TABLE and, 314–315privileges, 84qualifiers in, 314–315

Scope of cursor, 14Search conditions, SELECT and, 183Searched deletes, 175SECADM, 8, 81, 82, 90

label-based access control (LBAC) and, 102roles and, granting, 92–93trusted contexts and, 110

Security, 75–113access control and, 76authentication in, 76–79authorities and privileges in, 79–97. See also

Authorities and privilegesencryption in, 112–113label-based access control (LBAC) in, 102–109policies for, 104–105row and column access control (RCAC) in, 97–102separation of management and security-related tasks

in, 82trusted contexts in, 109–112

Security Administrator. See SECADMSecurity labels, 105–106Security policies, 104–105SELECT, 72, 165, 166, 177–237

ALL clause and, 180, 184ANY clause in, 184application-period temporal tables and, 236BETWEEN clause and, 183, 187–188bitemporal tables and, 237CASE expressions and, 207–211common table expressions and, 205–207cursor used to obtain results with, 231–232DECLARE CURSOR and, 231–232DELETE and, 174DISTINCT clause and, 180, 183EXCEPT and, 228, 228, 230, 230

Page 16: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

Index 497

EXCEPT ALL and, 229, 229, 230, 230EXISTS clause and, 184, 192–193FETCH and, 232FETCH FIRST and, 179, 183, 202–204FROM clause and, 183global temporary tables and, 162GROUP BY clause and, 179, 183, 194–196GROUP BY CUBE and, 197–199GROUP BY ROLLUP and, 196–197HAVING and, 179, 183, 199–200IN clause and, 184, 190–192INSERT and, 169, 177INSERT, subselects, and, 169INTERSECT and, 226, 226, 230, 230INTERSECT ALL and, 227, 227, 230, 230isolation levels and, 179, 183, 204–205, 349, 359, 370,

371join operations and, 211–223. See also Join operationsLIKE clause and, 183, 188–190locks and, 361, 362, 363, 367, 368nicknames and, 88NULL clause and, 180, 184, 193–194NULL values and, 180ORDER BY and, 179, 183, 200–202relational predicates and WHERE in, 183, 184–186result sets and, 177search conditions in, 183set operators and, combining results with, 223–231SOME clause in, 184subqueries and, 177subselects and, 169system-period temporal tables and, 234–236tables and, 85temporal or time-travel tables and, 232–237triggers and, 339TRUE/FALSE/UNKNOWN values in, 183, 199,

208–211UNION and, 223, 224, 230, 230UNION ALL and, 225, 225, 230, 230UPDATE and, 171, 172, 177user-defined functions and, 248–249views and, 86, 327WHERE clause and, 179, 183–194WITH and, 205–207

Self-configuration, 43Self-referencing table/row, referential integrity constraints

and, 286

Self-Tuning Memory Manager (STMM), 10, 42Separation of management and security-related tasks, 82Sequence expressions, XML and, 241Sequence privileges, 86–87Sequences, 15, 117, 124–125Serializable transactions, 347SERVER authentication, 78SERVER_ENCRYPT authentication, 78, 144Servers, 3, 5, 6, 115, 116–117, 116

federated, 13, 39, 44, 87–88privileges for, 87–88

SET, 339label-based access control (LBAC) and, 103

SET CONNECTION, 150, 258SET EVENT MONITOR STATE, 82SET INTEGRITY, 7Set operators, 223–231

EXCEPT, 228, 228, 230, 230EXCEPT ALL, 229, 229, 230, 230INTERSECT, 226, 226, 230, 230INTERSECT ALL, 227, 227, 230, 230SELECT and, 223–231UNION, 223, 224, 230, 230UNION ALL, 225, 225, 230, 230

SET PASSTHRU, 258SET SERVER OPTION, 258SET SESSION AUTHORIZATION, 84SET SESSION USER, 84Shadow tables, 119, 159Share (S) locks, 362Share with intent exclusive (SIX) locks, 362Shared-nothing environments, 53Sign, numeric data and, 268SIGNAL, 339Single instruction multiple data (SIMD) processing,

64–65, 65Single-byte character set (SBCS), 274SMALLINT, 124, 269, 304Solaris, 36, 41, 43, 76Solution developer. See IBM Certified Solution Developer,

DB2 9.7 SQL ProcedureSOME clause, SELECT and, 184SORT, 165Sorting, 5

Page 17: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

498 Index

Sourced UDF, 128Sourced user-defined function, 243Spatial Extender, 39–40SQL, 3, 5, 14, 16, 17, 36, 39, 47, 165–266

aliasing and, 124common table expressions and, 205–207compatibility issues. See Compatibility, SQLData Control Language (DCL) statements in, 166Data Definition Language (DDL) statements in, 166Data Manipulation Language (DML) statements in,

166, 167–237. See also DELETE, INSERT, SELECT, UPDATE

embedded application construct statements in, 166indexes and, 123precompiler for, 130–131restrictions to, lifting of, 70SQL/XML functions and, 240stored procedures and, 129–130, 249–256syntax of, 70transaction management statements in, 167user-defined functions (UDFs) and, 128–129, 243–249

SQL Binder, 131SQL Communications Area (SQLCA), 15SQL for Java (SQLJ), 15

isolation levels and, 359SQL isolation level, 339–340SQL PL, 16SQL replication, 41SQL scalar user-defined function, 243, 244–249SQL table user-defined function, 243, 244–249SQL/XML functions, 240SQLADM, 82SQLJ, 142Standby cluster, 10Standby database, 41State (mode) of locks, 361, 361–363Static compression, 10Static SQL, 14Storage, 12, 42, 43, 45Storage groups, 44Storage optimization, 45Storage paths, 12Stored procedures, 14, 15, 17, 47, 117, 129–130, 165,

249–256advantages of, 250

calling with CALL, 253–256CREATE PROCEDURE and, 251–253DECLARE and, 255–256developing, 250–253external, 250registering, 250–253SQL or native SQL, 250

String data. See Character string data typesString unit attributes, 265–266String units, 71Structured data types, 127–128, 277Structured Query Language. See SQLStudying for certification exams, 18–20Subqueries, 177Subscriptions for DB2, 40Subtables, 162Subtypes, 128Sun Solaris, 41Super Async (SUPERASYNC) mode, 57Super exclusive (Z) locks, 363Supertables, 162Supertypes, 128SUSE Linux, 41Sybase, 69Synopsis tables, 10, 67, 119, 152SYSADM, 80, 82SYSCTRL, 80SYSMAINT, 80–81SYSMON, 81System Automation for Multiplatforms (SAMP), 56System catalog, 131, 134–135System database directory, 140–141System features, 17System managed space (SMS) table space, 133System objects, 131–136System period, 160System-period temporal tables, 3, 160

SELECT and, 234–236System R, 36System time, 160

TTable check constraint, 282–283. See also CHECKTable spaces, 12, 131, 132–134, 133

Page 18: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

Index 499

automatic storage (AS), 134database managed space (DMS), 134privileges for, 84system managed space (SMS), 133

Table user-defined function, 243, 244–249Tables, 3, 5, 7, 14, 83, 115, 117, 119, 119, 151–162, 267.

Also see specific table typesALTER TABLE and, 321–323column masks in, 100–101common table expressions and, 205–207compression and, 163CREATE TABLE and, 264, 303–321. See also

CREATE TABLEdb2convert and, 69identity columns in, 310–313join operations and, 211–223. See also Join operationspartitioning of, 43privileges for, 85row permissions in, 98–99row size in, 264–265schemas and, 314–315similar, with LIKE, 313–314triggers and, 340tuple sequence number (TSN) row identifiers and, 62,

62Taking the certification exams, 22–33

Begin Test screen in, 24–26Done button in, 29End of exam confirmation screen in, 30, 30Finish screen in, 29, 29Flag for Review in, 26–27, 28–29Help in, 27I Agree button in, 24, 24moving through the exam in, 23Next button in, 23, 27, 30Previous button in, 27, 30question screen in, 26, 26, 27refresher course in, 25Review in, 27–29, 28score report in, 31, 32signing in, 22Test Results screen in, 31, 31Time Remaining information in, 26–27Title screen for, 22–23, 23

Template UDF, 128Template user-defined function, 243

Temporal (time-travel) tables, 3, 5, 119, 159–161, 267, 324–327

base vs., 324–326created, 324declared, 324SELECT and, 232–237

Temporary tables, 119, 161–162TIME, 272–273, 305Time period, 159Time/timestamps, 70, 71, 272–273, 272, 305

application period in, 160application time in, 160business time in, 160system period in, 160system time in, 160time period in, 159valid time in, 160

Time-travel query, 39Time-travel tables. See Bitemporal tables; Temporal (time-

travel) tablesTimeouts and locks, 378TIMESTAMP, 71, 273, 305TIMESTAMP_FORMAT, 70Tivoli System Automation for Multiplatforms (SAMP),

41, 56TO_CHAR, 70TO_DATE, 70TO_TIMESTAMP, 70Transaction log files, 12, 131, 135–136, 136Transaction processing, BLU Acceleration and, 66–67Transactions and transaction management, 3, 5, 14, 165,

256–263, 347change, 366–367, 367COMMIT, 360currently committed (CC) semantics and, 368–373cursor-controlled, 366–367, 367intent to change, 366–367, 367lock compatibility with, 373, 374read-only, 366–367, 367ROLLBACK, 360boundaries in, 256buffer pools and, 256COMMIT and, 256–260, 257, 258, 259concurrency and, 256ROLLBACK and, 256–260, 257, 258, 259SAVEPOINT and, 260–263, 262

Page 19: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

500 Index

SET commands and, 258transaction management and, 256–263unit of work and, 256BLU Acceleration and, 66–67concurrency and. See also Concurrencydirty reads and, 348interleaved, 347locks and locking in, 349, 366–367, 367lost updates and, 348nonrepeatable reads and, 348owning or holding a lock in, 349parallel, 347phantom, 348serializable, 347SQL and, 167unit of work in, 15, 256, 347

Transform expressions, XML and, 241Transition tables, 340Transitional variables, triggers and, 340TREE, label-based access control (LBAC) and, 103Triggers, 3, 5, 7, 17, 117, 125–126, 267, 337–344

action of, 337activation time for, 337AFTER, 337, 341, 342–343altering not possible in, 344BEFORE, 337, 341–342components of, 126, 337CREATE TRIGGER and, 337–344event for, 337firing of, 337granularity of, 337INSTEAD OF, 337, 341, 343–344REFERENCING clause and, 340rows affected by, 337SQL and SQL PL statements with, 339–340table or view associated with, 337transitional variables and, 340transition tables with, 340TRUNCATE and, 176–177

TRUE/FALSE/UNKNOWN valuesCHECK and, 283SELECT and, 183, 199, 208–211

TRUNCATE, 71, 175–177DELETE and, 175–177

Trusted connections, 110Trusted contexts, 3, 5, 8, 15, 75, 109–112

CREATE TRUSTED CONTEXT for, 111implicit and explicit trusted connections in, 110SECADM and, 110trusted connections and, 110WITH/WITHOUT AUTHENTICATION in, 111

Tuple sequence number (TSN) row identifiers, 62, 62Tutorials, online, 19Type 1 and type 2 connections, 115, 150–151, 150Typed tables, 119, 162

UUbuntu Linux, 41Uncommitted read (UR) isolation level, 349, 356, 357Unicode, 266, 271–272Uniform Resource Identifiers (URIs), 45UNION, SELECT and, 223, 224, 230, 230UNION ALL, SELECT and, 225, 225, 230, 230UNIQUE, 3, 7, 70, 123, 267, 277, 280–282, 281

CREATE TABLE and, 304, 306, 309Unique indexes, 265, 334Unique key, 10

referential integrity constraints and, 285Unit of work, 15, 256, 347. See also Transactions and

transaction management, 256Universal Database, 36UNKNOWN values

CHECK and, 283SELECT and, 183, 199, 208–211

Updatable cursors, 231Updatable view, 120UPDATE, 72, 165, 166

global temporary tables and, 162locks and, 361, 362, 363, 367nicknames and, 88positioned updates and, 173referential integrity constraints and, 286–287, 290–293,

291, 292SELECT and, 171, 172, 177tables and, 85temporal or time-travel tables and, 232–234transaction management and, 348triggers and, 340Update Rule for, 290–293, 291, 292views and, 86WHERE clause and, 171, 172, 173

Page 20: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

Index 501

WHERE CURRENT and, 172, 173XML and, 239–240

Update (U) locks, 363Update Rule, 290–293, 291, 292UPDATE, 170–174Upgrading DB2 editions, 38USAGE, 87

XSR objects and, 89USE, 84User IDs, 77User-defined data types (UDTs), 117, 127–128, 277User-defined functions (UDF), 3, 5, 15, 17, 47, 83, 117,

128–129, 165, 243–249CREATE FUNCTION and, 244–248external scalar, 243external table, 243–244OLE DB external table, 244scalar, 243, 244–249SELECT and, invoking, 248–249sourced, 243SQL scalar, 243, 244–249SQL table, 243, 244–249table, 243, 244–249template, 243

VValid time, 160Value compression, 10Values, 119VALUES, INSERT and, 168VARCHAR, 264–265, 266, 271, 305VARCHAR_FORMAT, 70VARCHAR2, 71, 276VARGRAPHIC, 264–265, 266, 271, 305Variables, 16, 17

global, 70privileges for, 89transitional, 340

Varying-length character data, 271, 305Varying-length double-byte character data, 271, 264–265,

266, 271, 305. See also VARGRAPHICVersion recovery, 7Victim process, 380Views, 3, 5, 14, 59, 117, 120–121, 120, 267, 327–332

CASCADED CHECK OPTION with, 330–331, 331

CREATE VIEW and, 327–328INSERT and, 328LOCAL CHECK OPTION with, 328–329, 329privileges for, 85–86SELECT and, 327

WWaits, lock, 378Warehousing. See Data warehousingWeak typing, 69WebSphere, 41WHERE clause

DELETE and, 174SELECT and, 179, 183–194UPDATE and, 171, 172, 173

WHILE, 339Windows, 36, 38, 41–42, 76WITH, SELECT and, 205–207WITH CHECK OPTION, 7WITH GRANT OPTION, 90WLMADM, 82WORKLOAD ANALYTICS, 59–60Workload management, 9, 51–57

availability and, 52BLU Acceleration and, 59–60, 68Data Partitioning Feature (DPF) for, 53–54, 54data warehousing and, 51high availability environments and, 53high performance environments and, 52high volume environments and, 52manageability and, 52online transaction processing (OLTP) and, 51, 52–53,

68optimized solutions for, 53performance and, 51–52privileges for, 89pureScale Feature in, 55–57, 56. See also pureScalescalability and, 52shared-nothing environments, 53

Workload Manager (WLM), 7, 12, 46Workload Table Organization Advisor, 69WRITE, 89Write-ahead logging, 135

Page 21: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/... · Application developer. See IBM Certified Application Developer, DB2 9.7 Application period,

502 Index

XXML, 2, 5, 7, 14, 165, 237–243. See also pureXML

arithmetic expressions for, 241attributes in, 238case-sensitivity of tags in, 238cast expressions for, 241comparison expressions for, 241conditional expressions for, 241constructor expressions for, 241Data Manipulation Language (DML) and, 237–243DELETE and, 240elements in, 238FLWOR expressions for, 241INSERT and, 239logical expressions for, 241opening/closing tags in, 238path expressions for, 241pureXML and, 237. See also pureXMLretrieving XML data from tables in, 240–243sequence expressions for, 241SQL/XML functions and, 240transform expressions for, 241

UPDATE and, 239–240version and encoding declaration in, 238XML data type and, 70, 275–276XMLPARSE, 240XMLSERIALIZE, 240XMLTABLE, 240–241XMLTEXT, 240XMLVALIDATE, 241XQuery and, 241

XML data type, 70, 275–276XML schema repository (XSR) objects, privileges for, 89XMLPARSE, 240XMLSERIALIZE, 240XMLTABLE, 240–241XMLTEXT, 240XQuery, 3, 5, 15, 39, 165–266XSR objects, 89

Zz/OS, 36zLinux, 38