MySQL Developer's SQL Guide cover

MySQL Developer's SQL Guide

Rating 3.9
Chapters
1
Series
A Comprehensive Tutorial and Reference for MySQL Developers
ISBN
9787111227083

Tags

Summary

This book is a SQL tutorial and reference manual for MySQL developers by the Dutch database expert Rick F. van der Lans, translated from the 2007 Addison-Wesley English edition SQL for MySQL Developers: A Comprehensive Tutorial and Reference and published by China Machine Press in its Hua Zhang Programmer's Library series. The book runs throughout on the author's long-used sample database of a tennis club (with tables for players, teams, matches, penalties, and so on). It first introduces the relational model, the SQL standard, and the development of MySQL, then proceeds through four levels: querying and updating data, creating database objects, procedural database objects, and SQL programming. The query section begins with literals, expressions, scalar functions, NULL, and CASE expressions, then analyzes the SELECT statement clause by clause—FROM, WHERE, SELECT and aggregate functions, GROUP BY, HAVING, ORDER BY, and LIMIT—and extends to combining table expressions, user variables, the HANDLER statement, and subqueries. The update section covers loading and unloading data with INSERT, UPDATE, DELETE, and LOAD DATA, as well as handling XML documents. The database-and-table-creation section explains columns and data types, integrity constraints such as primary and foreign keys, character sets and collations, the ENUM and SET types, indexes, views, creating databases, users and privilege security, table-maintenance statements, and metadata queries with SHOW, DESCRIBE, and HELP. Part Four discusses stored procedures, stored functions, triggers, and events; Part Five introduces embedding SQL in PHP, prepared statements and dynamic SQL, and multi-user concurrency issues such as transactions, locking, rollback, and isolation levels. Each chapter includes exercises with answers, and the book ends with appendices on SQL syntax, scalar functions, and system variables for quick reference.

Editor's review

市面上讲MySQL的书大致分两类:一类讲服务器运维与InnoDB内核,一类讲SQL语法。本书属于后者,而且是把SQL当作一门语言系统地讲透的那种。 作者范德兰斯曾是荷兰ISO委员会负责SQL标准的成员,其代表作《Introduction to SQL》被多所大学采用二十余年。本书沿用了那本书经过反复打磨的结构:一个贯穿全书的网球俱乐部示例库、按SELECT各子句逐一拆解、每章配习题并附答案。所以它读起来不像手册那样零散,而是有清晰的递进路径——先会查,再会改,然后会建,最后会用存储过程和事务。 对中文读者而言,它的价值还在于“MySQL方言味”很足:字符集与校对规则、ENUM与SET类型、HANDLER语句、LOAD DATA、SHOW/DESCRIBE/HELP、用户变量、预处理语句这些MySQL特有或易被忽略的内容都单独成章,而不是只照着SQL标准泛泛而谈。 需要提醒的是,原书基于MySQL 5.0/5.1时代,窗口函数、CTE、JSON类型等新特性全无涉及,示例中的PHP也是mysqli时代写法。作为SQL基本功的教材与案头参考它依然扎实,但涉及新版本特性时需要配合官方手册阅读。

Who it's for

A good fit for

  • 已经会用MySQL写简单查询、想把SQL系统补齐的后端开发者
  • 需要设计表结构、约束与索引的应用开发人员
  • 从其他数据库(Oracle、SQL Server)迁移到MySQL的技术人员
  • 数据库课程的学习者,书中习题可作为课后练习素材

Not a good fit for

  • 零基础、尚未接触过任何数据库概念的完全新手
  • 专门研究InnoDB存储引擎内核与性能调优的DBA
  • 只想找MySQL 8.0新特性(窗口函数、CTE、JSON)速查手册的读者

Reading tips

  1. 先按书中步骤装好MySQL并导入网球俱乐部示例库,边读边在命令行里跑示例,比只看书有效得多。
  2. 第5至13章按SELECT子句分章,可先通读一遍建立框架,之后把这几章当语法字典随手回查。
  3. 每章末的习题务必动手做,尤其GROUP BY、HAVING与子查询部分,是SQL思维的分水岭。
  4. 读到存储过程与事务章节时,配合MySQL官方手册对照当前版本的语法差异,避免照抄5.0时代写法。

About the publisher

China Machine Press China · Founded in 1950

In addition to science and technology and professional publishing, the books in our catalog from China Machine Press also reflect a sustained focus on psychology, computing, management, finance and economics, and social sciences. In psychology, the catalog includes works by C. G. Jung and introductions to analytical psychology, as well as applied topics such as stress and health, and addiction and healing. In computing, it features Structure and Interpretation of Computer Programs (JavaScript Edition). Management and finance titles include Administrative Behavior (4th Edition), The Price of Inequality (Collector's Edition), and This Time Is Different: Eight Centuries of Financial Folly (Commemorative Edition). In the philosophy and history of science, there is The Worldview: The Third Edition. Relevant authors include C. G. Jung, William McGuire, Sonu Shamdasani, and Gabor Maté. Public information is limited; the above summarizes the publisher's profile based solely on the books in our catalog.

Contents

  1. Hua Zhang Programmer's Library

FAQ

这本书是针对哪个MySQL版本写的?
原书英文版出版于2007年,内容基于MySQL 5.0/5.1时期,正文中涉及MySQL 5.0的新特性。因此窗口函数、CTE、JSON类型、角色管理等MySQL 8.0特性本书没有涉及,学习时需搭配官方手册补充。
书里的“网球俱乐部”数据库要另外下载吗?
网球俱乐部是作者为教学设计的示例库,原书配套网站提供建表与插入数据的SQL脚本,中文版读者可根据书中第2章的说明自行构建,或按章节给出的表结构手工建库。
零基础能直接读这本书吗?
不太建议。本书假定读者对数据库、表、行等基本概念已有了解,开篇几章节奏较快。完全零基础可先用一本入门书建立概念,再回到本书系统学SQL。
这本书和高性能MySQL有什么区别?
本书聚焦SQL语言的用法与MySQL方言特性,讲怎么写出正确的查询、建表和存储过程;《高性能MySQL》偏重架构、索引调优、复制与运维。两者定位不同,可配合使用。
书里的PHP示例现在还能用吗?
第35章的示例基于当时PHP 5的mysqli扩展写法,思路仍然适用,但具体API已较陈旧。现在更常见的是PDO或框架的查询构造器,阅读时重在学习SQL如何嵌入程序,而非照抄代码。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

Top rated in the same category