555255 00fm p00i-xxviiiptgmedia.pearsoncmg.com/images/0131855255/index/... · automatic global...
TRANSCRIPT
537
Index
Symbols
* (asterisk), in SQL, 171? (question mark), parameter markers, 268\ (backward slash), in system variables, 64, 91‘’ (single quotation marks), character string
delimiters, 1432.6 kernel
installation problems on, 83troubleshooting installation, 526
A
ACID (atomicity, consistency, isolation, anddurability) compliance, 14
addBatch( ) method, 245, 273ADD COLUMN clause, 155ADD CONSTRAINT clause, 155ADD PRIMARY KEY statement, 155ADD UNIQUE statement, 155
administration, 101backups, 101
offline backup, 104-105online backup with built-in copy,
102-103online backup with read-only access,
103-104restoring from, 105
compressing tables, 119connection options, 43-45consistency checks, 112-113data movement operations, 105-106
exporting data, 109-111importing data, 106-109
performance issues, 113collecting statistics, 113-115timing information in statistics,
115-118afterLast( ) method, 254after triggers, 225
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 537
538 Index
algorithm values for encryptionAlgorithmoption, 125-126
aliases, 189allocating dynamic SQL statements (JDBC
application development), 244-246ALL quantified predicate, 202ALTER statement, 139ALTER TABLE statement, 155-156
check constraints, 162-163Anderson, Jean, 4answer sets, 244
accessing in random order, 533dynamically determining (JDBC
application development), 264-267exporting data, 110-111modifying data with (JDBC application
development), 274-279multiple result sets, 288retrieving
JDBC application development, 252-258
Perl application development, 450-451PHP application development, 416-417Python application development,
494-495retrieving column values (JDBC
application development), 258-264stored procedures, 281, 284-287
ANY quantifed predicate, 202Apache Derby
advantages of, 3-5application development, 23-24attributes, network server connections, 241business perspective, 10-11, 15-17community hierarchy, 7-9components of, 21
Apache Derby database engine, 21Apache Derby network server, 21-22ij tool, 22-23
database administration. See databaseadministration
database engine, 21databases. See databasesdeployment model, 25
embedded framework, 25-31server framework, 32-36
differences from IBM Cloudscape, 3-7features of, 17-19history of, 1-3IBM support for, 2installing on Linux, 75-76
manual installation, 90-93migrating from previous versions, 76post-installation file structure, 98-99preparations for, 76-81troubleshooting installation, 96-98verifying installation, 93-96
installing on Windows, 49-50manual installation, 63-66migrating from previous versions, 50post-installation file structure, 72-73preparations for, 50-55troubleshooting installation, 70-72verifying installation, 67-69
licensing, 5performance tuning, 526-527security. See securitySQL support in, 19-21technical perspective, 11
Apache Derby Charter, 19Apache Derby Network Server, 21-22
applets, 299-301cataloging, 311communication with, 307
CLI, 307DRDA protocol, 307ODBC, 308Perl/PHP/Python extensions, 308
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 538
Index 539
connections (JDBC application development), 240-244
IBM DB2 JDBC Universal driver, 237-238installing DB2 Runtime Client, 308-311server framework deployment model,
32-36troubleshooting, 533
Apache incubator projects, 5Apache License, 5applets (JDBC application development),
299-301application development, 23-24t
JDBC application development, 233-234allocating dynamic SQL statements,
244-246applets, 299-301batch methods, 274batch processing, 273-274database connections, 238-239dynamically determining result sets,
264-267embedded JDBC drivers, 236-237executing dynamic SQL statements,
246-248IBM DB2 JDBC Universal driver,
237-238import statements, 235-236inserting and updating large objects,
279-281locking issues, 302-305modifying data with result sets, 274-279network server connections, 240-244prepared statements, 268-272program structure, 234-235retrieving column values, 258-264retrieving result sets, 252-258SQLExceptions versus SQLWarnings,
251-252stored procedures, 281-288
transactions, 272trapping SQLExceptions, 248-250troubleshooting, 532-535UDFs (user-defined functions), 288-299
Perl application developmentconnection pooling, 446-447database connections, 445-446disconnecting from database, 446GUI interfaces, 467-472large object (LOB) data types, 456-458module usage, 444running scripts from command line, 445SQL statements, 447-454transaction management, 454-455Web interfaces, 459-465
PHP application development, 411connection pooling, 413database connections, 412-413disconnecting from database, 413large object (LOB) data types, 424-425running scripts from command line,
411-412SQL statements, 414-421transaction management, 421-424Web interfaces, 426-436
Python application developmentconnection pooling, 491-492database connections, 490disconnecting from database, 491GUI interfaces, 512-518large object (LOB) data types, 501-503module usage, 489-490running scripts from command line, 490SQL statements, 492-499transaction management, 499-501Web interfaces, 503-512
arrays (PHP), 396-397. See also sequences(Python)
asterisk (*), in SQL, 171
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 539
540 Index
authentication, 126-128, 313built-in authentication, 130-132, 528LDAP directory service authentication,
128-129precedence of authentication levels, 528remote authentication, 528user-defined authentication, 129
authorization, 132-133authorization identifiers, 126-127autocommit( ) method, 500-501autocommit settings, 534
JDBC application development, 272Perl application development, 455PHP application development, 423-424
automatic global arrays (PHP), 427autonumbering. See identity columnsAVG function, 194
B
backups, 101offline backup, 104-105online backup with built-in copy, 102-103online backup with read-only access,
103-104restoring from, 105
backward slash (\), in system variables, 64, 91basic predicates, 173batch methods (JDBC application
development), 274batch processing (JDBC application
development), 273-274bCalendar( ) method (YMLD example
application), 344beforeFirst( ) method, 253begin_work( ) method, 454beginTransaction( ) method, 422BETWEEN predicate, 175
BIGINT data type, 141binary large objects. See BLOBsbinary string data types, 144bind_columns( ) method, 450bind_param( ) method, 449bind_param_inout( ) method, 451, 458bindColumn( ) method, 424binding parameters to prepared statements
(Perl application development), 449bindParam( ) method, 419, 425blob_read( ) method, 456BLOBs (binary large objects), 145. See
also LOBsinserting/updating, 534
Boolean data typePHP, 395-396Python, 476-477
booting encrypted databases, 527bootPassword parameter, 43, 123break statement
PHP, 401, 404Python, 483
built-in authentication, 130-132, 528built-in functions, 191business perspective
Apache Derby, 15-17open source, 10-11
C
cached connections (Perl), 446calculated columns. See derived columnscallers
Perl scripts, 459PHP scripts, 426Python scripts, 504
calling stored procedures, 284callproc( ) method, 496-497
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 540
Index 541
Call Level Interface. See CLICALL statement, 284Cartesian product, 179-181cascading triggers, 225CASE expressions, 204-205, 532case-sensitivity
of database names, 312of user IDs/passwords, 130
casting functions, 192CAST function, 190cataloging
Apache Derby Network Server, 311databases, 311-312
CGI (Common Gateway Interface), 426GET/POST variable handling
Perl application development, 459-461PHP application development, 426-430Python application development,
504-507cgi module (Python application
development), 504CGI.pm module (Perl application
development), 439, 459CHAR data type, 140, 143character data types, 46. See also string
data typescharacter large objects, 145check constraints, 157, 161-163classes, creating
PHP, 404-406Python, 484-485
CLASSPATH system variablesetting, 62-66, 90-93troubleshooting, 70-71, 96-97
clearBatch( ) method, 245, 273clearWarnings( ) method, 252CLI (Call Level Interface), 307
Perl/PHP/Python extensions, 308
ClickButton method (YMLD example application), 378-381
CLOBs (character large objects), 145, 530.See also LOBs
inserting/updating, 534close method, 245, 491closing
dynamic SQL statements, 245statements, 533
Cloudscapedifferences from Apache Derby, 3-7history of, 1-3installing on Linux, 75-76
with installation program, 81-90manual installation, 90-93migrating from previous versions, 76post-installation file structure, 98-99preparations for, 76-81troubleshooting installation, 96-98verifying installation, 93-96
installing on Windows, 49-50with installation program, 55-63manual installation, 63-66migrating from previous versions, 50post-installation file structure, 72-73preparations for, 50-55troubleshooting installation, 70-72verifying installation, 67-69
licensing, 6SQL support in, 19-21support contract, 6
CLOUDSCAPE_INSTALL environment variable, setting, 62-65, 90-91
CLR (Common Language Runtime), 52column functions, 191-194
restriction with, 195-196column values, retrieving (JDBC application
development), 258-264
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 541
542 Index
columns, 46command line, running scripts from
Perl, 445PHP, 411-412Python, 490
commit( ) method, 422, 454, 500COMMIT statement, 231-232
JDBC application development, 272committers, 8-9Common Gateway Interface. See CGICommon Language Runtime (CLR), 52comparison operators
PHP, 399in predicates, 173Python, 481
Comprehensive Perl Archive Network(CPAN), 439
compressing tables, 119conditions
PHP, 399Python, 481
configuringPerl
on Linux, 442-443on Windows, 443-444
PHPon Linux, 409-410on Windows, 410-411
Pythonon Linux, 488on Windows, 489
Confirm_Click( ) method (YMLD exampleapplication), 384
connect( ) method, 445, 490connection contexts, stored procedures, 281connection handles, 308
Connection objects (Python)database connections, 490disconnecting from database, 491transaction management, 499-501
connection optionsenvironment, 45maintenance, 43-45security, 43
connection poolingPerl application development, 446-447PHP application development, 413Python application development, 491-492
connection URL, creating databases, 39connections
Apache Derby Network Server. See ApacheDerby Network Server
establishing (JDBC application development), 238-239
Perl application development, 445-446connection pooling, 446-447disconnections, 446
PHP application development, 412-413connection pooling, 413disconnections, 413
from procedures, 535Python application development, 490
connection pooling, 491-492disconnections, 491
testing, 312troubleshooting, 526uncataloged database connections, 313YMLD example application, 327-329,
360-364consistency checks, 112-113constraints, 156, 168
ADD CONSTRAINT clause, 155check constraints, 161-163
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 542
Index 543
DROP CONSTRAINT clause, 156referential integrity constraints, 157-161unique constraints, 157UPDATE statement, 217
continue statementPHP, 404Python, 483
contributors, 8control structures
PHP, 399break statement, 404continue statement, 404do/while loops, 399-400foreach loops, 402-403for loops, 401-402if/elseif/else structures, 400switch structures, 401while loops, 399-400
Python, 481break statement, 483continue statement, 483for loops, 482-483if/elif/else structure, 482pass statement, 483while loops, 481-482
converting data types, 260correlated subqueries, 201correlation names, 186-187COUNT function, 194
DISTINCT keyword, 198CPAN (Comprehensive Perl Archive
Network), 439CREATE FUNCTION statement, 223,
292-293CREATE INDEX statement, 169CREATE PROCEDURE statement, 230-231,
282-284
CREATE SCHEMA statement, 148, 222CREATE statement, 139CREATE TABLE statement, 147-148CREATE TRIGGER statement, 227CREATE VIEW statement, 165-166createFrom parameter, 44createStatement( ) method, 244-245CURRENT_DATE function, 150CURRENT_SCHEMA function, 150CURRENT_TIMESTAMP function, 150CURRENT_TIME function, 150CURRENT_USER function, 150cursor( ) method, 492Cursor objects (Python), SQL statements
calling stored procedures, 495-499issuing, 492
with different parameters, 493-494with placeholders, 492
retrieving result sets, 494-495cursor stability isolation level, 302cursors, 276
D
Data Control Language. See DCLData Definition Language. See DDLData Manipulation Language. See DMLdata movement operations, 105-106
exporting data, 109-111importing data, 106-109
data truncation, preventing in ij tool, 114data types, 46, 140
binary string data types, 144converting, 260date and time data types, 145-147importance of, 530
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 543
544 Index
large objects (LOBs), 144-145, 530Perl application development, 456-458PHP application development, 424-425Python application development,
501-503manipulating, 534modifiers, 148
default values, 149-151identity columns, 151-153null values, 149
numeric data types, 140-142PHP data types
arrays, 396-397Boolean, 395-396numeric, 396strings, 397-399
promotion, 190Python data types
Boolean, 476-477dictionaries, 480-481numeric, 477-478sequences, 478-479strings, 479-480
setNull( ) method, 278-279SQL data types
versus Java data types, 258, 366versus ODBC data types, 385
stored procedures, 281string data types, 140-144
database administration, 101backups, 101
offline backup, 104-105online backup with built-in copy,
102-103online backup with read-only access,
103-104restoring from, 105
compressing tables, 119connection options, 43-45consistency checks, 112-113data movement operations, 105-106
exporting data, 109-111importing data, 106-109
performance issues, 113collecting statistics, 113-115timing information in statistics, 115-118
database connectionsApache Derby Network Server. See Apache
Derby Network Serverestablishing (JDBC application
development), 238-239Perl application development, 445-446
connection pooling, 446-447disconnections, 446
PHP application development, 412-413connection pooling, 413disconnections, 413
from procedures, 535Python application development, 490
connection pooling, 491-492disconnections, 491
testing, 312troubleshooting, 526uncataloged database connections, 313YMLD example application, 327-329,
360-364database handles (Perl)
connection pooling, 446-447database connections, 445-446disconnecting from database, 446SQL statements
calling stored procedures, 451-454issuing, 447
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 544
Index 545
issuing with prepared statements, 447-449
retrieving result sets, 450-451transaction management, 454-455
database installation, verifying, 67, 93-94database name attribute, network server
connections, 241database objects, 528. See also data types;
indexes; procedures; schemas; tables; triggers; views
CREATE statement, 139definition of, 37DROP statement, 140list of, 37, 45, 135privileges, 163schemas, 221-223size limitations, 38system catalog tables, 163-164
database statistics. See statisticsdatabase-level authentication, precedence, 528database-level authorization, 132-133database-level users
built-in authentication, 131versus system-level users, precedence
of, 132database-wide properties, 127databases
cataloging, 311-312connection options
environment, 45maintenance, 43-45security, 43
creating, 39-41, 529deleting, 41, 529directory structure, 37-38encrypted databases, booting, 527encryption, 527
generated files, 41naming, 39-40, 312, 529security. See securitysystem tables, list of, 41-42testing connections, 312troubleshooting, 528-529uncataloged connections, 313
dataEncryption parameter, 43, 123date and time data types, 46, 145-147DATE data type, 145-146date functions, 193DB2 JDBC drivers. See IBM DB2 JDBC
Universal driverDB2 Runtime Client, installing, 308-311DB2 Universal Database (DB2 UDB), 2DBD:DB2 (Perl module), 440DBI (Perl module), 439DCL (Data Control Language), 135DDL (Data Definition Language), 135-138
ALTER statement, 139ALTER TABLE statement, 155-156constraints, 156
check constraints, 161-163referential integrity constraints, 157-161unique constraints, 157
CREATE statement, 139CREATE TABLE statement, 147-148data types, 140
binary string data types, 144date and time data types, 145-147large object data types, 144-145numeric data types, 140-142string data types, 140-144
data type modifiers, 148default values, 149-151identity columns, 151-153null values, 149
DECLARE statement, 138-140, 153-154
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 545
546 Index
DROP statement, 140DROP TABLE statement, 156indexes, 167-169system catalog tables, 163-164views, 165-167
DECIMAL data type, 46, 142DECLARE statement, 138-140, 153-154, 530declaring variables
PHP, 395Python, 476
default values, data type modifiers, 149-151deferPrepares attribute, network server
connections, 242defining functions
PHP, 404Python, 483-484
DELETE rules (referential constraints), 160-161
DELETE statement, 219-221deleting databases, 41, 529delimited identifiers, 138delimiters in character strings, 143delimiting PHP code, 394dependent tables, 158deployment model, 25
embedded framework, 25-31server framework, 32-36
derived columns, 189-191dictionaries (Python), 480-481directory for IBM Cloudscape on Linux
installation, 86directory structure of databases, 37-38dirty read. See uncommitted read
isolation leveldisaster recovery. See backupsdisconnect( ) method, 446
disconnecting from databasePerl application development, 446PHP application development, 413Python application development, 491
DISTINCT keyword, 196-198Distributed Relational Database Architecture.
See DRDA protocolDML (Data Manipulation Language),
135, 170DELETE statement, 219-221functions, 191
column functions, 193-194scalar functions, 191-193
INSERT statement, 213-215multiple rows, 215-216for specific columns, 215subselects, 216-217
SELECT statementCartesian product, 179-181CASE expressions, 204-205correlation names, 186-187derived columns, 189-191DISTINCT keyword, 196-198EXISTS predicate, 212-213GROUP BY clause, 194-196joins, 181-186nested table expressions, 205-206ORDER BY clause, 187-189permutation, 172projection, 171-172quantified predicates, 202-204restriction, 173-178retrieving entire tables, 170-171scalar fullselects, 206-209subqueries, 198-202UNION operator, 209-212
UPDATE statement, 217-219
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 546
Index 547
do( ) method, 447do/while loops (PHP), 399-400documentation
Perl, 440PHP, 392Python, 474
DOUBLE data type, 142DRDA (Distributed Relational Database
Architecture) protocol, 307, 533DROP CONSTRAINT clause, 156DROP INDEX statement, 169DROP statement, 140DROP TABLE statement, 156, 219DROP VIEW statement, 167duplicate rows, eliminating, 196-198dynamically determining result sets (JDBC
application development), 264-267DYNAMIC RESULT SETS clause, 231, 285dynamic SQL statements (JDBC application
development)allocating, 244-246executing, 246-248
E
Eclipse, 315, 325IBM DB2 plug-in for Eclipse, 23
editing environmentsfor Perl, 441for PHP, 393for Python, 475
embedded framework (deployment model),25-31
embedded .JAR files, 291-292embedded JDBC drivers, 532
JDBC application development, 236-237encrypted databases, booting, 527encryption, 123-126, 527
encryptionAlgorithm parameter, 43, 123-125algorithm values, 125-126feedback modes, 126
encryptionProvider parameter, 43, 123environment connection options, 45environment handles, 308environment variables
setting, 529on Linux, 525on Windows, 526
versus system variables, 59equality predicate, 173
with ALL predicate, 204ErrorCode values, 249-250error handling, stored procedures, 287error messages (YMLD example application),
363-364, 367-368errors. See also SQLExceptions
database-level authorization, 133getSQLError( ) method, 334
escape processing, 246exceptions. See SQLExceptionsexec( ) method, 414execute( ) method, 414, 448-449, 457, 492executeBatch( ) method, 245, 273executemany( ) method, 493ExecuteNonQuery( ) method (YMLD
example application), 385executeQuery( ) method, 247, 252executeUpdate( ) method, 247, 252executing dynamic SQL statements (JDBC
application development), 246-248execution plan and statistics, 113EXISTS predicate, 212-213exitYMLD( ) method, 355exporting data, 109-111expressions, parentheses in, 532extensions (PHP), 391-392. See also modulesEXTERNAL NAME clause, 223, 231, 292
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 547
548 Index
F
feedback modes for encryptionAlgorithmoption, 126
fetch( ) method, 416-417, 420, 450, 453fetchall( ) method, 495-498fetchmany( ) method, 495-498fetchone( ) method, 495-498file system, physical security, 121-123first( ) method, 253flat file systems, 13floating point data types, 46FLOAT data type, 142foreach loops (PHP), 402-403foreign keys, 158, 168FOR BIT DATA specification, 144FOR FETCH ONLY clause, 275for loops
PHP, 401-402Python, 482-483
FOR READ ONLY clause, 275FOR UPDATE clause, 274-278FROM clause, 170-171fullselects. See scalar fullselectsfunctions, 191
column functions, 193-194defining
PHP, 404Python, 483-484
MONTH, 337, 372scalar functions, 191-193, 223UDFs (user-defined functions), 223-224
JDBC application development, 288-299
G
generated values. See identity columnsGet( ) methods (ODBC), 366GET variables, handling
Perl application development, 459-461PHP application development, 426-430Python application development, 504-507
getAsciiStream( ) method, 263getAttribute( ) method, 423getAutoCommit( ) method, 272getBinaryStream( ) method, 262getBlob( ) method, 262-264getBytes( ) method, 262getCatalogName( ) method, 266getClob( ) method, 262-264getColumnClassName( ) method, 265getColumnCount( ) method, 265getColumnDisplaySize( ) method, 265getColumnLabel( ) method, 265getColumnName( ) method, 265getConnection( ) method, 238getErrorCode( ) method, 249-250getFetchDirection( ) method, 245getFetchSize( ) method, 245getMaxFieldSize( ) method, 245getMaxRows( ) method, 246getMessage( ) method, 248getMoreResults( ) method, 288getNextException( ) method, 250getNextWarning( ) method, 251getPrecision( ) method, 265getProdDates( ) method (YMLD example
application), 343-344, 376-377getResultSet( ) method, 287-288getScale( ) method, 265
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 548
Index 549
getSchemaName( ) method, 266getSQLError( ) method, 334getSQLState( ) method, 249getSubString( ) method, 263getTableName( ) method, 265getUnicodeStream( ) method, 263getX( ) methods, 259-260
converting data types, 260global arrays (PHP), 427graphical installation program, troubleshoot-
ing installation, 525graphical interfaces. See GUI interfacesGROUP BY clause, 187, 194-196GUI interfaces
Perl application development, 467-472Python application development, 512-518
H
Haderle, Don, 2handlers
Perl scripts, 459PHP scripts, 426Python scripts, 504
HAVING clause, 196, 200history
of IBM Cloudscape/Apache Derby, 1-3of PHP, 391of Python, 473
HTTP headers, settingPHP application development, 426Python application development, 503-504
Hypertext Transfer Protocol headers. SeeHTTP headers
I
IBM, commitment to open source, 9-10IBM Cloudscape
differences from Apache Derby, 3-7history of, 1-3installing on Linux, 75-76
with installation program, 81-90manual installation, 90-93migrating from previous versions, 76post-installation file structure, 98-99preparations for, 76-81troubleshooting installation, 96-98verifying installation, 93-96
installing on Windows, 49-50with installation program, 55-63manual installation, 63-66migrating from previous versions, 50post-installation file structure, 72-73preparations for, 50-55troubleshooting installation, 70-72verifying installation, 67-69
licensing, 6SQL support in, 19-21support contract, 6
IBM Cloudscape system home directory, 64, 91
IBM DB2 JDBC Universal driver, 237-238, 532
connections (JDBC application development), 240-244
options, 533IBM DB2 plug-in for Eclipse, 23IBM developerWorks Web site, 6identifiers, naming standards, 138IDENTITY_VAL_LOCAL function, 153
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 549
550 Index
identity columns, 531data type modifiers, 151-153
if/elif/else structure (Python), 482if/elseif/else structures (PHP), 400ij tool, 22-23
creating databases, 40-41preventing data truncation, 114
importingdata, 106-109modules (Python), 486-487
import statementsJDBC application development, 235-236Python, 489-490
include files (PHP), 406-407include statement (PHP), 407incubator projects. See Apache incubator
projectsindexes, 47, 167-169, 531
and null values, 531initializing
variables for mod_perl, 452YMLD example application, 326-327, 360
inline views. See nested table expressionsinner joins, 183INOUT parameters, calling stored
procedures, 231Perl application development, 451-452PHP application development, 419-420Python application development, 498
input-filtering functions (PHP), 431input streams, inserting/updating large objects,
279-281INSERT rule (referential constraints), 158-160INSERT statement, 213-215
default values, 150-151multiple rows, 215-216for specific columns, 215subselects, 216-217
installingApache Derby/IBM Cloudscape on Linux,
75-76with installation program, 81-90manual installation, 90-93migrating from previous versions, 76post-installation file structure, 98-99preparations for, 76-81troubleshooting installation, 96-98verifying installation, 93-96
Apache Derby/IBM Cloudscape on Windows, 49-50
with installation program, 55-63manual installation, 63-66migrating from previous versions, 50post-installation file structure, 72-73preparations for, 50-55troubleshooting installation, 70-72verifying installation, 67-69
DB2 Runtime Client, 308-311Perl, 441-442
on Linux, 442on Windows, 443
PHP, 407on Linux, 408-409on Windows, 410
Python, 487on Linux, 487on Windows, 488-489
troubleshooting installation, 525-526YMLD example application, 326, 359-360
INTEGER data type, 46, 141interfaces
GUI interfacesPerl application development, 467-472Python application development,
512-518
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 550
Index 551
Web interfacescgi module (Python application
develoment), 504CGI.pm module (Perl application
develoment), 459handling GET/POST variables,
426-430, 459-461, 504-507sessions, 435-436, 466, 511-512setting HTTP headers, 426, 503-504taint-checking user input, 430-432,
462, 507-508XHTML conflicts with Perl reserved
names, 465YMLD example, 432-435, 462-465,
508-511IN parameters, calling stored procedures,
176, 231PHP application development, 417-418Python application development, 496-497
IS NOT NULL predicate, 176-177IS NULL predicate, 176-177is_bool( ) method, 431is_float( ) method, 431is_int( ) method, 431is_numeric( ) method, 431is_string( ) method, 431isAfterLast( ) method, 254isAutoIncrement( ) method, 266isBeforeFirst( ) method, 254isCaseSensitive( ) method, 266isCurrency( ) method, 266isDefinitelyWritable( ) method, 266isFirst( ) method, 254isLast( ) method, 254isNullable( ) method, 266isolation levels
changing, 303-304choosing, 303
cursor stability, 302read stability, 302repeatable read, 303statement-level isolation levels, 304-305uncommitted read, 302
isReadOnly( ) method, 266isSearchable( ) method, 266isSigned( ) method, 266isWritable( ) method, 266iterators. See control structures
J
jar directory, 41.JAR files, embedded, 291-292Java. See also JDBC application development
benefits of, 233-234data types, versus SQL data types, 258, 366null values, 534
versus SQL null values, 260-262Java Common Client (JCC), 6Java Database Connectivity. See JDBC
application developmentJava Developer’s Kit. See JDKJava Runtime Environment. See JREJava Virtual Machine. See JVMJCC (Java Common Client), 6JCE providers, list of, 124-125JDBC application development, 233-234
allocating dynamic SQL statements, 244-246
applets, 299-301batch methods, 274batch processing, 273-274database connections, 238-239dynamically determining result sets,
264-267embedded JDBC drivers, 236-237
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 551
552 Index
executing dynamic SQL statements, 246-248
IBM DB2 JDBC Universal driver, 237-238import statements, 235-236inserting and updating large objects,
279-281locking issues, 302-305modifying data with result sets, 274-279network server connections, 240-244prepared statements, 268-272program structure, 234-235retrieving
column values, 258-264result sets, 252-258
SQLExceptions versus SQLWarnings, 251-252
stored procedures, 281-288transactions, 272trapping SQLExceptions, 248-250troubleshooting, 532-535UDFs (user-defined functions), 288-299YMLD example application
database connections, 327-329exit routine, 355functions of, 325initializing, 326-327installing, 326Java components, 324-325purchasing tickets, 336-351retrieving current performances,
329-334retrieving seat map, 335-336retrieving seat prices, 334-335viewing transaction log, 351-355
JDBC drivers, embedded, 532JDBC scripting tool (ij tool), 22-23
creating databases, 40-41preventing data truncation, 114
JDK (Java Developer’s Kit), 52, 78jEdit Java editor, 324join predicates, 183joins, 181-186JRE (Java Runtime Environment), 51, 77
checking version of, 52, 78installing for IBM Cloudscape/Apache
Derby, 51, 77setting PATH system variable for, 52-55,
78-81JVM (Java Virtual Machine), 51, 77
K-L
LANGUAGE clause, 224, 231, 292large objects (LOBs), 144-145, 530
getBlob( ) and getClob( ) methods, 262-264
inserting/updating, 534JDBC application development, 279-281Perl application development, 456-458PHP application development, 424-425Python application development, 501-503
last( ) method, 253LDAP directory service authentication,
128-129left outer joins, 184-186length( ) method, 263licensing
Apache Derby, 5IBM Cloudscape, 6
LIKE predicate, 174-175Linux
configuringPerl, 442-443PHP, 409-410Python, 488
environment variables, setting, 525
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 552
Index 553
installingDB2 Runtime Client, 309-310Perl, 442PHP, 408-409Python, 487
installing Apache Derby/IBM Cloudscape,75-76
with installation program, 81-90manual installation, 90-93migrating from previous versions, 76post-installation file structure, 98-99preparations for, 76-81troubleshooting installation, 96-98verifying installation, 93-96
runningPerl scripts, 445PHP scripts, 412Python scripts, 490
lists (Python), 479LOBs (large objects), 144-145, 530
getBlob( ) and getClob( ) methods, 262-264
inserting/updating, 534JDBC application development, 279-281Perl application development, 456-458PHP application development, 424-425Python application development, 501-503
local data stores, advantages of, 12-13LOCK TABLE statement, 304locking in JDBC application development,
302-305LOCKSIZE option, 156log directory, 41log files, location of, 44-45logDevice parameter, 43logical security, 121logWriter attribute, network server
connections, 242LONG VARCHAR data type, 143loops. See control structures
M
maintenance. See database administrationmanageability of relational databases, 15manual installation
of IBM Cloudscape on Linux, 90-93of IBM Cloudscape on Windows, 63-66
math functions, 192MAX function, 194migrating from previous versions of
Cloudscape, 50, 76MIN function, 194mod_perl, initializing variables for, 452modules. See also extensions
Perl, 439-440CGI.pm module, 459Tk module, 467-472usage, 444
Python, 473-474cgi module, 504importing, 486-487Tkinter module, 512-518usage, 489-490
MONTH function, 337, 372multiple predicates, 173multiple result sets, 288multiple rows, inserting, 215-216multiple SQLExceptions, 250
processing, 533
N
namingdatabases, 39-40, 312, 529derived columns, 190identifiers, 138variables
PHP, 394Python, 475-476
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 553
554 Index
nested table expressions, 205-206nested views, 166network server installation, verifying,
68-69, 93-96. See also Apache Derby Network Server
next( ) method, 253-254nextRowset( ) method, 420nextset( ) method, 499nodes, 311non-unique indexes, 168NOT clause, 177-178NOT EXISTS predicate, 213null values
data type modifiers, 149and indexes, 168, 531in Java, 534for restriction, 176-177searching for, 531setting columns to, 278-279SQL versus Java, 260-262troubleshooting, 530-531
numeric data types, 140-142PHP, 396Python, 477-478
Nuvola icon set, 324
O
objects. See database objectsOCC (occasionally connected client), 12ODBC (Open Database Connectivity), 308.
See also Windows application developmentdata types, versus SQL data types, 385Get( ) methods, 366
ODBC .NET Data Provider, 357offline backups, 104-105online backups
with built-in copy, 102-103with read-only access, 103-104
ON NULL INPUT clause, 224Open Database Connectivity. See ODBCopen source
Apache Derby as, 3business perspective, 10-11IBM’s commitment to, 9-10technical perspective, 11
ORDER BY clause, 187-189ordinary identifiers, 138outer joins, 183-184output streams, inserting/updating large
objects, 279-281OUT parameters, calling stored
procedures, 231Perl application development, 451-452PHP application development, 419-420Python application development, 498
P
parameter markers, 268, 384-385PARAMETER STYLE clause, 224, 231, 292parameters
binding to prepared statements (Perl application development), 449
issuing SQL statementsPHP application development, 414-416Python application development,
493-494Parameters( ) method (YMLD example
application), 384-385parentheses in expressions, 532parent keys, 158parent tables, 158pass statement (Python), 483password parameter, 43
network server connections, 241path names, spaces in, 60PATH system variable, setting, 52-55, 78-81
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 554
Index 555
PDO (PHP Data Objects), 392connection pooling, 413database connections, 412-413disconnecting from database, 413large object (LOB) data types, 424-425SQL statements, calling stored procedures,
417-421transaction management, 421-424
PDO_ODBC driver, 392PDOStatement objects, SQL statements
issuing, 413-414with different parameters, 414-416with placeholders, 414
retrieving result sets, 416-417PEAR (PHP Extension and Archive
Repository), 391PECL (PHP Extension Community
Library), 391performance, 113
collecting statistics, 113-115Perl, 441PHP, 393Python, 474-475timing information in statistics, 115-118
performance tuning, 526-527PERFORMANCES table (YMLD example
database), 318-320Perl, 439
and CLI, 308configuring
on Linux, 442-443on Windows, 443-444
documentation, 440editing environments, 441installing, 441-442
on Linux, 442on Windows, 443
modules, 439-440usage, 444
performance, 441
Perl application developmentconnection pooling, 446-447database connections, 445-446disconnecting from database, 446GUI interfaces, 467-472large object (LOB) data types, 456-458module usage, 444running scripts from command line, 445SQL statements
calling stored procedures, 451-454issuing, 447issuing with prepared statements,
447-449retrieving result sets, 450-451
transaction management, 454-455Web interfaces
CGI.pm module, 459conflicts with XHTML and Perl
reserved, 465handling GET/POST variables, 459-461sessions, 466taint-checking user input, 462YMLD example, 462-465
permissionsfor backups, 103database-level authorization, 133
permutation, 172pFinishPurchase( ) method (YMLD example
application), 349-351PHP
classes, creating, 404-406and CLI, 308configuring
on Linux, 409-410on Windows, 410-411
control structures, 399break statement, 404continue statement, 404do/while loops, 399-400foreach loops, 402-403
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 555
556 Index
for loops, 401-402if/elseif/else structures, 400switch structures, 401while loops, 399-400
data typesarrays, 396-397Boolean, 395-396numeric, 396strings, 397-399
delimiting code, 394documentation, 392editing environments, 393extensions, 391-392functions, defining, 404history of, 391include files, 406-407installing, 407
on Linux, 408-409on Windows, 410
performance, 393variables
declaring, 395naming, 394
PHP application development, 411connection pooling, 413database connections, 412-413disconnecting from database, 413large object (LOB) data types, 424-425running scripts from command line,
411-412SQL statements
calling stored procedures, 417-421issuing, 413-414issuing with different parameters,
414-416issuing with placeholders, 414retrieving result sets, 416-417
transaction management, 421-424Web interfaces
handling GET/POST variables, 426-430sessions, 435-436setting HTTP headers, 426taint-checking user input, 430-432YMLD example, 432-435
PHP Data Objects. See PDOPHP Extension and Archive Repository
(PEAR), 391PHP Extension Community Library
(PECL), 391physical security, 121-123, 527placeholders, issuing SQL statements
PHP application development, 414Python application development, 492
pooling connectionsPerl application development, 446-447PHP application development, 413Python application development, 491-492
portNumber attribute, network server connections, 241
position( ) method, 263positioned deletes, 219positioned updates, 217post-installation file structure
IBM Cloudscape on Linux installation, 98-99
IBM Cloudscape on Windows installation,72-73
POST variables, handlingPerl application development, 459-461PHP application development, 426-430Python application development, 504-507
pProdSelection( ) method (YMLD exampleapplication), 336-339
precedence of authentication levels, 528
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 556
Index 557
precision (numbers), 141predicates, 173
BETWEEN predicate, 175EXISTS predicate, 212-213IN predicate, 176IS NOT NULL predicate, 176-177IS NULL predicate, 176-177join predicates, 183LIKE predicate, 174-175multiple predicates, 173NOT clause, 177-178quantified predicates, 202-204
prepare( ) method, 414, 448prepareCall( ) method, 284prepared statements
JDBC application development, 268-272Perl application development, 447-449
prerequisitesfor IBM Cloudscape for Linux installer,
82-83for IBM Cloudscape for Windows
installer, 57previous( ) method, 254PRICEPLAN table (YMLD example
database), 322-323primary indexes, 168primary keys, 158, 168. See also unique
constraintsADD UNIQUE statement, 155and indexes, 168
privileges for database objects, 163procedures, 48, 230-231
calling, 284Perl application development, 451-454PHP application development, 417-421Python application development,
495-499
connections from, 535creating, 281-282defining, 282-284error handling, 287for exporting data, 109-111for importing data, 106-109JDBC application development, 281-288result sets, 284-287
PRODUCTIONS table (YMLD example database), 317-318
projection, 171-172promotion of data types, 190properties
database-wide, 127system-wide, 127
properties variable, establishing database connections, 239
pShowProductions( ) method (YMLDexample application), 329-334
pShowTickets( ) method (YMLD exampleapplication), 346-349
pyDB2 modulelarge object (LOB) data types, 501-503stored procedures, 496
PyPi (Python Package Index), 473Python
classes, creating, 484-485and CLI, 308configuring
on Linux, 488on Windows, 489
control structures, 481break statement, 483continue statement, 483for loops, 482-483if/elif/else structure, 482pass statement, 483while loops, 481-482
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 557
558 Index
data typesBoolean, 476-477dictionaries, 480-481numeric, 477-478sequences, 478-479strings, 479-480
documentation, 474editing environments, 475functions, defining, 483-484history of, 473installing, 487
on Linux, 487on Windows, 488-489
modules, 473-474importing, 486-487usage, 489-490
performance, 474-475variables
declaring, 476naming, 475-476
Python application developmentconnection pooling, 491-492database connections, 490disconnecting from database, 491GUI interfaces, 512-518large object (LOB) data types, 501-503module usage, 489-490running scripts from command line, 490SQL statements
calling stored procedures, 495-499issuing, 492issuing with different parameters,
493-494issuing with placeholders, 492retrieving result sets, 494-495
transaction management, 499-501
Web interfacescgi module, 504handling GET/POST variables, 504-507sessions, 511-512setting HTTP headers, 503-504taint-checking user input, 507-508YMLD example, 508-511
Python Package Index (PyPi), 473
Q
q{} syntax, 447quantified predicates, 202-204queries. See SELECT statementquery( ) method, 416question mark (?), parameter markers, 268
R
range operator for restriction, 175read stability isolation level, 302readOnly attribute, network server
connections, 242READS SQL DATA clause, 231REAL data type, 142recovery. See backupsreferential integrity constraints, 156-161, 168
and indexes, 168registerOutParameter( ) method, 284relational databases, advantages of, 13-15relative( ) method, 254remote authentication, 528renaming. See namingrepeatable read isolation level, 303require statement (PHP), 407reserved Perl names, conflicts with
XHTML, 465resizing VARCHAR columns, 156
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 558
Index 559
restoreFrom parameter, 44restoring database from backups, 105restriction, 173
BETWEEN predicate, 175with GROUP BY clause and column
functions, 195-196IN predicate, 176LIKE predicate, 174-175multiple predicates, 173NOT clause, 177-178null values, 176-177range operator, 175
resultSetCurrency parameter (createStatement( ) method), 244-245
ResultSetMetaData interface, 265resultSetType parameter (createStatement( )
method), 244-245result sets, 244
accessing in random order, 533dynamically determining (JDBC
application development), 264-267exporting data, 110-111modifying data with (JDBC application
development), 274-279multiple result sets, 288retrieving
JDBC application development, 252-258
Perl application development, 450-451PHP application development, 416-417Python application development,
494-495retrieving column values (JDBC
application development), 258-264stored procedures, 281, 284-287
retrieveMessagesFromServerOnGetMessageattribute, network server connections, 241-243
retrievingcolumn values (JDBC application
development), 258-264current performances (YMLD example
application), 329-334, 364-368result sets
JDBC application development, 252-258
Perl application development, 450-451PHP application development, 416-417Python application development,
494-495seat map (YMLD example application),
335-336, 369-370seat prices (YMLD example application),
334-335, 368-369RETURNS clause, 223, 292, 293right outer joins, 186rollBack( ) method, 422, 454, 500ROLLBACK statement, 231-232
JDBC application development, 272rollForwardRecoveryFrom parameter, 43row functions. See scalar functionsrow-level locks, 156rowCount( ) method, 415.rowcount property, 494rows, 46runtime statistics. See statistics
S
Saunders, Kathy, 4scalability of relational databases, 15scalar fullselects, 206-209
UPDATE statement, 218-219scalar functions, 191-193, 223schema names, when creating tables, 148
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 559
560 Index
schemas, 46, 221-223, 532CREATE SCHEMA statement, 148SET SCHEMA command, 363
searched deletes, 219searched updates, 217SEATMAP table (YMLD example
database), 323SEATS table (YMLD example database),
320-322security
authentication, 313connection options, 43encryption, 123-126JCE providers, list of, 124-125logical security, 121permissions for backups, 103physical security, 121-123troubleshooting, 527-528user authentication, 126-128
built-in authentication, 130-132LDAP directory service authentication,
128-129user-defined authentication, 129
user authorization, 132-133securityMechanism attribute, network server
connections, 242seg0 directory, 41SELECT statement. See also result sets
Cartesian product, 179-181CASE expressions, 204-205correlation names, 186-187derived columns, 189-191DISTINCT keyword, 196-198EXISTS predicate, 212-213GROUP BY clause, 194-196joins, 181-186nested table expressions, 205-206ORDER BY clause, 187-189permutation, 172
projection, 171-172quantified predicates, 202-204restriction, 173-178retrieving entire tables, 170-171scalar fullselects, 206-209subqueries, 198-202UNION operator, 209-212
Selinger, Patricia, 2sequences (Python), 478-479. See also arrays
(PHP)sequential value columns. See identity
columnsserver framework (deployment model), 32-36server name attribute, network server
connections, 240-241service.properties file, 41
special characters in, 529session_start( ) method, 436sessions
Perl application development, 466PHP application development, 435-436Python application development, 511-512
SET CURRENT ISOLATION statement, 303SET keyword, resizing VARCHAR
columns, 156set relationships, 14SET SCHEMA command, 363setAsciiStream( ) method, 279setAttribute( ) method, 423setAutoCommit( ) method, 272setBinaryStream( ) method, 280setCalendar( ) method (YMLD example
application), 340-343, 374-376setCursorName( ) method, 276setEscapeProcessing( ) method, 246setFetchDirection( ) method, 245setFetchSize( ) method, 245setMaxFieldSize( ) method, 246
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 560
Index 561
setMaxRows( ) method, 246setNull( ) method, 278setProduction method (YMLD example
application), 372setTransactionIsolation( ) method, 303setUnicodeStream( ) method, 279setX( ) methods, 269shutdown parameter, 44single-user implementation. See embedded
framework (deployment model)single quotation marks (‘’), character string
delimiters, 143slices of sequences (Python), 478SMALLINT data type, 141SOME quantified predicate, 202sorting. See ORDER BY clausespaces in path names, 60SQL (Structured Query Language), 14, 135.
See also dynamic SQL statements; SQL statements
Apache Derby support for, 19-21categories of, 135data types
versus Java data types, 258, 366versus ODBC data types, 385
DDL (Data Definition Language), 137-138ALTER statement, 139ALTER TABLE statement, 155-156constraints, 156-163CREATE statement, 139CREATE TABLE statement, 147-148data types, 140-147data type modifiers, 148-153DECLARE statement, 138-140,
153-154DROP statement, 140DROP TABLE statement, 156
indexes, 167-169system catalog tables, 163-164views, 165-167
DML (Data Manipulation Language), 170DELETE statement, 219-221functions, 191-194INSERT statement, 213-217SELECT statement, 170-191, 194-213.
See also result setsUPDATE statement, 217-219
MONTH function, 337, 372null values, versus Java null values,
260-262prepared statements (JDBC application
development), 268-272procedures, 230-231schemas, 221-223transactions, 231-232triggers, 224-225
activation, 225body of, 225-226example, 226-230
troubleshooting, 529-532try blocks, 533UDFs (user-defined functions), 223-224
JDBC application development, 288-299
SQL clause, 224, 231, 292SQL statements. See also SQL
calling stored proceduresPerl application development, 451-454PHP application development, 417-421Python application development,
495-499issuing
Perl application development, 447PHP application development, 413-414Python application development, 492
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 561
562 Index
issuing with different parametersPHP application development, 414-416Python application development,
493-494issuing with placeholders
PHP application development, 414Python application development, 492
issuing with prepared statements (Perlapplication development), 447-449
retrieving result setsPerl application development, 450-451PHP application development, 416-417Python application development,
494-495SQL92 identifiers, 127SQLExceptions
multiple SQLExceptions, processing, 533trapping (JDBC application development),
248-250versus SQLWarnings, 534
JDBC application development, 251-252
SQLSTATE values, 249SQLWarnings versus SQLExceptions, 534
JDBC application development, 251-252statement handles, 308statement-level isolation levels, 304-305statements, closing, 533. See also dynamic
SQL statements; SQL statementsstatistics
collecting, 113-115and execution plan, 113timing information in, 115-118
stored procedures, 48, 230-231calling, 284
Perl application development, 451-454PHP application development, 417-421Python application development,
495-499
connections from, 535creating, 281-282defining, 282-284error handling, 287for exporting data, 109-111for importing data, 106-109JDBC application development, 281-288result sets, 284-287
string data types, 140-144string functions, 192strings
PHP, 397-399Python, 479-480searching for, 174-175
Structured Query Language. See SQLsubqueries, 176, 198-202
EXISTS predicate, 212-213versus subselects, 202
subselectsDELETE statement, 220-221inserting, 216-217versus subqueries, 202
subset of columns, importing data, 108-109Subversion (SVN) repository, 8SUM function, 194support contract for IBM Cloudscape, 6SVN (Subversion) repository, 8switch structures (PHP), 401SYSALIASES system table, 41, 163SYSCHECKS system table, 41, 163SYSCOLUMNS system table, 41, 163SYSCONGLOMERATES system table,
42, 163SYSCONSTRAINTS system table, 42, 163SYSDEPENDS system table, 42, 164SYSFILES system table, 42, 164SYSFOREIGNKEYS system table, 42, 164SYSKEYS system table, 42, 164
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 562
Index 563
SYSSCHEMAS system table, 42, 164SYSSTATEMENTS system table, 42, 164SYSSTATISTICS system table, 42, 164SYSTABLES system table, 42, 164system-level authentication, precedence, 528system-level users
built-in authentication, 130-131versus database-level users, precedence
of, 132system-wide properties, 127system properties, setting, 237system tables, list of, 41-42, 163-164system variables
backward slash (\) in, 64, 91defined, 64versus environment variables, 59
SYSTRIGGERS system table, 42, 164SYSVIEWS system table, 42, 164
T
table check constraints. See check constraintstable scans, 113table-level locks, 156tables, 46
ALTER statement, 139ALTER TABLE statement, 155-156compressing, 119consistency checks, 112-113constraints, 156
check constraints, 161-163referential integrity constraints, 157-161unique constraints, 157
CREATE TABLE statement, 147-148DECLARE statement, 138-140,
153-154, 530DELETE statement, 219-221DROP TABLE statement, 156, 219exporting data, 109-110importing data, 107-109
indexes, 167-169INSERT statement, 213-215
default values, 150-151multiple rows, 215-216for specific columns, 215subselects, 216-217
SELECT statementCartesian product, 179-181CASE expressions, 204-205correlation names, 186-187derived columns, 189-191DISTINCT keyword, 196-198EXISTS predicate, 212-213GROUP BY clause, 194-196joins, 181-186nested table expressions, 205-206ORDER BY clause, 187-189permutation, 172projection, 171-172quantified predicates, 202-204restriction, 173-178retrieving entire tables, 170-171scalar fullselects, 206-209subqueries, 198-202UNION operator, 209-212
system catalog tables, 41-42, 163-164triggers, 224-225
activation, 225body of, 225-226example, 226-230
UPDATE statement, 217-219views, 165-167in YMLD example database, 136-137, 316
PERFORMANCES table, 318-320PRICEPLAN table, 322-323PRODUCTIONS table, 317-318SEATMAP table, 323SEATS table, 320-322TRANSACTIONS table, 323-324
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 563
564 Index
taint-checking user inputPerl application development, 462PHP application development, 430-432Python application development, 507-508
TCP/IP nodes, 311technical perspective on open source, 11temporary tables, DECLARE statement,
138-140, 153-154, 530territory, connection options, 45testing database connections, 312ThinG GUI design editor, 324Thinlet GUI toolkit, 324
interfaces, 330time and date data types, 46, 145-147TIME data type, 145-146TIMESTAMP data type, 145-147timing information, adding to statistics,
115-118Tk (Perl module), 440
Perl application development, 467-472Tkinter module (Python application
development), 512-518tmp directory, 41traceFile attribute, network server
connections, 242traceLevel attribute, network server
connections, 242transactions, 231-232
JDBC application development, 272Perl application development, 454-455PHP application development, 421-424Python application development, 499-501safety of, 30viewing transaction log (YMLD example
application)JDBC application, 351-355Windows application, 386-390
TRANSACTIONS table (YMLD exampledatabase), 323-324
trapping SQLExceptions (JDBC applicationdevelopment), 248-250
triggers, 47-48, 224-225, 532activation, 225body of, 225-226example, 226-230
troubleshootingdatabases, 528-529IBM Cloudscape on Linux installation,
96-98IBM Cloudscape on Windows installation,
70-72installation, 525-526JDBC application development, 532-535performance tuning, 526-527security issues, 527-528SQL, 529-532
truncated data, preventing in ij tool, 114try/catch blocks, 533
YMLD example application, 367-368tuples (Python), 478
U
UDFs (user-defined functions), 191, 223-224JDBC application development, 288-299troubleshooting, 535
uncataloged database connections, 313uncommitted read isolation level, 302uncorrelated subqueries, 201Unicode character encoding, 142-143, 262UNION ALL operator, 210UNION operator, 209-212unique constraints, 156-157, 168unique identifiers. See identity columnsunique indexes, 167-168
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 564
Index 565
unique keys, 157, 168and indexes, 168
unit of work. See transactionsUPDATE rules (referential constraints), 161UPDATE statement, 217-219updateNull( ) method, 278use statement (Perl), 444user attribute, network server connections, 241user authentication. See authenticationuser authorization. See authorizationuser input, taint-checking
Perl application development, 462PHP application development, 430-432Python application development, 507-508
user names. See authorization identifiersuser parameter, 43user-defined authentication, 129user-defined functions. See UDFs
V
validation. See taint-checking user inputVALUES clause, 214VARCHAR data type, 140, 143
resizing VARCHAR columns, 156variables
initializing for mod_perl, 452PHP
declaring, 395naming, 394
Pythondeclaring, 476naming, 475-476
vector functions. See column functionsverifying
IBM Cloudscape on Linux installation, 93-96
IBM Cloudscape on Windows installation,67-69
version of JRE, checking, 52, 78views, 47, 165-167
versus nested table expressions, 206virtual tables. See views
W
warnings. See SQLWarningswasnull( ) method, 260Web interfaces
cgi module (Python application develoment), 504
CGI.pm module (Perl application develoment), 459
handling GET/POST variablesPerl application development, 459-461PHP application development, 426-430Python application development,
504-507sessions
Perl application development, 466PHP application development, 435-436Python application development,
511-512setting HTTP headers
PHP application development, 426Python application development,
503-504taint-checking user input
Perl application development, 462PHP application development, 430-432Python application development,
507-508XHTML conflicts with Perl reserved
names, 465YMLD example
Perl application development, 462-465PHP application development, 432-435Python application development,
508-511
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 565
566 Index
WHERE clause, 173while loops
PHP, 399-400Python, 481-482
Windowsconfiguring
Perl, 443-444PHP, 410-411Python, 489
environment variables, setting, 526installing
DB2 Runtime Client, 310-311Perl, 443PHP, 410Python, 488-489
installing Apache Derby/IBM Cloudscape,49-50
with installation program, 55-63manual installation, 63-66migrating from previous versions, 50post-installation file structure, 72-73preparations for, 50-55troubleshooting installation, 70-72verifying installation, 67-69
runningPerl scripts, 445PHP scripts, 411Python scripts, 490
Windows application development, YMLDexample application
components, 357database connections, 360-364exit routine, 390functions of, 358initializing, 360installing, 359-360purchasing tickets, 370-386
retrievingcurrent performances, 364-368seat map, 369-370seat prices, 368-369
viewing transaction log, 386-390
X-Z
XHTML, conflicts with Perl reserved names, 465
XML files, 13
YMLD example databaseas JDBC application
database connections, 327-329exit routine, 355functions of, 325initializing, 326-327installing, 326Java components, 324-325purchasing tickets, 336-351retrieving current performances,
329-334retrieving seat map, 335-336retrieving seat prices, 334-335viewing transaction log, 351-355
tables in, 136-137, 316PERFORMANCES table, 318-320PRICEPLAN table, 322-323PRODUCTIONS table, 317-318SEATMAP table, 323SEATS table, 320-322TRANSACTIONS table, 323-324
Web interfacesPerl application development, 462-465PHP application development, 432-435Python application development,
508-511
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 566
Index 567
as Windows applicationcomponents, 357database connections, 360-364exit routine, 390functions of, 358initializing, 360installing, 359-360purchasing tickets, 370-386retrieving current performances,
364-368retrieving seat map, 369-370retrieving seat prices, 368-369viewing transaction log, 386-390
Your Momma Loves Drama. See YMLDexample database
Zikopoulos_Index.qxd 9/28/05 1:48 PM Page 567