SQL for MySQL Developers and over one million other books are available for Amazon Kindle. Learn more


or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Sell Back Your Copy
For a $22.72 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
SQL for MySQL Developers: A Comprehensive Tutorial and Reference
 
 
Start reading SQL for MySQL Developers on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

SQL for MySQL Developers: A Comprehensive Tutorial and Reference [Paperback]

Rick F. van der Lans (Author)
3.9 out of 5 stars  See all reviews (7 customer reviews)

List Price: $54.99
Price: $45.38 & this item ships for FREE with Super Saver Shipping. Details
You Save: $9.61 (17%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Only 19 left in stock--order soon (more on the way).
Want it delivered Monday, January 30? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Kindle Edition $31.72  
Paperback $45.38  
Sell Back Your Copy for $22.72
Whether you buy it used on Amazon for $41.10 or somewhere else, you can sell it back through our Book Trade-In Program at the current price of $22.72.
Used Price$41.10
Trade-in Price$22.72
Price after
Trade-in
$18.38

Book Description

0131497359 978-0131497351 April 30, 2007 1

The Most Complete and Practical Guide to MySQL Version 5’s Powerful SQL Dialect

 

MySQL version 5 offers a SQL dialect with immense power. In SQL for MySQL Developers, Rick F. van der Lans helps you master this version ofSQL and take advantage of its full potential. Using case study examplesand hands-on exercises, van der Lans illuminates every key concept,technique, and statement–including advanced features that make iteasier to create even the most complex statements and programs.

 

Drawing on decades of experience as an SQL standards team member and enterprise consultant, he reveals exactly why MySQL’s dialect works as it does–and how to get the most out of it. You’ll gain powerful insight into everything from basic queries to stored procedures, transactions to data security.

 

Whether you’re a programmer, Web developer, analyst, DBA, or database user, this book can take you from “apprentice” to true SQL expert. If you’ve used SQL in older versions of MySQL, you’ll become dramatically more effective–and if you’re migrating from other database platforms, you’ll gain practical mastery fast.

 

Coverage includes

  • Writing queries, including joins, functions, and subqueries
  • Updating data
  • Creating tables, views, and other database objects
  • Specifying keys and other integrity constraints
  • Improving efficiency with indexes
  • Enforcing security via passwords and privileges
  • Embedding SQL statements within PHP programs
  • Building stored procedures and triggers
  • Using transactions, locking, rollback, and isolation levels
  • Utilizing MySQL’s catalog

All of the book’s sample programs are available for download from www.r20.nl.

 

About the Author

Rick F. van der Lans is author of the classic Introduction to SQL, the definitive SQL guide that database developers have relied on for more than 20 years. He is a consultant, author, and lecturer specializing in database technology, development tools, data warehousing, and XML. As managing director of the Netherlands-based R20/Consultancy, he has advised many large companies on defining their IT architectures. He chairs the European Meta Data Conference, and writes columns for several magazines.

 

Contents

About the Author  

Preface    

PART I Introduction    

CHAPTER 1 Introduction to MySQL    

CHAPTER 2 The Tennis Club Sample Database    

CHAPTER 3 Installing the Software    

CHAPTER 4 SQL in a Nutshell    

PART II Querying and Updating Data     

CHAPTER 5 SELECT Statement: Common Elements    

CHAPTER 6 SELECT Statements, Table Expressions, and Subqueries    

CHAPTER 7 SELECT Statement:The FROM Clause    

CHAPTER 8 SELECT Statement: The WHERE Clause    

CHAPTER 9 SELECT Statement: SELECT Clause and Aggregation Functions    

CHAPTER 10 SELECT Statement: The GROUP BY Clause    

CHAPTER 11 SELECT Statement: The HAVING Clause    

CHAPTER 12 SELECT Statement: The ORDER BY Clause    

CHAPTER 13 SELECT Statement: The LIMIT Clause    

CHAPTER 14 Combining Table Expressions    

CHAPTER 15 The User Variable and the SET Statement    

CHAPTER 16 The HANDLER Statement    

CHAPTER 17 Updating Tables    

CHAPTER 18 Loading and Unloading Data    

CHAPTER 19 Working with XML Documents    

PART III Creating Database Objects     

CHAPTER 20 Creating Tables    

CHAPTER 21 Specifying Integrity Constraints    

CHAPTER 22 Character Sets and Collations    

CHAPTER 23 The ENUM and SET Types    

CHAPTER 24 Changing and Dropping Tables    

CHAPTER 25 Using Indexes    

CHAPTER 26 Views    

CHAPTER 27 Creating Databases    

CHAPTER 28 Users and Data Security    

CHAPTER 29 Statements for Table Maintenance    

CHAPTER 30 The SHOW, DESCRIBE, and HELP Statements    

PART IV Procedural Database Objects     

CHAPTER 31 Stored Procedures    

CHAPTER 32 Stored Functions    

CHAPTER 33 Triggers    

CHAPTER 34 Events    

PART V Programming with SQL     

CHAPTER 35 MySQL and PHP    

CHAPTER 36 Dynamic SQL with Prepared Statement    

CHAPTER 37 Transactions and Multiuser Usage    

APPENDIX A Syntax of SQL    

APPENDIX B Scalar Functions    

APPENDIX C System Variables    

APPENDIX D Bibliography    

Index    



Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Customers buy this book with Database Systems: Design, Implementation, and Management $137.35

SQL for MySQL Developers: A Comprehensive Tutorial and Reference + Database Systems: Design, Implementation, and Management
Price For Both: $182.73

Show availability and shipping details

  • This item: SQL for MySQL Developers: A Comprehensive Tutorial and Reference

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Database Systems: Design, Implementation, and Management

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details



Editorial Reviews

About the Author

Rick F. van der Lans is author of the classic Introduction to SQL, the definitive SQL guide that database developers have relied on for more than 20 years. He is a consultant, author, and lecturer specializing in database technology, development tools, data warehousing, and XML. As managing director of the Netherlands-based R20/Consultancy, he has advised many large companies on defining their IT architectures. He chairs the European Meta Data Conference, and writes columns for several magazines.

Excerpt. © Reprinted by permission. All rights reserved.

SQL for MySQL Developers

SQL for MySQL Developers

Preface

Introduction

Many books have been written about MySQL, the best-known open source database server. Then why another book? Most books about MySQL discuss a wide variety of topics, such as the installation of MySQL, using MySQL from PHP, and security. As a result, each topic cannot be explained in detail, and many questions of readers cannot be answered. This book focuses on one aspect of MySQL: the language that drives MySQL, which is SQL (Structured Query Language). Every developer working with MySQL should master this language thoroughly.

Especially in the more recent versions, SQL has been extended considerably. Unfortunately, many developers still limit themselves to those features that were available in the first versions. Not all the features of MySQL are fully used, which means that the product is not employed in the best way possible. The result is that complex statements and programs must be built needlessly. When you buy a house, you also do not restrict yourself to 20 percent of the rooms, do you? That is why this book contains a complete and detailed description of the SQL dialect as implemented in MySQL version 5.0.18. It should be seen primarily as a textbook rather than as a reference book; it will teach you the language, and you can complete the exercises to test your knowledge. After reading this book, you should be familiar with all the statements and features and some idiosyncrasies of MySQL's SQL, and you should be able to use it efficiently and effectively.

Topics

This book is completely devoted to the SQL dialect as implemented in MySQL. It discusses every aspect of the language thoroughly and critically. These aspects of SQL among others, are covered:

  • Querying data (joins, functions, and subqueries)

  • Updating data

  • Creating tables and views

  • Specifying primary and foreign keys and other integrity constraints

  • Using indexes

  • Considering data security

  • Developing stored procedures and triggers

  • Developing programs with PHP

  • Working with transactions

  • Using the catalog

For Whom Is This Book Intended?

We recommend this book on MySQL's SQL dialect to those who want to use the full power of MySQL effectively and efficiently in practice. This book is therefore suitable for the following groups of people:

  • Developers who develop applications with the help of MySQL

  • Database managers who have to know the possibilities and impossibilities of SQL

  • Students in higher education, including those in technical colleges, polytechnics, universities, and sixth-form colleges

  • Designers, analysts, and consultants who have to deal, directly or indirectly, with MySQL and/or SQL and want to know about its possibilities and impossibilities

  • Home students who are interested in MySQL and/or SQL

  • Users who have the authority to use SQL to query the MySQL database of the company or institute for which they are working

  • Web site developers who are creating web sites with the help of MySQL and languages such as PHP and Python

  • IT hobbyists who are interested in MySQL and want to develop an SQL application using MySQL themselves

A Practical Book

This book should be seen primarily as a textbook and less as a reference work. To this end, it contains many examples and exercises (with answers). Do not ignore the exercises. Experience shows that you will learn the language more thoroughly and more quickly by practicing often and doing many exercises.

The Book's Web Site

When you leaf through the book, you will come across numerous SQL statements. Sometimes these are examples, and sometimes they are answers to questions. After you have installed MySQL, you can run through these statements to see whether they work and see their effects. You could type in all the statements again like a real Spartan, but you can also make life easy for yourself by downloading all the statements from the Internet. A special web site for this book, http://www.r20.nl, includes all the SQL statements.

We also have used the web site for these purposes:

  • The web site includes an installation process and instructions for MySQL. You will find useful tips for installing MySQL under Windows. The site also explains the installation process of the example database.

  • If an error is found in the book, the web site will rectify the mistake.

  • Reader comments that could be of interest to others will be added periodically to site.

  • We even will consider making additional chapters available on the web site in the future.

Therefore, keep an eye on this web site.

Prerequisite Knowledge

Some general knowledge of programming languages and database servers is required.

The History of This Book

It was 1984, and the database world was under the spell of a revolution. SQL had started its triumphal procession. Vendors such as IBM and Oracle had introduced the commercial versions of their SQL database servers, and the marketing machine went at full speed. The market reacted positively to this rise of first-generation SQL database servers. Many organizations decided to buy such a database server and gradually phase out their existing products.

My employer at that time had decided to get involved in this tumult as well. The company also wanted to make money with this new database language, and the plan was to start organizing SQL courses. Because of my background knowledge, I was charged with this task. That SQL would become such a success and that my agreement to present the courses would have far- reaching consequences (personally as well as professionally) never entered my mind.

After studying SQL closely, I started to develop the material for the course. After teaching SQL for two years with great pleasure, I got an idea to write a book about SQL. It would have to be a book completely dedicated to this language, with its many possibilities and idiosyncrasies.

After producing gallons of blood, sweat, and tears, I completed the first Dutch edition in 1986, entitled Het SQL Leerboek. The book did not focus on a specific SQL database server, but on the SQL standard. Barely before the book was published, I was asked to write an English version. That book, Introduction to SQL, was published in 1987 as the first English book completely devoted to SQL. After that, I wrote versions in German and Italian. Obviously, a need existed for information about SQL. Everyone wanted to learn about SQL, but not much information was available.

Because SQL was still young, development went fast. Statements were added, extended, and improved. New implementations became available, new application areas were discovered, and new versions of the SQL standard appeared. Soon a new edition of the book had to be written. And more was to come. And this will not be the last because SQL has gloriously won the revolution in the database world, and no competition is in sight on the horizon.

Through the years, many vendors have implemented SQL. At first, all these products had much in common, but slowly the number of differences increased. For that reason, I decided in 2003 to write a book specifically dedicated to the SQL dialect of MySQL. I thought it would be a piece of cake. I would use Introduction to SQL as an example, add some details of MySQL, and remove a few general aspects. How long could that take? Two weeks of hard work and some speed typing, and I'd have the book ready. However, that appeared to be a serious underestimation. To give a complete view of all the features, I had to dive deeply into the SQL dialect of MySQL. This book, which definitely took more...


Product Details

  • Paperback: 1032 pages
  • Publisher: Addison-Wesley Professional; 1 edition (April 30, 2007)
  • Language: English
  • ISBN-10: 0131497359
  • ISBN-13: 978-0131497351
  • Product Dimensions: 9.2 x 7.1 x 1.9 inches
  • Shipping Weight: 3.2 pounds (View shipping rates and policies)
  • Average Customer Review: 3.9 out of 5 stars  See all reviews (7 customer reviews)
  • Amazon Best Sellers Rank: #327,406 in Books (See Top 100 in Books)

More About the Author

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

 

Customer Reviews

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

12 of 12 people found the following review helpful:
5.0 out of 5 stars Excellent translated guide to MySQL, June 3, 2007
This review is from: SQL for MySQL Developers: A Comprehensive Tutorial and Reference (Paperback)
Over the last 5 years, I would say I've at least read every book available on MySQL and bought my fair share.

This book is by far the best one available on some of the advanced features of MySQL. It's better than even the Bible and Cookbook series on things like stored procedures, even though it spends too much time on the basics. I loved the large text, but wish there had been more meat on stored procedures, triggers and events (which is why I picked it up to begin with). There are insider knowledge gems sprinkled throughout that will definitely add spice to your SQL, so it's worth a look.

I don't know why even in 2007 authors insist on repeating the MySQL documentation,--it's a MASSIVE amount of wasted space, since anyone using this stuff will be familiar with the online documentation and helpful user commentary. There were a few typos, but that's pretty par for the course. The section on PHP, though, was pretty useless and not particularly good code-wise (in my humble opinion).

One day someone will put out a really advanced cookbook, that doesn't waste space explaining super simple things like "select * from table," but until then it's a great resource. If you can get it at a discount, like on a Borders reward coupon (which they give out like candy) grab it. Clearly, the Europeans still have something to teach us about MySQL! :o))
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


