Издательство: | O'Reilly & Associates |
Дата выхода: | декабрь 2009 |
ISBN: | 0-596-00145-2 |
Объём: | 1022 страниц |
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 youre facing (and someone almost always has), youd 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 cookbooks 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. Youll 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 theyre working with, or that theyre able to transliterate the one DuBois has provided. Its 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 servers 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.