SQL for Beginners (2nd Edition) cover

SQL for Beginners (2nd Edition)

No rating yet
Chapters
23
ISBN
9787115448651

Tags

Summary

Many SQL books try to be syntax encyclopedias from the start, and readers are still consulting manuals halfway through. This small book takes the opposite approach: it treats SQL as a language and teaches it one keyword at a time, so that after each chapter you can write one more layer of queries, and the logical chain always stays connected. At under 200 pages, it can be read in two or three weeks of commuting, and it is very friendly to complete beginners—it does not even require you to have a computer open while reading, since the examples are understandable on their own. The second advantage is "one body of knowledge, three dialects." Each topic is presented with SQL Server, MySQL, and Oracle formulations side by side, and a dedicated "Differences Across Databases" section points out the inconsistencies. This means the syntax you learn in the tutorial will not completely fail when you switch to the database your company actually uses, and you understand in advance "why the same thing has several formulations." The second edition is more complete than the first: it adds cross-tab layouts, ranking functions and partitioning, common table expressions, and cross joins, and finally covers Excel external data and pivot tables, connecting the step of "how to present the data you query." If you want to buy just one SQL primer and cannot tell which database dialect to learn, this book offers solid value for the price.

Editor's review

很多SQL书一上来就想做成语法百科全书,结果读者翻到一半还在查手册。这本小书走的是相反的路:先把SQL当成一门语言,一个关键字一个关键字地教,每章讲完你就能多写出一层查询,逻辑链条始终是连贯的。全书不到200页,通勤两三周就能读完一遍,对零基础的人非常友好——它甚至不要求你边读边开电脑,示例本身就能看懂。 第二个好处是“一套知识,三种方言”。书中每个主题都同时给出SQL Server、MySQL和Oracle的写法,并用专门的“数据库的差异”板块把不一致之处点出来。这意味着你在教程里学到的语法,换到公司实际用的数据库上不会全盘失效,也提前明白了“为什么同一件事有好几种写法”。 第2版比初版更完整:补上了交叉表布局、排名函数与分区、公用表表达式、交叉连接,最后还讲到Excel外部数据与透视表,把“查出来的数据怎么呈现”这一步也接上了。如果你只想买一本SQL入门书,而手上又分不清该学哪个数据库的方言,这本的性价比很扎实。

Who it's for

A good fit for

  • 完全没接触过数据库、想从零理解SQL语法的人
  • 在工作中需要自己写查询取数、但只会用Excel的业务与运营人员
  • 在校学生或培训班学员,需要一本简明教材配合课程学习
  • 需要在SQL Server、MySQL、Oracle之间迁移写法的初级开发者

Not a good fit for

  • 已有多年开发经验、想深入优化执行计划与索引调优的资深DBA
  • 希望系统学习某一具体数据库(如PostgreSQL)特有高级特性的读者
  • 需要大数据分析、数据仓库建模等专题内容的读者

Reading tips

  1. 按章节顺序读,不要跳章:本书的新关键字都建立在上一章的理解之上,跳读容易断链。
  2. 读完每章后立刻在任一免费数据库(SQL Server Express、MySQL Community、Oracle XE)里把示例敲一遍,效果远超只看。
  3. 遇到“数据库的差异”板块时,先确认自己实际使用的数据库,再重点记住对应的那一种写法。
  4. 读完后把书中的查询拼成一个小型自建数据集(如销售、图书借阅)做完整练习,把第17—19章的建表、修改与规范化串起来。

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 1 Relational Databases and SQL
  2. Chapter 2 Basic Data Retrieval
  3. Chapter 3 Calculated Fields and Aliases
  4. Chapter 4 Using Functions
  5. Chapter 5 Sorting Data
  6. Chapter 6 Query Conditions
  7. Chapter 7 Boolean Logic
  8. Chapter 8 Conditional Logic
  9. Chapter 9 Summarizing Data
  10. Chapter 10 Summaries and Cross-Tabs
  11. Chapter 11 Inner Joins
  12. Chapter 12 Outer Joins
  13. Chapter 13 Self-Joins and Views
  14. Chapter 14 Subqueries
  15. Chapter 15 Set Logic
  16. Chapter 16 Stored Procedures and Parameters
  17. Chapter 17 Modifying Data
  18. Chapter 18 Maintaining Tables
  19. Chapter 19 Database Design Principles
  20. Chapter 20 Strategies for Presenting Data
  21. Appendix A Getting Started with Microsoft SQL Server
  22. Appendix B Getting Started with MySQL
  23. Appendix C Getting Started with Oracle

FAQ

零基础、没装过数据库能读这本书吗?
可以。作者的写法是让读者直接阅读就能理解示例,不强制边读边装软件;书中附录A、B、C分别介绍了SQL Server、MySQL和Oracle免费版本的下载安装与基本使用,想动手时再跟着装即可。
这本书同时讲三种数据库,会不会学得杂?
全书以通用SQL概念为主线,一次只引入一个关键字,三种数据库的写法并列给出,差异集中在“数据库的差异”板块说明。与专门深入某一个数据库的书不同,它的目标是先让你写出能跑的逻辑,再知道自己用的方言差在哪里。
第1版和第2版有什么区别?
第2版(2017年,ISBN 9787115448651)在初版基础上增加了分类汇总与交叉表、排名函数与分区、交叉连接、公用表表达式、Excel外部数据和透视表等内容,章节扩展到20章加三个附录,篇幅约193页,定价49元。
这本书讲存储过程和数据修改吗?
讲。第16章介绍存储过程的创建、参数与执行,第17章讲INSERT、DELETE、UPDATE及用相关子查询更新数据,第18章涉及数据定义语言、主键、索引、外键与建表,第19章介绍规范化等数据库设计原理,并不只是纯查询。
适合当高校教材或考试参考吗?
出版社与图书馆书目将其定位为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