SQL Basics Tutorial (2nd Edition) cover

SQL Basics Tutorial (2nd Edition)

Rating 4.6
Word count
186K words
Chapters
11
Series
Turing Programming Series
ISBN
9787115455024

Tags

Summary

SQL Basics Tutorial (2nd Edition) is an introductory SQL book for beginners by MICK, a veteran Japanese database engineer. The Chinese edition was translated by Sun Miao and Luo Yong and published by Posts & Telecom Press as part of its Turing Programming Series. The book uses PostgreSQL as its main practice environment while explicitly noting syntax differences among major relational databases such as Oracle, MySQL, SQL Server, and DB2, helping readers build the overall understanding that "learning standard SQL lets you operate any RDBMS." The book has nine chapters plus an introductory chapter on setting up the learning environment: from installing PostgreSQL and configuring connections to executing SQL statements in the command line and graphical tools, it walks readers step by step through getting a working environment ready. The main text progresses from shallow to deep. Chapter 1 introduces basic concepts such as databases, tables, and DBMS, and the classification of SQL. Chapter 2 covers the SELECT statement, arithmetic and comparison operators, and logical operators. Chapter 3 covers aggregate functions, GROUP BY grouping, and ORDER BY sorting. Chapter 4 covers INSERT, DELETE, UPDATE, and transactions. Chapter 5 moves into views, subqueries, and correlated subqueries. Chapter 6 systematically covers various functions, predicates, and CASE expressions. Chapter 7 covers set operations such as UNION, INTERSECT, and EXCEPT, along with inner and outer joins. Chapter 8 covers window functions and advanced aggregation such as ROLLUP, CUBE, and GROUPING SETS. Chapter 9, new in the second edition, explains how applications connect to databases through drivers, demonstrating data retrieval and updates with Java connecting to PostgreSQL. A defining feature is the extensive use of diagrams to "draw out" execution order and the process of joining tables; key points are distilled into "rules" for easy reference, and each chapter ends with exercises with answers at the back, forming a complete teach-practice-check loop.

Editor's review

很多 SQL 入门书的问题是:语法讲得清楚,但读者看完仍不知道语句到底是怎么执行的。这本书恰好补上了这一块——它用上百张示意图把「FROM 先于 WHERE、WHERE 先于 SELECT」这类执行顺序、内外联结时两张表如何拼合、窗口函数的计算范围,一张张画出来,抽象概念因此变得可见。 第二版的升级方向也很务实:示例代码全部对齐较新版本的数据库,明确了 PostgreSQL、MySQL、Oracle、SQL Server、DB2 之间的语法差异,让读者不会在换数据库时被方言卡住;同时新增第9章「通过应用程序连接数据库」,从驱动、JDBC 讲到用 Java 实际执行 SELECT 与 UPDATE,把「在客户端敲 SQL」和「程序里调用 SQL」这两个世界接通,这是不少同类入门书缺失的一环。 全书把关键结论提炼成「法则」,配上每章练习与书末答案,学习节奏非常适合自学。它不追求覆盖全部 SQL 特性,而是把最常用的九成内容讲透,这也正是它在中文读者中口碑长期稳定的原因。

Who it's for

A good fit for

  • 完全没有编程经验、想从零系统学 SQL 的读者
  • 数据分析、运营、产品等需要自己写查询取数的岗位
  • 计算机与统计相关专业的学生,可作为数据库课程辅助教材
  • 已会写零散 SQL、希望把知识体系补完整的开发者

Not a good fit for

  • 已熟练掌握 SQL 优化、执行计划与索引调优的资深 DBA
  • 想直接深入某一数据库(如 Oracle 或 MySQL)内部机制与运维的读者
  • 只想要速查手册、不愿跟着章节练习动手的人

Reading tips

  1. 先按绪论装好 PostgreSQL 环境,边读边敲代码,别只看不练。
  2. 每章先看图表与「法则」建立框架,再回头细读示例程序与说明。
  3. 重点章节是聚合与排序、复杂查询、集合运算,可反复做章末练习题自测。
  4. 第9章可等前面语法熟练后再读,配合 Java 环境跑通一次取数与更新。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Chapter 0 Introduction—Setting Up the SQL Learning Environment
  2. Chapter 1 Databases and SQL
  3. Chapter 2 Query Basics
  4. Chapter 3 Aggregation and Sorting
  5. Chapter 4 Data Updates
  6. Chapter 5 Complex Queries
  7. Chapter 6 Functions, Predicates, and CASE Expressions
  8. Chapter 7 Set Operations
  9. Chapter 8 Advanced SQL Processing
  10. Chapter 9 Connecting to Databases Through Applications
  11. Appendix Exercise Answers

FAQ

这本书用的是哪个数据库?学完能用在 MySQL 上吗?
正文以 PostgreSQL 为实践环境,但书中会比较 PostgreSQL、MySQL、Oracle、SQL Server、DB2 的语法差异。标准 SQL 部分完全通用,个别方言差异书中也做了提示,学完切到 MySQL 问题不大。
零基础、没写过代码能看懂吗?
可以。全书从数据库是什么、表的结构讲起,示例给到操作步骤级别,第9章还专门补了 Java 入门知识,作者定位就是给没有或很少有编程经验的初学者看的。
第2版和第1版主要差别在哪?
第2版把示例程序更新为对应较新版本数据库的 SQL,并新增第9章「通过应用程序连接数据库」,介绍驱动种类以及用 Java 连接 PostgreSQL 执行查询与更新的方法。第1版由人民邮电出版社于2013年出版。
需要另外买练习题册或配套资料吗?
不需要。每章末尾自带练习题,书末附录给出练习题答案,示例所用的建表与数据也随书提供,跟着章节顺序做即可完成自测。
这本书能当工具书随时查吗?
可以部分承担。书中把重要知识点总结为「法则」并加粗标识,适合回查语法要点与常见易错点;但它偏教程体例,若要做完整语法速查,建议再配一本 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.

More by the same author

Top rated in the same category