• Complain

Paul DuBois - MySQL Cookbook

Here you can read online Paul DuBois - MySQL Cookbook full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2007, publisher: OReilly Media, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Paul DuBois MySQL Cookbook
  • Book:
    MySQL Cookbook
  • Author:
  • Publisher:
    OReilly Media
  • Genre:
  • Year:
    2007
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

MySQL Cookbook: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "MySQL Cookbook" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Along with MySQLs popularity has come a flood of questions about solving specific problems, and thats where this Cookbook is essential. Designed as a handy resource when you need quick solutions or techniques, the book offers dozens of short, focused pieces of code and hundreds of worked-out examples for programmers of all levels who dont have the time (or expertise) to solve MySQL problems from scratch.

The new edition covers MySQL 5.0 and its powerful new features, as well as the older but still widespread MySQL 4.1. One major emphasis of this book is how to use SQL to formulate queries for particular kinds of questions, using the mysql client program included in MySQL distributions. The other major emphasis is how to write programs that interact with the MySQL server through an API. Youll find plenty of examples using several language APIs in multiple scenarios and situations, including the use of Ruby to retrieve and format data. There are also many new examples for using Perl, PHP, Python, and Java as well.

Other recipes in the book teach you to:


  • Access data from multiple tables at the same time
  • Use SQL to select, sort, and summarize rows
  • Find matches or mismatches between rows in two tables
  • Determine intervals between dates or times, including age calculations
  • Store images into MySQL and retrieve them for display in web pages
  • Get LOAD DATA to read your data files properly or find which values in the file are invalid
  • Use strict mode to prevent entry of bad data into your database
  • Copy a table or a database to another server
  • Generate sequence numbers to use as unique row identifiers
  • Create database events that execute according to a schedule
  • And a lot more

MySQL Cookbook doesnt attempt to develop full-fledged, complex applications. Instead, its intended to assist you in developing applications yourself by helping you get past problems that have you stumped.

Paul DuBois: author's other books


Who wrote MySQL Cookbook? Find out the surname, the name of the author of the book and a list of all author's works by series.

MySQL Cookbook — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "MySQL Cookbook" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
MySQL Cookbook
Paul DuBois
Published by OReilly Media

Beijing Cambridge Farnham Kln Sebastopol Tokyo A Note Regarding Supplemental - photo 1

Beijing Cambridge Farnham Kln Sebastopol Tokyo

A Note Regarding Supplemental Files

Supplemental files and examples for this book can be found at http://examples.oreilly.com/9780596527082/. Please use a standard desktop web browser to access these files, as they may not be accessible from all ereader devices.

All code files or examples referenced in the book will be available online. For physical books that ship with an accompanying disc, whenever possible, weve posted all CD/DVD content. Note that while we provide as much of the media content as we are able via free download, we are sometimes limited by licensing restrictions. Please direct any questions or concerns to .

Preface

The MySQL database management system has gained a large following in recent years. This has been true especially in the Linux and open source communities, but MySQL has an increasing foothold in the commercial sector as well. MySQL is well liked for several reasons: its fast, and its easy to set up, use, and administer. MySQL runs under many varieties of Unix and Windows, and MySQL-based programs can be written in many languages. Historically, MySQL has been especially popular for constructing database-backed web sites that involve dynamic content generation. Moreover, with the introduction of features in MySQL 5.0 such as views, triggers, and stored procedures and functions, the penetration of MySQL into other areas of application development is on the upswing.

With MySQLs popularity comes the need to address the questions posed by its users about how to solve specific problems. That is the purpose of MySQL Cookbook . Its designed to serve as a handy resource to which you can turn when you need quick solutions or techniques for attacking particular types of questions that come up when you use MySQL. Naturally, because its a cookbook, it contains recipes: straightforward instructions you can follow rather than develop your own code from scratch. Its written using a problem-and-solution format designed to be extremely practical and to make the contents easy to read and assimilate. It contains many short sections, each describing how to write a query, apply a technique, or develop a script to solve a problem of limited and specific scope. This book doesnt attempt to develop full-fledged, complex applications. Instead, its intended to assist you in developing such applications yourself by helping you get past problems that have you stumped.

