Available:*
Library | Item Barcode | Call Number | Material Type | Item Category 1 | Status |
---|---|---|---|---|---|
Searching... | 30000010088072 | QA7673.S67 F66 2005 | Open Access Book | Book | Searching... |
On Order
Summary
Summary
Many of the current MySQL titles are overkill for the many MySQL users who need to use MySQL but have no intention of becoming professional DBAs. This book teaches you what you really need to know, without getting bogged down by what you don't. MySQL Crash Course is a tutorial-based book, organized into a series of short, easy-to-follow lessons. Instead of dwelling of database theory and relational design, this book takes a very hands-on approach to solving the needs of the majority of SQL users who simply need to interact with data.The reader of this book will learn how to: Use the MySQL toolset Retrieve and sort data Filter data using comparisons, wildcards, and full text searching Use the aggregate functions to analyze data Perform insert, update, and delete operations Join relational tables using inner, outer, and self joins Combine queries using unions Use views Create, and modify tables, and access table schemas Create and use stored procedures, cursors, and other advanced database features Manage databases, users, and security privileges
Author Notes
Ben Forta is Macromedia Corporation's product evangelist for the ColdFusion product line. Ben has over 15 years of experience in the computer industry, and spent 6 years as part of the development team responsible for creating OnTime, one of the most successful calendar and group-scheduling products, with over one million users worldwide. Ben is the author of the popular ColdFusion Web Application Construction Kit, and its sequel Advanced ColdFusion 4 Application Development. His book Sams Teach Yourself SQL in 10 Minutes is one of the world's bestselling SQL books with over 100,000 copies sold.
Excerpts
Excerpts
Introduction MySQL has become one of the most popular database management systems in the world. From small development projects to some of the best-known and most prestigious sites on the Web, MySQL has proven itself to be a solid, reliable, fast, and trusted solution to all sorts of data storage needs. This book is based on my best-selling Sams Teach Yourself SQL in 10 Minutes . That book has become one of the most-used SQL tutorials in the world, with an emphasis on teaching what you really need to know--methodically, systematically, and simply. But as popular and as successful as that book is, it does have some limitations: In covering all of the major DBMSs, coverage of DBMS-specific features and functionality had to be kept to a minimum. To simplify the SQL taught, the lowest common denominator had to be found--SQL statements that would (as much as possible) work with all major DBMSs. This requirement necessitated that better DBMS-specific solutions not be covered. Although basic SQL tends to be rather portable between DBMSs, more advanced SQL most definitely is not. As such, that book could not cover advanced topics, such as triggers, cursors, stored procedures, access control, transactions, and more, in any real detail. And that is where this book comes in. MySQL Crash Course builds on the proven tutorials and structure of Sams Teach Yourself SQL in 10 Minutes , without getting bogged down with anything but MySQL. Starting with simple data retrieval and working on to more complex topics, including the use of joins, subqueries, regular expression and full text-based searches, stored procedures, cursors, triggers, table constraints, and much more. You'll learn what you need to know methodically, systematically, and simply--in highly focused chapters designed to make you immediately and effortlessly productive. So turn to Chapter 1, and get to work. You'll be taking advantage of all MySQL has to offer in no time at all. Who Is This Book For? This book is for you if You are new to SQL. You are just getting started with MySQL and want to hit the ground running. You want to quickly learn how to get the most out of MySQL. You want to learn how to use MySQL in your own application development. You want to be productive quickly and easily using MySQL without having to call someone for help. Companion Website This book has a companion website online at http://forta.com/books/0672327120/ . Visit the site to access Table creation and population scripts used to create the example tables used throughout this book Visit the online support forum Access online errata (should one be required) Find other books that may be of interest to you Conventions Used in This Book This book uses different typefaces to differentiate between code and regular English, and also to help you identify important concepts. Text that you type and text that should appear on your screen is presented in monospace type. It looks like this to mimic the way text looks on your screen. Placeholders for variables and expressions appear in monospace italic font. You should replace the placeholder with the specific value it represents. This arrow (¬) at the beginning of a line of code means that a single line of code is too long to fit on the printed page. Continue typing all the characters after the ¬ as though they were part of the preceding line. Note - A Note presents interesting pieces of information related to the surrounding discussion. Tip - A Tip offers advice or teaches an easier way to do something. Caution - A Caution advises you about potential problems and helps you steer clear of disaster. Note - A New Term box provide clear definitions of new, essential terms. /Input The Input icon identifies code that you can type in yourself. It usually appears next to a listing. /Output The Output icon highlights the output produced by running MySQL code. It usually appears after a listing. /Analysis The Analysis icon alerts you to the author's line-by-line analysis of input or output. (c) Copyright Pearson Education. All rights reserved. Excerpted from MySQL Crash Course by Ben Forta All rights reserved by the original copyright owners. Excerpts are provided for display purposes only and may not be reproduced, reprinted or distributed without the written permission of the publisher.Table of Contents
Introduction | p. 1 |
Who Is This Book For? | p. 2 |
Companion Website | p. 2 |
Conventions Used in This Book | p. 3 |
1 Understanding SQL | p. 5 |
Database Basics | p. 5 |
What Is SQL? | p. 11 |
Try It Yourself | p. 11 |
2 Introducing MySQL | p. 13 |
What Is MySQL? | p. 13 |
MySQL Tools | p. 16 |
3 Working with MySQL | p. 21 |
Making the Connection | p. 21 |
Selecting a Database | p. 22 |
Learning About Databases and Tables | p. 23 |
4 Retrieving Data | p. 27 |
The SELECT Statement | p. 27 |
Retrieving Individual Columns | p. 27 |
Retrieving Multiple Columns | p. 29 |
Retrieving All Columns | p. 31 |
Retrieving Distinct Rows | p. 31 |
Limiting Results | p. 33 |
Using Fully Qualified Table Names | p. 35 |
5 Sorting Retrieved Data | p. 37 |
Sorting Data | p. 37 |
Sorting by Multiple Columns | p. 39 |
Specifying Sort Direction | p. 40 |
6 Filtering Data | p. 45 |
Using the WHERE Clause | p. 45 |
The WHERE Clause Operators | p. 46 |
7 Advanced Data Filtering | p. 53 |
Combining WHERE Clauses | p. 53 |
Using the IN Operator | p. 57 |
Using the NOT Operator | p. 59 |
8 Using Wildcard Filtering | p. 61 |
Using the LIKE Operator | p. 61 |
Tips for Using Wildcards | p. 65 |
9 Searching Using Regular Expressions | p. 67 |
Understanding Regular Expressions | p. 67 |
Using MySQL Regular Expressions | p. 68 |
10 Creating Calculated Fields | p. 81 |
Understanding Calculated Fields | p. 81 |
Concatenating Fields | p. 82 |
Performing Mathematical Calculations | p. 86 |
11 Using Data Manipulation Functions | p. 89 |
Understanding Functions | p. 89 |
Using Functions | p. 90 |
12 Summarizing Data | p. 99 |
Using Aggregate Functions | p. 99 |
Aggregates on Distinct Values | p. 106 |
Combining Aggregate Functions | p. 108 |
13 Grouping Data | p. 111 |
Understanding Data Grouping | p. 111 |
Creating Groups | p. 112 |
Filtering Groups | p. 113 |
Grouping and Sorting | p. 116 |
SELECT Clause Ordering | p. 119 |
14 Working with Subqueries | p. 121 |
Understanding Subqueries | p. 121 |
Filtering by Subquery | p. 121 |
Using Subqueries As Calculated Fields | p. 126 |
15 Joining Tables | p. 131 |
Understanding Joins | p. 131 |
Creating a Join | p. 134 |
16 Creating Advanced Joins | p. 143 |
Using Table Aliases | p. 143 |
Using Different Join Types | p. 144 |
Using Joins with Aggregate Functions | p. 149 |
Using Joins and Join Conditions | p. 151 |
17 Combining Queries | p. 153 |
Understanding Combined Queries | p. 153 |
Creating Combined Queries | p. 154 |
18 Full-Text Searching | p. 161 |
Understanding Full-Text Searching | p. 161 |
Using Full-Text Searching | p. 163 |
19 Inserting Data | p. 177 |
Understanding Data Insertion | p. 177 |
Inserting Complete Rows | p. 177 |
Inserting Multiple Rows | p. 181 |
Inserting Retrieved Data | p. 183 |
20 Updating and Deleting Data | p. 187 |
Updating Data | p. 187 |
Deleting Data | p. 189 |
Guidelines for Updating and Deleting Data | p. 190 |
21 Creating and Manipulating Tables | p. 193 |
Creating Tables | p. 193 |
Updating Tables | p. 203 |
Deleting Tables | p. 205 |
Renaming Tables | p. 205 |
22 Using Views | p. 207 |
Understanding Views | p. 207 |
Using Views | p. 210 |
23 Working with Stored Procedures | p. 217 |
Understanding Stored Procedures | p. 217 |
Why Use Stored Procedures | p. 218 |
Using Stored Procedures | p. 219 |
24 Using Cursors | p. 231 |
Understanding Cursors | p. 231 |
Working with Cursors | p. 232 |
25 Using Triggers | p. 241 |
Understanding Triggers | p. 241 |
Creating Triggers | p. 242 |
Dropping Triggers | p. 243 |
Using Triggers | p. 244 |
26 Managing Transaction Processing | p. 249 |
Understanding Transaction Processing | p. 249 |
Controlling Transactions | p. 252 |
27 Globalization and Localization | p. 257 |
Understanding Character Sets and Collation Sequences | p. 257 |
Working with Character Set and Collation Sequences | p. 258 |
28 Managing Security | p. 263 |
Understanding Access Control | p. 263 |
Managing Users | p. 264 |
29 Database Maintenance | p. 273 |
Backing Up Data | p. 273 |
Performing Database Maintenance | p. 274 |
Diagnosing Startup Problems | p. 275 |
Review Log Files | p. 275 |
30 Improving Performance | p. 277 |
Improving Performance | p. 277 |
A Getting Started with MySQL | p. 281 |
What You'll Need | p. 281 |
Obtaining the Software | p. 282 |
Installing the Software | p. 282 |
Preparing for Your Chapters | p. 283 |
B The Example Tables | p. 285 |
Understanding the Sample Tables | p. 285 |
Creating the Sample Tables | p. 290 |
C MySQL Statement Syntax | p. 293 |
ALTER TABLE | p. 293 |
COMMIT | p. 294 |
CREATE INDEX | p. 294 |
CREATE PROCEDURE | p. 294 |
CREATE TABLE | p. 294 |
CREATE USER | p. 295 |
CREATE VIEW | p. 295 |
DELETE | p. 295 |
DROP | p. 295 |
INSERT | p. 296 |
INSERT SELECT | p. 296 |
ROLLBACK | p. 296 |
SAVEPOINT | p. 296 |
SELECT | p. 297 |
START TRANSACTION | p. 297 |
UPDATE | p. 297 |
D MySQL Datatypes | p. 299 |
String Datatypes | p. 300 |
Numeric Datatypes | p. 301 |
Date and Time Datatypes | p. 303 |
Binary Datatypes | p. 304 |
E MySQL Reserved Words | p. 305 |
Index | p. 309 |