34 used & new from $1.99

Have one to sell? Sell yours here
 
 
MySQL Cookbook
 
 
Tell the Publisher!
I’d like to read this book on Kindle

Don’t have a Kindle? Get your Kindle here.
 
  
4.7 out of 5 stars  See all reviews (28 customer reviews)


Available from these sellers.


11 new from $16.44 23 used from $1.99

Formats

Amazon Price New from Used from
  Paperback $31.49 $30.00 $20.18
  Paperback, November 2002 -- $16.44 $1.99
There is a newer edition of this item:
MySQL Cookbook MySQL Cookbook 4.7 out of 5 stars (28)
$31.49
In Stock.
What Do Customers Ultimately Buy After Viewing This Item?

Customers Who Bought This Item Also Bought

MySQL (4th Edition)

MySQL (4th Edition)

by Paul DuBois
4.6 out of 5 stars (117)  $31.49
MySQL Stored Procedure Programming

MySQL Stored Procedure Programming

by Guy Harrison
4.5 out of 5 stars (11)  $29.69
PHP Cookbook

PHP Cookbook

by David Sklar
4.5 out of 5 stars (40)  $29.69
High Performance MySQL: Optimization, Backups, Replication, and More

High Performance MySQL: Optimization, Backups, Replication, and More

by Arjen Lentz
4.6 out of 5 stars (19)  $31.49
Learning MySQL

Learning MySQL

by Seyed M.M. (Saied) Tahaghoghi
4.2 out of 5 stars (12)  $29.69
Explore similar items

Editorial Reviews

Amazon.com Review

Good programming--which is to say, programming that yields both efficient code and a profitable life for the programmer--depends on not reinventing the wheel. If someone else has solved the problem you're facing (and someone almost always has), you'd be foolish to waste your energy figuring out your own solution. MySQL Cookbook presents solutions to scores of problems related to the MySQL database server. Readers stand a good chance of finding a ready-made solution to problems such as querying databases, validating and formatting data, importing and exporting values, and using advanced features like session tracking and transactions. Paul DuBois has done a great job assembling efficient solutions to common database programming problems, and teaches his readers a lot about MySQL and its attendant APIs in the process.

DuBois organizes his cookbook's recipes into sections on the problem, the solution stated simply, and the solution implemented in code and discussed. The implementation and discussion sections are the most valuable, as they contain the command sequences, code listings, and design explanations that can be transferred to outside projects. The main gripe readers will have about MySQL Cookbook is that the author, in his effort to cover the range of MySQL-friendly programming languages, uses different languages in his solutions to various problems. You'll see a Perl solution to one programming challenge (Perl, in fact, is the most frequently used language, followed by PHP), a Python fix for the next, and a Java sample after that. Readers have to hope that they find a solution in the language they're working with, or that they're able to transliterate the one DuBois has provided. It's usually not a big problem. --David Wall

Topics covered: How to make MySQL databases do your bidding--in terms of queries, table manipulation, data formatting, transactions, and Web interfaces--through the database server's command line interfaces and (more importantly) through the MySQL APIs of Perl, PHP, Java, and Python. Particularly excellent coverage deals with formatting dates and times, management of null values, string manipulation, and import/export techniques.



Review

"...MySQL Cookbook tells you exactly how to solve literally hundreds of problems that you are likely to encounter in getting a MySQL database solution up and running." - Computer Trade Shopper, November 2003

Product Details

  • Paperback: 1022 pages
  • Publisher: O'Reilly Media; 1st edition (November 2002)
  • Language: English
  • ISBN-10: 0596001452
  • ISBN-13: 978-0596001452
  • Product Dimensions: 9.3 x 7 x 1.6 inches
  • Shipping Weight: 2.8 pounds
  • Average Customer Review: 4.7 out of 5 stars  See all reviews (28 customer reviews)
  • Amazon.com Sales Rank: #647,287 in Books (See Bestsellers in Books)

More About the Author

Paul Dubois
Discover books, learn about writers, read author blogs, and more.

Visit Amazon's Paul Dubois Page

Inside This Book (learn more)
Browse and search another edition of this book.


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

 

Customer Reviews

28 Reviews
5 star:
 (20)
4 star:
 (7)
3 star:
 (1)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.7 out of 5 stars (28 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
26 of 27 people found the following review helpful:
5.0 out of 5 stars The only MySQL book needed for programming my web sites, December 9, 2004
I built several web sites using PHP/MySQL and the only two books I use day-to-day are "MySQL Cookbook" and "PHP Cookbook".

If you're already somewhat familiar with MySQL, this book is a great reference for the SQL and database manipulation you already know how to do. In addition, the examples push the envelope of what is possible with MySQL making it a good learning tool for becoming truly expert.

Some of the information in the book I found useful includes:

- simplifying complex SQL using temporary tables.

- using FULLTEXT searches (similar to pattern matching but more efficient and easier to code when you're looking for the same text in several columns at the same time).

- effective use of LEFT JOIN's for finding rows in one table that don't have a match in another table.

- effective use of LAST_INSERT_ID( fieldName + 1 ) for transactionally updating a numeric field without using transactions and without locking a table.

- numbering output rows using SQL variables (select @rownum := @rownum + 1; (see chapter 13.9))

I really can't say enough good things about this book. It's comprehensive, easy to read and just plain awesome.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
15 of 16 people found the following review helpful:
4.0 out of 5 stars A Hand-on guide to MySQL, May 20, 2003
By A Customer
There are many databases out there. MySQL is one of the better ones. It's a free (for personal use) database system which can be easily integrated into a web application on virtually any system. It has supports most of the standard feature found in most database system and has quiet a few features unique to MySQL. This particular book is a good reference for the experienced user as well as for new comers and as an added bonus even covers MySQL 4.0.

This is book was my first introduction to O'Reilly's cookbook series. It provides solutions to some of the most common challenged faced by the particular subject being covered (in this case MySQL). I thoroughly enjoyed it and was quiet impressed with it. Too many technical books simply introduce the concept without relating it to real world applications.

This particular book introduces all of the most basic concepts of database manipulation (table creation, data insertion, data deletion, data update). As well as writing simple and advanced SQL statements to retrieve data. It approaches database design using 4 of the most popular languages (Perl, PHP, Python and Java). These are only a few of the many possible languages which can be used to manipulate a MySQL database.

MySQL cookbook touches on a variety of different topics which I don't have the space or time to cover in detail, but here is a list of them:

* Handeling duplicates
* MySQL on the Web
* Processing Web input with MySQL
* Using MySQL-based Web Session Management

One of my favorite topics covered in the book is the idea of storing binary data such as images within a database. Although not ideal for most cases (unless you need fast access to a vast array of images), just the idea of it has a certain kewlness effect.

Well, overall I give it 4 out of 5 stars. It needs to touch slightly more on the basic concepts of databases, and it can become the only book you'll ever need for MySQL.

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
9 of 9 people found the following review helpful:
5.0 out of 5 stars Great MySQL Recipes also useful to users of other brands of SQL, January 2, 2007
By calvinnme "Texan refugee" (Fredericksburg, Va) - See all my reviews
(TOP 10 REVIEWER)      
This review is from: MySQL Cookbook (Paperback)
This book should be useful for anybody who uses MySQL, ranging from individuals who want to use a database for personal projects such as a blog or Wiki, to professional database and web developers. The book should also appeal to people who do not now use MySQL, but would like to. For example, it should be useful if you want to learn about databases but realize that a "big" database system such as Oracle isn't the best choice as a learning tool. The following paragraphs summarize each chapter to give you an overview of the book's contents.

Chapter 1, Using the mysql Client Program, describes how to use the standard MySQL command-line client. In addition, the chapter discusses other ways to use mysql, such as how to number output lines or make long lines more readable, how to generate various output formats, and how to log mysql sessions.

Chapter 2, Writing MySQL-Based Programs, demonstrates the basic elements of MySQL programming: how to connect to the server, issue queries, retrieve the results, and handle errors. It also discusses how to handle special characters and NULL values in queries, how to write library files to encapsulate code for commonly used operations, and describes various ways to gather the parameters needed for making connections to the server.

Chapter 3, Selecting Data from Tables, covers several aspects of the SELECT statement, which is the primary vehicle for retrieving data from the MySQL server: specifying which columns and rows you want to retrieve, performing comparisons, dealing with NULL values, and selecting one section of a query result.

Chapter 4, Table Management, covers table cloning, copying results into other tables, using temporary tables, and checking or changing a table's storage engine.

Chapter 5, Working with Strings, describes how to deal with string data. It covers character sets and collations, string comparisons, dealing with case-sensitivity issues, pattern matching, breaking apart and combining strings, and performing FULLTEXT searches.

Chapter 6, Working with Dates and Times, shows how to work with temporal data. It describes MySQL's date format and how to display date values in other formats. It also covers how to use MySQL's special TIMESTAMP data type, how to set the time zone, conversion between different temporal units, how to perform date arithmetic to compute intervals or generate one date from another, and leap-year calculations.

Chapter 7, Sorting Query Results, describes how to put the rows of a query result in the order you want. This includes specifying the sort direction, dealing with NULL values, accounting for string case sensitivity, and sorting by dates or partial column values. It also provides examples that show how to sort special kinds of values, such as domain names, IP numbers, and ENUM values.

Chapter 8, Generating Summaries, shows techniques that are useful for assessing the general characteristics of a set of data, such as how many values it contains or what its minimum, maximum, or average values are.

Chapter 9, Obtaining and Using Metadata, discusses how to get information about the data that a query returns, such as the number of rows or columns in the result, or the name and type of each column. It also shows how to ask MySQL what databases and tables are available or find out about the structure of a table and its columns.

Chapter 10, Importing and Exporting Data, describes how to transfer information between MySQL and other programs.

Chapter 11, Generating and Using Sequences, discusses AUTO_INCREMENT columns, MySQL's mechanism for producing sequence numbers. It shows how to generate new sequence values or determine the most recent value, how to resequence a column, how to begin a sequence at a given value, and how to set up a table so that it can maintain multiple sequences at once. It also shows how to use AUTO_INCREMENT values to maintain a master-detail relationship between tables, including some of the pitfalls to avoid.

Chapter 12, Using Multiple Tables, shows how to perform joins, which are operations that combine rows in one table with those from another. It demonstrates how to compare tables to find matches or mismatches, produce master-detail lists and summaries, enumerate many-to-many relationships, and update or delete rows in one table based on the contents of another.

Chapter 13, Statistical Techniques, illustrates how to produce descriptive statistics, frequency distributions, regressions, and correlations. It also covers how to randomize a set of rows or pick a row at random from the set.

Chapter 14, Handling Duplicates, discusses how to identify, count, and remove duplicate rows--and how to prevent them from occurring in the first place.

Chapter 15, Performing Transactions, shows how to handle multiple SQL statements that must execute together as a unit. It discusses how to control MySQL's auto-commit mode, and how to commit or roll back transactions, and demonstrates some workarounds you can use for non-transactional storage engines.

Chapter 16, Using Stored Routines, Triggers, and Events, describes how to write stored functions and procedures that are stored on the server side, triggers that activate when tables are modified, and events that execute on a scheduled basis.

Chapter 17, Introduction to MySQL on the Web, gets you set up to write web-based MySQL scripts. Web programming enables you to generate dynamic pages from database content or collect information for storage in your database. The chapter discusses how to configure Apache to run Perl, Ruby, PHP, and Python scripts, and how to configure Tomcat to run Java scripts written using JSP notation. It also provides an overview of the Java Standard Tag Library (JSTL) that is used heavily for JSP pages in the following chapters.

Chapter 18, Incorporating Query Results in Web Pages, shows how to use the results of queries to produce various types of HTML structures, such as paragraphs, lists, tables, hyperlinks, and navigation indexes. It also describes how to store images into MySQL, and retrieve and display them later, and how to send a downloadable result set to a browser. The chapter also includes a section that demonstrates how to use a template package to generate web pages.

Chapter 19, Processing Web Input with MySQL, discusses how to obtain input from users over the Web and use it to create new database rows or as the basis for performing searches. It deals heavily with form processing, including how to construct form elements, such as radio buttons, pop-up menus, or checkboxes, based on information contained in your database.

Chapter 20, Using MySQL-Based Web Session Management, describes how to write web applications that remember information across multiple requests, using MySQL for backing store.

Appendix A, Obtaining MySQL Software, indicates where to get the source code for the examples shown in this book, and where to get the software you need to use MySQL and write your own database programs.

Appendix B, Executing Commands from the Command Line, provides background on executing commands at the command prompt and how to set environment variables such as PATH.

Appendix C, JSP and Tomcat Primer, provides a general overview of JSP and installation instructions for the Tomcat web server.

Appendix D, References, lists sources of information that provide additional information about topics covered in this book. It also lists some books that provide introductory background for the programming languages used here.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
Ad
 
Most Recent Customer Reviews

5.0 out of 5 stars My son the computer tech was right--once again.
I need to learn about MySQL for my small business. My son the computer tech said this was the book I needed to get me up to speed quickly. He was right. Read more
Published 3 months ago by Don K.

4.0 out of 5 stars Quickstart to MySQL Development

I really enjoy cookbooks because of their no nonsense organization. This MySQL book exactly fits that description. Read more
Published 12 months ago by Sean P. Hull

5.0 out of 5 stars Teasure Trove of MySQL Recipes
At 900+ pages this book addresses a lot of common SQL tasks. And that's what a good cookbook should do. Read more
Published 13 months ago by Larry

5.0 out of 5 stars excellent resource
This book is
-a great resource for those looking to implement various mysql functions
-a great resource for database programmers
-a trove of information on... Read more
Published 19 months ago by Prego

4.0 out of 5 stars True to the Title
As indicated, this book is true to its title. It is a cookbook, by which I mean it contains a great number of (generally useful) recipes of varying complexity, but lacks detail... Read more
Published 20 months ago by Conrad Shultz

5.0 out of 5 stars Useful book
This book is useful for anyone looking to find examples of MySQL 4 usage in multiple languages such as PHP, Perl, Java, and Python. Read more
Published 22 months ago by you are not alone

5.0 out of 5 stars Excellent book
While I'm very familiar with working with relational databases, my MySQL skills are weak. This book was exactly what I needed while building a new web application that uses MySQL... Read more
Published 23 months ago by Ronald Cox

5.0 out of 5 stars For "anybody who uses MySQL"

Visuals
Good. Page numbers and section title can be found on the bottom of every page. Read more
Published 23 months ago by J. Pease

3.0 out of 5 stars Too much book, too much money.
If this was a quick reference book, then the information contained would be useful. This, unfortunately is a big book containing a little book's amount of useful info. Read more
Published on July 3, 2007 by B Smith

4.0 out of 5 stars MySQL help!
The MySQL Cookbook weighs in at over 940 pages and will help you find quick answers to everything from beginner-level basics up through dba and software developer tricks... Read more
Published on May 27, 2007 by Dave Walz-Burkett

Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   



So You'd Like to...

Create a guide

Product Information from the Amapedia Community

Beta (What's this?)


Look for Similar Items by Category


Look for Similar Items by Subject

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.



Your Recent History

 (What's this?)

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.