Beginning SQL Paul Wilton and John W.[r]
(1)(2)(3)(4)(5)(6)tuning databases (continued)
compartmentalized networks, 352 files, 351
filter redundancy, 363 gigahertz networks, 352 hardware, 349–350 indexes
b-tree structure, 357–358
database storage requirements, 358 doubly linked lists, 359
dropping, 360
when to use, 360–361
number-to-character conversions, 363 pattern matching, 363
processors, 351 queries, 355–356 reasons for, 356 table scans, 361–362 workstations, 350–351
Turing Award (Charles W Bachman), tutorial information, IBM installation, 416
.txtfiles, 451
typical installation option
IBM database, 411
Microsoft SQL Server installation, 432 MySQL database, 393
U
uncommitted data problems, 321 underscore (_), 70
Unicode character set, 20, 22
UNIONoperator
ALLstatement, 229 discussed, 226
intdata type, 227
NULLvalue, 232
ORDER BYclause, 230–231
SELECTstatement, 228
UNIQUEconstraint, 125–129 United Kingdom, date variations, 25
United States, date variations, 24 unknown values,NULLvalues, 113
UPDATEstatement
addresses, 45–46
SETclause, 46 subqueries, 257–259 syntax, 45
WHEREclause, 45–46
updates
database records, logical operators and, 49 lost update problems, 320–321
SQL, 13 views
CHECK OPTIONkeyword, 295–298 restrictions, 295
upgrades, workstations, 350
UPPER()function, 170
U.S (United States), date variations, 24 usage options, MySQL installation, 396–397
USAGEstatement, 337 user security
ALTER USERstatement, 331
CREATE USERstatement, 330 deleting users, 331
discussed, 328
DROP USERstatement, 331 group access, 332–334 user IDs, 329–332
V
validation
CHECKconstraint, 125, 129–132 design improvement, 153–154
FOREIGN KEYconstraint, 135–139
NOT NULLconstraint, 124–125 performance improvement, 145–149
PRIMARY KEYconstraint, 132–134
UNIQUEconstraint, 125–129
values
absolute, 159–160 duplicate, avoiding, 142
500
tuning databases (continued)
(7)IS NULLoperator, 114
NULLIF()function, 180 numerics, 180–181
ORDER BYclause, 113 primary keys, 132 strings and, 182
UNIONoperator, 232 unknown values, 113 retrieving
ranges, 66–67 from rows, 55–56
VALUESstatement, 41
varchardata type, 22 variable length data types, 22 versioning, isolation levels, 320 vertical views, 337–338 views
base, 290–291 benefits, 287–288
CREATE VIEWstatement, 290 creation, 288–289 defined, 287 dropping, 298 field, 292 grouped, 340 horizontal, 339–340 limitations, 287, 341
privileges, granting, 341–342 row, 291
summary, 293–294 table join, 290 tables and, 341 updating
CHECK OPTIONkeyword, 295–298 overview, 294
restrictions, 295
W
welcome screen
Microsoft SQL Server installation, 429 Oracle installation, 444
WHEREclause
ANDoperator, 48, 63 comparison operators, 47
DELETEstatement, 49–50
DIFFERENCE()function, 177 filtering results with, 56–58
INoperator, 74 logical operators, 48 operator precedence, 64
ORoperator, 48, 63
SELECTstatement, 56–57 subqueries, 236, 240–242
UPDATEstatement, 45–46
wildcard characters
* (asterisk), 70 multiple use, 71 % (percent sign), 70 ? (question mark), 70 _ (underscore), 70
Window service options, MySQL installation, 399
windowed views, 292–293
workstations, database tuning, 350–351 Wrox, P2P forums, 5–6
Y
YEAR()function, 178
year-month-day data formats, 44