Amazon.com Customer Reviews
Great MySQL Recipes also useful to users of other brands of SQL - Review written on January 03, 2007
Rating: 5 out of 5
8 customers found this review helpful.
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.
Excellent All-Around Guide To MySQL Programming - Review written on April 06, 2004
Rating: 5 out of 5
21 customers found this review helpful, 3 did not.
I am an experienced web developer and recently started using Perl with MySQL to build database-driven CGI applications.
MySQL Cookbook by Paul DuBois turned out to be a valuable reference resource.
While the title mentions only MySQL, the book provides a great deal of solutions (and code) for using MySQL with Perl, PHP, Python and Java. If you are familiar with any of these computer languages, this book and MySQL manual is all you need to start building applications with MySQL-compatible database backend.
A Hand-on guide to MySQL - Review written on May 21, 2003
Rating: 4 out of 5
14 customers found this review helpful, 1 did not.
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.
WELL-DONE, OR RATHER, WELL-COOKED - Review written on January 30, 2003
Rating: 4 out of 5
12 customers found this review helpful.
In this "MySQL Cookbook", Paul DuBois ensured that a wide range of topics were covered. In fact, most Unix and Mac OS X users would cherish the contents of this text. Comprehensive information were presented in a very uncomplicated way. The book did advanced analysis of all MySQL-based scripts which are applicable to Java, Perl, Python and PHP. The same story goes for MySQL-based web scripts under Apache and Tomcat. It gave readers sufficient guidance to codes, using time-saving illustrative examples. However, beginners who need to start from the scratch may not appreciate this advanced approach.
In conclusion, this is a dependable text that both intermediate and advanced MySQL learners would appreciate.