Mysql your visual blueprint for creating open source databases- P16 ppt

4 240 0
Mysql your visual blueprint for creating open source databases- P16 ppt

Đang tải... (xem toàn văn)

Thông tin tài liệu

287 MYSQL: Your visual blueprint to open source database management RAND function, 121, 134 random numbers, described, 134 RDBMS (relational database management systems), 2–3. See also DBMSs (database management systems) READ locks, 204–205 REAL column type, 43 record(s). See also rows delete, 236–237, 255 described, 4 insert, 234–235, 238–239, 254 Red Hat Linux. See also Linux install MySQL on, 8 log files and, 201 RPM format, 8, 10 REGEXP operator, 142 regular expressions, 142–143, 243 relational databases, described, 2–3 relationships, described, 30 release notes, 14 Reload MySQL option, 226 remainder (%) operator, 134, 219, 242 RENAME command, 55 RENAME TABLE command, 74, 192–193 REPEAT function, 141 REPLACE command, 76 REPLACE function, 141, 144 REPLACE keyword, 156 Report tab, 175, 185 reports create, 175 edit, 185 print, 185 return keyword, 219 REVERSE function, 141 REVOKE command, 207, 208 RIGHT function, 140, 146 RIGHT JOIN clause, 131 RLIKE operator, 142, 143 ROLLBACK command, 31 root users. See also usernames; users create, 22 DROP TABLE command and, 52 installation and, 13, 22 MySQL server and, 132 passwords for, 23, 207 ROUND function, 97, 135 round numbers, 135 row(s). See also records auto-increment columns and, 65 combine, into a single row, 122 copy, 88 count, 124–125 delete, 7, 65, 90–91, 192, 236–237 described, 4, 259 fixed-length, 188 insert, 7, 78–79, 82, 88–89 limit the number of, 37, 110 modify, 98–101 numbers for, 118 replace existing, 86–87 retrieve, 7 specify columns for, 80 update, 7, 86, 96–97, 102–103 variable-length, 188 ROWS keyword, 158 rpm command, 8, 10 RMP packages, 8, 10–11, 13, 201, 244–245 RSA Data Security, 155 RTRIM function, 141 S safe_mysqld command, 16, 174, 178 search and replace functions, 141 SECOND function, 148 secondary keys, described, 30. See also keys; primary keys SEC_TO_TIME function, 151 Secure Sockets Layer. See SSL (Secure Sockets Layer) security. See also passwords advanced, 217 checksums and, 155 encryption, 155, 207, 224 firewalls, 226 importance of, 206 network access control, 206, 216 overview of, 30, 207–217 PHP and, 226 privileges and, 207, 208–209, 212–216, 234, 259 risks, 206 tables, 214–215 seeds, specify, 134 SELECT clause, 76, 95 SELECT command count rows with, 124–125 described, 7, 110–111 display data with, 112–113 export data with, 158–159 GROUP BY clause and, 122 INSERT command and, 88–89 INTO OUTFILE option, 156, 159, 162, 165, 167 LIMIT clause and, 110, 118–119 math functions and, 136–137 multiple clauses used with, 123 MySQLGUI and, 132 Perl and, 253 PHP and, 224, 230–231, 240, 241 query syntax and, 21 retrieve data from multiple tables with, 128–129 security and, 209 sort data with, 120–121 strings and, 142, 144–145 table locks and, 205 USE command and, 21 SELECT keyword, 37 semicolon (;), 18, 24, 29, 35 server(s). See also Apache Web server; MySQL server described, 3, 259 list all databases on, 34 programming languages and, 3 reconnection attempts, 25 software for, 3, 16–17 status information, 17 storage of tables on, 38 use of multiple, to insure data availability, 30 version information, 19 Server tab, 185 Services control panel, 174, 180 SESSION_USER function, 154 SET column type, 45, 48–49 SET keyword, 96, 98 SET PASSWORD command, 210–211, 215 sets, described, 48–49 Setup Wizard, 246, 247 setup.exe, 14 set-variable command, 194, 195 SGI Irix, 9 6516922 Index.F 9/26/02 11:41 AM Page 287 288 INDEX SHOW COLUMNS command, 40, 52, 53 SHOW COLUMNS FROM command, 41 SHOW command, 6 SHOW DATABASES command, 6, 19, 34–35, 217 SHOW GRANTS command, 207, 212–213 SHOW INDEX command, 72 SHOW STATUS command, 196, 197 SHOW TABLE STATUS command, 32, 40, 41 SHOW TABLES command, 7, 25, 27, 32, 37, 40 SHOW VARIABLES command, 195, 198 shutdown command, 174, 178 SIN function, 135 single quote ('), 242 Sleepycat Software, 31 slow queries, 20, 197 slow_queries variable, 197 SMALLINT column type, 42 Solaris, 9 sort data, 55, 93, 111, 120–121, 189 SOURCE command, 25, 157, 169, 172 space characters, 141 SPACE function, 141 special characters. See also specific characters in MySQL regular expressions, 143 in text files, 161 spreadsheets, export data from, 164–165 SQL (Structured Query Language). See also queries described, 4, 6–7, 259 development of, by IBM, 6 SQL Server (Microsoft), 5 square brackets ([]), 242 src directory, 12 SSL (Secure Sockets Layer), 217, 259 startup options, 217 STATUS command, 17, 20, 25, 174, 175, 176 status information, 20, 25, 174–176, 195–196, 226 STD function, 127 S/390 systems, 8 STRCMP function, 142 string(s) combine text values into, 113 comparisons, 111, 142–143 encryption of, 224 functions, 140–141, 144–145 mysqladmin and, 259 numeric comparisons and, 139 Perl and, 242 search for, 147 sub-, 140, 146–147 view tables which match, 40 SUBDATE function, 149 Submit button, 240 SUBSTRING function, 140, 146 substrings, 140, 146–147. See also strings subtraction (-) operator, 134, 219, 242 SUM function, 126–127 Sun Sparc systems, 8 SYSDATE function, 148 SYSTEM_USER function, 154 T tab characters, 156, 161, 165 tab-delimited format, 165 table(s). See also columns; rows; specific types add columns to, 56–57 add rows to, 78–79 check, for errors, 190–191 combine, 110 copy data between, 76, 157 copy fields from, 37 corrupt, 190–191 create, 6, 36–39 delete, 6, 37, 52–53 delete data from, 77 delete rows from, 90–92 described, 4, 259 design, 188 display, 27 display data from multiple, 128–129 drop, 36–37 information, view, 40–41 joins, 110, 130–131, 189, 258 lock/unlock, 189, 204–205 name/rename, 38, 55, 74 optimize/repair, 188, 192–193 plan, 30 specify options for, 37 structure of, 172, 173 temporary, 31, 37 types of, 31, 36, 75 update rows in, 102–103 TABLE keyword, 96 TAN function, 135 .tar.gz file extension, 11 Task Manager, 181 Task Scheduler, 157, 171 TCP/IP (Transmission Control Protocol/Internet Protocol), 14,19, 179, 181, 217 TEMPORARY keyword, 37 temporary tables. See also tables described, 37 heap tables used as, 31 TERMINATE BY clause, 159 terminology, overview of, 4 test MySQL installation, 17 phpMyAdmin, 222–223 utilities, 10, 15 text. See also TEXT column type; text files editors, 26–27, 160, 198–199 fields, 46, 114 strings, compare, 111 values, combine, into strings, 113 TEXT column type add, 56 create, 46–47 described, 44–45 indexes and, 59 length of, 46 table design and, 188 text file(s). See also log files; text ASCII, 133, 141 create, 160–161 import/export, 156, 158–163, 165–167 formats, 156, 160–161 Text Import Wizard, 165 thread_cache_size variable, 195 threads. See also processes caches for, 195 described, 20, 175 display, 175 run, 197 threads_cached variable, 197 threads_created variable, 197 threads_running variable, 197 6516922 Index.F 9/26/02 11:41 AM Page 288 289 MYSQL: Your visual blueprint to open source database management time. See also dates add/subtract, 153 convert, 151 formats, 149–152 functions, 148–149 TIME column type, 45 TIME function, 148–149 TIME_FORMAT function, 149, 152 TIMESTAMP columns add, 62–63 described, 45, 62, 84–85 update, 94, 97, 107 TIMESTAMP function, 148–150 TIME_TO_SEC function, 151 TINYBLOB column type, 44 TINYINT column type, 38, 39, 42 TINYTEXT column type, 44 TO_DAYS function, 151 totals, calculate, 126–127 transactions BDB tables and, 31 described, 9, 31 InnoDB tables and, 31 MyISAM tables and, 31 Transmission Control Protocol/Internet Protocol. See TCP/IP trigonometry functions, 135 TRIM function, 141 TRUNCATE command, 92 TRUNCATE function, 135 TRUNCATE keyword, 77 TYPE keyword, 31, 36 TYPE= option, 75 U underscore (_), 33, 34, 40, 114, 142 unique indexes, 36, 59–61, 64, 72–73, 259 UNIQUE keyword, 36, 59, 61 UNISIGNED keyword, 42 UNIX backups and, 157, 170 configuration files, 194, 198 DB2 and, 5 display current values for variables with, 195 install MySQL under, 8, 9, 12–13 install Perl under, 243–244 log files, 200 myisamchk and, 190 MySQL server and, 4, 27,178–179 Oracle and, 5 Perl and, 242 PostgreSQL, 5 ps command, 183 security and, 217 sockets, 217 start MySQL monitor under, 18 text files and, 160, 163 usernames and, 22, 23, 194 UNIX_TIMESTAMP function, 151 Unknown column error, 80 UNLOCK TABLES command, 189, 204–205 UNSIGNED attribute, 42, 43, 64, 66 update. See also UPDATE command columns, 97, 104–109 rows, 7, 86, 96–97, 102–103 UPDATE command described, 96–97 increment column values with, 108–109 modify rows with, 98–103 PHP and, 237 priority settings, 96, 100 security and, 209, 215 table locks and, 205 timestamp columns and, 85 update columns with, 104–109 use math with, 109 WHERE clause and, 7 UPPER function, 97, 102, 141, 237 USE command described, 6, 25, 35 INSERT query and, 78 query syntax and, 21 USER function, 154 username(s). See also users character restrictions on, 211 configuration options and, 194 DROP TABLE command and, 52 MySQL monitor and, 18, 19 phpMyAdmin and, 223 privileges and, 212 specify, 18, 19, 207 view current, 20 users. See also root users; usernames configure, 22–23 storage of, in security tables, 214–215 V VARCHAR columns add, 56, 57 change definition of, 54 described, 44 indexes and, 50, 51, 59 table design and, 188 variable(s). See also specific variables display, 175, 186–187, 195–197 Perl and, 242 PHP and, 218 variable-length columns, 37, 44, 46, 188 variables command, 17, 174, 175, 198 Variables tab, 175, 185 version command, 174, 177 VERSION function, 154 vi (text editor), 160, 198 VIEW GRANTS command, 212–213 W wait_timeout variable, 195, 229 WEEK function, 148 WEEKDAY function, 148 WHERE clause combine conditions in, 111, 116–117 DELETE command and, 7 described, 76, 77, 114–115 division operator and, 109 improve performance with, 189 joins and, 110, 131 LIMIT clause and, 118–119 ORDER BY clause and, 121 Perl and, 255 PHP and, 236 row updates and, 102 SELECT command and, 7, 110, 111, 114, 128 select rows with, 89 specify rows with, 90, 92–94, 98, 100–101 string comparisons and, 142 UPDATE command and, 7, 96, 98, 100–107, 108, 109 6516922 Index.F 9/26/02 11:41 AM Page 289 290 INDEX WHERE keyword, 7 while loops, 230, 233, 240, 243, 253 wildcard characters asterisk (*), 7, 89, 124, 208, 243 count rows with, 124–125 dollar sign ($), 243 percent sign (%), 34, 40, 114, 142, 152, 208 PHP and, 224 question mark (?), 243 security and, 208 underscore (_), 33, 34, 40, 114, 142 WHERE clause and, 114–115 Windows (Microsoft) administration utilities, 175 backups and, 157, 171 configuration files, 194, 199 DB2 and, 5 display current values for variables with, 195 EDIT command and, 26–27 install MySQL under, 8, 12, 14–15 install Perl under, 246–247 install server software on, 3, 4 log files, 200 myisamchk and, 190 MySQLGUI and, 28 Oracle and, 5 PHP for, 221 service management features, 174, 180 start MySQL server under, 16, 174, 180–181 -style line breaks, 163 text files and, 163 usernames, 22 WinMySQLadmin, 15, 16, 175, 181, 184–185, 199 Winsock standard, 14, 181 WinZIP,28 WRITE locks, 204–205 X XML (eXtensible Markup Language), 5 Y YEAR column type, 45 YEAR function, 148, 150 YEAR_MONTH keyword, 149 YEARWEEK function, 148 Z ZEROFILL attribute, 42, 43 .zip files, 8, 14, 28, 221, 222 6516922 Index.F 9/26/02 11:41 AM Page 290 . Index.F 9/26/02 11:41 AM Page 288 289 MYSQL: Your visual blueprint to open source database management time. See also dates add/subtract, 153 convert, 151 formats, 149–152 functions, 148–149 TIME. 287 MYSQL: Your visual blueprint to open source database management RAND function, 121, 134 random numbers, described,. also Apache Web server; MySQL server described, 3, 259 list all databases on, 34 programming languages and, 3 reconnection attempts, 25 software for, 3, 16–17 status information, 17 storage of

Ngày đăng: 03/07/2014, 01:20

Từ khóa liên quan

Mục lục

  • MySQL ™ Your visual blueprint ™ to open source database management

    • HOW TO USE THIS BOOK

    • 1) INTRODUCING MYSQL

      • UNDERSTANDING MYSQL

      • MYSQL TERMINOLOGY

      • OTHER DATABASE SYSTEMS

      • STRUCTURED QUERY LANGUAGE (SQL)

      • DOWNLOAD MYSQL

      • INSTALL MYSQL UNDER LINUX FROM A PACKAGE

      • INSTALL MYSQL UNDER UNIX FROM SOURCE

      • INSTALL MYSQL UNDER WINDOWS

      • START THE MYSQL SERVER

      • TEST THE MYSQL INSTALLATION

      • USING THE MYSQL MONITOR

      • VIEW THE SERVER STATUS

      • TRY AN SQL QUERY

      • CONFIGURE A MYSQL USER

      • SPECIFY A MULTIPLE- LINE QUERY

      • EDIT A LONG COMMAND

      • CONFIGURE MYSQLGUI

      • 2) MANAGE DATABASES AND TABLES

        • DESIGN A DATABASE

        • CREATE AND DROP DATABASES

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan