Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A patient, hands-on introduction to SQL and relational databases that takes you from installing PostgreSQL to writing window functions and joining tables. Best for complete beginners, self-taught learners who want systematic grounding, and instructors looking for a ready-made teaching text.
【Book Arc】
- **Opening (~0%–12%)**: Sets up the environment and mental model — what a database is, why a DBMS beats files and spreadsheets, installing PostgreSQL, creating a learning database, and the basic rules of writing SQL (constants, quoting, statement terminators).
- **Early (~12%–32%)**: The querying core — SELECT/FROM, aliases, DISTINCT, WHERE, arithmetic and comparison operators, NULL handling, logical operators and three-valued logic, then aggregation (COUNT/SUM/AVG), GROUP BY, HAVING, and ORDER BY.
- **Middle (~32%–52%)**: Data manipulation and complex queries — INSERT (including INSERT…SELECT), DELETE/TRUNCATE, UPDATE, then views, subqueries, scalar subqueries, and correlated subqueries with their scoping rules.
- **Late (~52% onward)**: Functions, predicates, and CASE expressions, followed by joining multiple tables (inner, outer, cross, three-table joins) and advanced processing such as window functions and GROUPING operators (ROLLUP/CUBE/GROUPING SETS).
- **Ending**: Connecting a database to an application, closing the loop from standalone SQL practice to real programmatic use.
【Key Takeaways】
- **A DBMS solves concrete problems files can't** (Opening): concurrent multi-user access, handling millions of rows, automation, and protection against accidents — the motivation for learning SQL at all.
- **SELECT is the heart of SQL** (Early): master SELECT/FROM, WHERE, DISTINCT, and aliases and you've cleared the biggest hurdle; everything else builds on this.
- **NULL is not zero and not empty** (Early): arithmetic with NULL yields NULL, comparisons with NULL don't return true/false, and you must use IS NULL / IS NOT NULL — a recurring source of beginner bugs.
- **SQL logic is three-valued** (Early): conditions evaluate to TRUE, FALSE, or UNKNOWN, and truth tables govern how NOT/AND/OR combine them.
- **Aggregation excludes NULL automatically** (Early): SUM/AVG/COUNT ignore NULLs, which is why "NULL in arithmetic" and "NULL in aggregation" behave differently.
- **Clause order is fixed** (Early–Middle): SELECT → FROM → WHERE → GROUP BY → HAVING → ORDER BY; aliases defined in SELECT aren't visible to GROUP BY, and ORDER BY belongs at the end.
- **Views store queries, not data** (Middle): a view is a saved SELECT that materializes a temporary table on read; it has limits (no ORDER BY in definition, restricted updatability).
- **Subqueries come in flavors** (Middle): scalar subqueries fit anywhere a single value fits; correlated subqueries re-execute per row and require the correlation condition inside the subquery, not outside.
【Reading Tips】
- Deep-read Chapters 1–3 (setup, SELECT, aggregation); this is the foundation everything else assumes, and the exercises here pay off most.
- Skim the PostgreSQL installation walkthrough if you already have a working database, but don't skip the "create a learning database" step — the book's examples depend on it.
- Treat NULL and three-valued logic as a dedicated study topic; re-read those sections and test edge cases yourself rather than trusting intuition.
- Work the end-of-chapter exercises before checking the appendix answers; the book is explicitly designed for hands-on practice.
- When you reach views, subqueries, and joins, draw the execution order on paper — the book visualizes correlated subquery execution, and replicating that habit helps.
【Coverage Limits】
This guide is synthesized from stratified excerpts covering roughly the first half of the book plus table-of-contents glimpses of later chapters; detailed content on functions, joins, window functions, and application connectivity is only partially represented, so specifics there are inferred from headings rather than full text.
erver PostgreSQL SELECT CAST('0001' AS INTEGER) AS int_col; MySQL SELECT CAST('0001' AS SIGNED INTEGER) AS int_col; Oracle SELECT CAST('0001' AS INTEGER) AS...
L 时的情况更加复杂一些,只有一个不合规则的 ROLLUP 能够使用。这里所说的“不合规则”指的是需要使用特定的语法。 -- MySQL专用 SELECT product_type, regist_date, SUM(sale_price) AS sum_price FROM Product GROUP BY p...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
SQL基础教程(第2版) ([日] MICK)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share to WeChat Moments
SQL基础教程(第2版) ([日] MICK)(Z-Library)
Scan the QR code with WeChat to open this book
Tap the ··· menu in the top-right corner
Choose Share to Moments
You are already in WeChat. Tap ··· in the top-right corner and choose Share to Moments.
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
SQL基础教程(第2版) ([日] MICK)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
这本书是面向编程初学者的 SQL 与关系数据库入门教程,既可供自学,也能作为大学、专科学校和企业新人培训的教材。全书围绕“动手解决具体问题”来组织,配有大量示例程序和详实的操作步骤说明,各章结尾还安排了习题帮助复习该章知识要点,习题的答案与讲解收录在附录中,读者可以边学边练,逐步建立编写 SQL 语句的能力。
从给出的材料看,读者可以抓住几条主要线索。其一是查询基础:书中通过示例讲解如何从表中选取所需数据,例如按商品名称和类型检索出“打孔器”这样的记录,也讲到算术运算符的使用,可以把商品单价的 2 倍以新列的形式读取出来。其二是条件组合的细节:在使用 AND 与 OR 运算符时,需要用半角括号把 OR 及其两侧的查询条件括起来,才能让 OR 先于 AND 执行,这类容易出错的语法点书中都有具体代码说明。其三是数据更新与事务:事务是需要在同一个处理单元中执行的一系列更新处理的集合,借助事务可以管理数据更新处理的提交与取消,终止指令包括 COMMIT 和 ROLLBACK 两种,而 TRUNCATE 会默认执行 COMMIT,书中提醒使用时要多加注意。
Digital LibraryAI Assistant
Hi — I can help you pick a book. Tell me a topic, language, or level, e.g. “a light English read”. If that's too broad, I'll ask one follow-up.
Loading comments...
Reply to Comment
Edit Comment