8 of 9 people found the following review helpful:
5.0 out of 5 stars 9 chapters just on SELECT; wow!, May 6, 2007
This review is from: SQL for MySQL Developers: A Comprehensive Tutorial and Reference (Paperback)
Van der Lans offers an impressively thorough education in MySQL 5. It is remarkable how much capability is offered for free in the open source MySQL. The book can also be used to learn generic SQL from scratch. Some early chapters give a quick recap, that should be understandable to an experienced programmer, who does not know SQL. If this describes you, the biggest adjustment to learning it might be its declarative nature, as opposed to the procedural ethos of most programming languages.

One striking feature of the book is the extensive explanation of SELECT. This is the key statement of SQL, and you need to be facile with it. Nine [sic] chapters are devoted to SELECT. Gives you some idea of both the power and complexity of the command. Rarely do other SQL books allocate so much space to a rendition of SELECT. Often, they teach you the basic modes of using it, and then you are left on your own. (Gee, thanks!) Whereas here, for example, an entire chapter is about the SELECT HAVING clause, and another chapter is on the SELECT LIMIT clause. Across these nine chapters are enough worked examples that you can fruitfully mine.

Later chapters delve into more specialised aspects of SQL. Sure, these are all significant. But maybe the most useful is the idea of stored procedures and functions. Vital to optimising performance.

Lest this very mass of detail prove offputting, keep in mind the "Reference" in the book's title. You don't have to read it all at once. As you go thru it, you should develop an intuition of what can be safely relegated to a later reading, when you have specific need of those topics.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


1 of 1 people found the following review helpful:
4.0 out of 5 stars A usefull guide to SQL..., April 5, 2009
By 
Amazon Verified Purchase(What's this?)
This review is from: SQL for MySQL Developers: A Comprehensive Tutorial and Reference (Paperback)
I bought this product to help my process is learning SQL. There are a lot of bad (or horrible books) that explain SQL. I have bought quite a few of them so I was excited about this book...

I found this guide useful with the command syntax but there is not enough examples or explanations following the SQL commands...

That being said, this book is useful as a very good guide but not to teach the user SQL; to help out with the online SQL information and provide more information than some of the bad SQL books. In this respect the book does a decent job.

For the book I would give 3.5 stars but, I will round up to 4 stars for the Amazon rating...
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

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





Only search this product's reviews



What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

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

Your tags: Add your first tag
 

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
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums





Look for Similar Items by Category


Look for Similar Items by Subject