For example, a common question is, How can I deal with quotes and special characters in data values when Im writing queries? Thats not difficult, but figuring out how to do it is frustrating when youre not sure where to start. This book demonstrates what to do; it shows you where to begin and how to proceed from there. This knowledge will serve you repeatedly, because after you see whats involved, youll be able to apply the technique to any kind of data, such as text, images, sound or video clips, news articles, compressed files, or PDF documents. Another common question is, Can I access data from multiple tables at the same time? The answer is Yes, and its easy to do because its just a matter of knowing the proper SQL syntax. But its not always clear how until you see examples, which this book gives you. Other things that youll learn from this book include:

  • How to use SQL to select, sort, and summarize rows.

  • How to find matches or mismatches between rows in two tables.

  • How to perform a transaction.

  • How to determine intervals between dates or times, including age calculations.

  • How to identify or remove duplicate rows.

  • How to store images into MySQL and retrieve them for display in web pages.

  • How to get LOADDATA to read your datafiles properly or find which values in the file are invalid.

  • How to use strict mode to prevent entry of bad data into your database.

  • How to copy a table or a database to another server.

  • How to generate sequence numbers to use as unique row identifiers.

  • How to write stored procedures and functions.

  • How to use a view as a virtual table.

  • How to set up triggers that activate to perform specific data-handling operations when you insert or update table rows.

  • How to create database events that execute according to a schedule.

One part of knowing how to use MySQL is understanding how to communicate with the serverthat is, how to use SQL, the language through which queries are formulated. Therefore, one major emphasis of this book is on using SQL to formulate queries that answer particular kinds of questions. One helpful tool for learning and using SQL is the mysql client program that is included in MySQL distributions. By using this client interactively, you can send SQL statements to the server and see the results. This is extremely useful because it provides a direct interface to SQL. The mysql client is so useful, in fact, that the entire first chapter is devoted to it.

But the ability to issue SQL queries alone is not enough. Information extracted from a database often needs to be processed further or presented in a particular way to be useful. What if you have queries with complex interrelationships, such as when you need to use the results of one query as the basis for others? Or what if you need to generate a specialized report with very specific formatting requirements? These problems bring us to the other major emphasis of the bookhow to write programs that interact with the MySQL server through an application programming interface (API). When you know how to use MySQL from within the context of a programming language, you gain the ability to exploit MySQLs capabilities in the following ways:

  • You can remember the result from a query and use it at a later time.

  • You have full access to the expressive power of a general-purpose programming language. This enables you to make decisions based on success or failure of a query, or on the content of the rows that are returned, and then tailor the actions taken accordingly.

  • You can format and display query results however you like. If youre writing a command-line script, you can generate plain text. If its a web-based script, you can generate an HTML table. If its an application that extracts information for transfer to some other system, you might generate a datafile expressed in XML.

When you combine SQL with a general purpose programming language, you have an extremely flexible framework for issuing queries and processing their results. Programming languages increase your capabilities by giving you a great deal of additional power to perform complex database operations. This doesnt mean this book is complicated, though. It keeps things simple, showing how to construct small building blocks by using techniques that are easy to understand and easily mastered.

Ill leave it to you to combine these techniques in your own programs, which you can do to produce arbitrarily complex applications. After all, the genetic code is based on only four nucleic acids, but these basic elements have been combined to produce the astonishing array of biological life we see all around us. Similarly, there are only 12 notes in the scale, but in the hands of skilled composers, they can be interwoven to produce a rich and endless variety of music. In the same way, when you take a set of simple recipes, add your imagination, and apply them to the database programming problems you want to solve, you can produce applications that perhaps are not works of art, but are certainly useful and will help you and others be more productive.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «MySQL Cookbook»

Look at similar books to MySQL Cookbook. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «MySQL Cookbook»

Discussion, reviews of the book MySQL Cookbook and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.