SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL (Paperback)
暫譯: SQL 查詢入門:SQL 數據操作實用指南 (平裝本)
Michael J. Hernandez, John L. Viescas
- 出版商: Addison Wesley
- 出版日期: 2000-08-31
- 定價: $1,980
- 售價: 5.0 折 $990
- 語言: 英文
- 頁數: 528
- 裝訂: Paperback
- ISBN: 0201433362
- ISBN-13: 9780201433364
-
相關分類:
SQL
立即出貨(限量) (庫存=8)
買這商品的人也買了...
-
$680$537 -
$650$553 -
$990$495 -
$299$254 -
$480$379 -
$880$695 -
$560$442 -
$1,029Operating System Concepts, 6/e (Windows XP Update)
-
$450$351 -
$420$328 -
$750$638 -
$580$458 -
$650$553 -
$580$458 -
$760$600 -
$590$466 -
$280$221 -
$620$527 -
$480$374 -
$690$538 -
$1,260CCNA Certification Library (CCNA Self-Study, exam #640-801), 6/e
-
$399CCNA ICND Exam Certification Guide (CCNA Self-Study, 640-811, 640-801) (Hardcover)
-
$750$638 -
$560$476 -
$480$379
相關主題
商品描述
Description
The practical, hands-on, plain-English guide to getting results with SQL!
- No unnecessary jargon: just real help and useful examples!
- Covers every SQL skill business database users need most: drawing data from multiple tables, grouping, totaling, summaries, and much more.
- CD-ROM contains five real-world sample databases for use with the book's example queries.
Michael J. Hernandez is a well-known relational database consultant, top-rated Microsoft Access instructor, and owner of DataTex Consulting Group in Seattle, WA. He is author of the best-selling Database Design for Mere Mortals, 0-201-69471-9. John L. Viescas is President of Viescas Consulting, Inc., a respected provider of database consulting services. He is the author of Running Microsoft Access 97 and Quick Reference Guide to SQL, which has been hailed as "the Strunk and White of SQL."
Table Of Contents
Foreword.Preface and Acknowledgments.
About the Authors.
Introduction.
About This Book.
How to Use This Book.
Reading the Diagrams Used in This Book.
Sample Databases Used in This Book.
"Follow the Yellow Brick Road".
I. RELATIONAL DATABASES AND SQL.
1. What Is "Relational?"
Types of Databases.
A Brief History of the Relational Model.
Relational Database Software.
Anatomy of a Relational Database.
Fields.
Records.
Keys.
Views.
Relationships.
What's in It for Me?
2. Ensuring Your Database Structure Is Sound.
Why Is This Chapter Here?
Why Worry about Sound Structures?
Fine-tuning Fields.
Smoothing Out the Rough Edges.
Resolving Multipart Fields.
Resolving Multivalued Fields.
Fine-tuning Tables.
Ensuring a Sound Structure.
Resolving Unnecessary Duplicate Fields.
Identification Is the Key.
Establishing Solid Relationships.
Setting the TYpe of Participation.
Setting the Degree of Participation.
Is That All?
3. A Concise History of SQL.
The Origins of SQL.
Early Vendor Implementation.
". . . And Then There Was a Standard".
Evolution of the ANSI/ISO Standard.
Commercial Implementations.
What the Future Holds.
Why Should You Learn SQL?
II. SQL BASICS.
4. Creating a Simple Query.
Introducing SELECT.
The SELECT Statement.
A Quick Aside: Data vs. Information.
Translating Your Request into SQL.
Eliminating Duplicate Rows.
Sorting Information.
Let's Now Come to Order.
Saving Your Work.
Sample Statements.
Problems for You to Solve.
5. Getting More Than Simple Columns.
The SELECT Clause: Take Two.
Moving Beyond Basic Information.
What Is an Expression?
What Are You Trying to Express?
Types of Expressions.
Mathematical.
Date And Time Arithmetic.
Using Expressions in a SELECT Clause.
That "Nothing" Value--NULL.
Sample Statements.
Problems for You to Solve.
6. Filtering Your Data.
Refining What You See Using WHERE.
Using A WHERE Clause.
Defining Search Conditions.
Range.
Set Membership.
Pattern Match.
Null.
Excluding Rows with NOT.
Using Multiple Conditions.
Excluding Rows: Take Two.
Order of Precedence.
Nulls Revisited: A Cautionary Note.
Expressing Conditions in Different Ways.
Sample Statements.
Problems for You to Solve.
III. WORKING WITH MULTIPLE TABLES.
7. Thinking in Sets.
What Is a Set, Anyway?
Operations on Sets.
Intersection.
Intersection between Result Sets.
Problems You Can Solve with INTERSECT.
Difference.
Difference Between Result Sets.
Problems You Can Solve with DIFFERENCE.
Union.
Combining Result Sets Using UNION.
Problems You Can Solve with UNION.
SQL Set Operations.
Finding Common Values--INTERSECT.
Finding Missing Values--EXCEPT (Difference).
Combining Sets--UNION.
8. INNER JOINs.
What Is a JOIN?
The INNER JOIN.
Syntax.
Check Those Relationships!
Uses for INNER JOINs.
Find Matching Values.
Sample Statements.
More Than Two Tables.
Looking for Matching Values.
Problems for You to Solve.
9. OUTER JOINs.
What is an OUTER JOIN?
The Left/Right OUTER JOIN.
The FULL OUTER JOIN.
FULL OUTER JOIN on Non-Key Values.
UNION JOIN.
Uses for OUTER JOINS.
Find Partially Matched Information.
Sample Statements.
Problems for You to Solve.
10. UNIONs.
What Is a Union?
Writing Requests with UNION.
Combining Complex SELECT Statements.
Using UNION More Than Once.
Sorting a UNION.
Uses for UNION.
Sample Statements.
Problems for You to Solve.
11. Subqueries.
What Is a Subquery?
Table Subqueries.
Scalar Subqueries.
Subqueries as Column Expressions.
An Introduction to Aggregate Functions--COUNT and MAX.
Subqueries as Filters.
Special Predicate Keywords for Subqueries.
Uses for Subqueries.
Filters.
Sample Statements.
Subqueries in Filters.
Problems for You to Solve.
IV. SUMMARIZING AND GROUPING DATA.
12. Summarizing Data.
Aggregate functions.
Computing a Total with SUM.
Calculating a Mean Value with AVG.
Finding the Largest Value with MAX.
Finding the Smallest Value with MIN.
Using More Than One Function.
Using Aggregate Functions in Filters.
Sample Statements.
Problems for You to Solve.
13. Grouping Data.
Why Group Data?
The GROUP BY Clause.
Mixing Columns and Expressions.
Using GROUP BY in a Subquery in a WHERE Clause.
Simulating a SELECT DISTINCT Statement.
"Some Restrictions Apply".
Grouping on Expressions.
Uses for GROUP BY.
Sample Statements.
Problems for You to Solve.
14. Filtering Grouped Data.
A New Meaning of "Focus Groups".
When You Filter Makes A Difference.
Avoiding the HAVING COUNT Trap.
Uses for HAVING.
Sample Statements.
Problems for You to Solve.
In Closing.
APPENDICES.
A. SQL Standard Diagrams.B. Schema for the Sample Databases.
C. Recommended Reading References.
Index. 0201433362T04062001

商品描述(中文翻譯)
```
描述
實用、動手操作的簡明指南,幫助您使用 SQL 獲得結果!
- 無不必要的行話:只有真正的幫助和有用的範例!
- 涵蓋商業資料庫使用者最需要的每一項 SQL 技能:從多個表中提取資料、分組、總計、摘要等等。
- CD-ROM 包含五個真實世界的範例資料庫,可用於書中的範例查詢。
Michael J. Hernandez 是知名的關聯資料庫顧問、評價最高的 Microsoft Access 講師,以及位於華盛頓州西雅圖的 DataTex Consulting Group 的擁有者。他是暢銷書 Database Design for Mere Mortals 的作者,ISBN 0-201-69471-9。John L. Viescas 是 Viescas Consulting, Inc. 的總裁,該公司是受人尊敬的資料庫顧問服務提供商。他是 Running Microsoft Access 97 和 Quick Reference Guide to SQL 的作者,後者被譽為「SQL 的 Strunk and White」。
目錄
前言。
序言與致謝。
關於作者。
介紹。
本書介紹。
如何使用本書。
閱讀本書中使用的圖表。
本書中使用的範例資料庫。
'跟隨黃磚路'。
I. 關聯資料庫與 SQL。
1. 什麼是「關聯」?
資料庫類型。
關聯模型的簡史。
關聯資料庫軟體。
關聯資料庫的結構。
欄位。
記錄。
鍵。
視圖。
關係。
這對我有什麼好處?
2. 確保您的資料庫結構是健全的。
為什麼這一章在這裡?
為什麼要擔心健全的結構?
微調欄位。
平滑粗糙邊緣。
解決多部分欄位。
解決多值欄位。
微調表格。
確保結構健全。
解決不必要的重複欄位。
識別是關鍵。
建立穩固的關係。
設定參與類型。
設定參與程度。
這樣就結束了嗎?
3. SQL 的簡明歷史。
SQL 的起源。
早期供應商實現。
'……然後就有了標準'。
ANSI/ISO 標準的演變。
商業實現。
未來的展望。
為什麼您應該學習 SQL?
II. SQL 基礎。
4. 創建簡單查詢。
介紹 SELECT。
SELECT 語句。
簡短的旁白:資料與資訊。
將您的請求轉換為 SQL。
消除重複行。
排序資訊。
現在讓我們來整理。
保存您的工作。
範例語句。
您需要解決的問題。
5. 獲取不僅僅是簡單的欄位。
SELECT 子句:第二次。
超越基本資訊。
什麼是表達式?
您想表達什麼?
表達式的類型。
數學。
日期和時間運算。
在 SELECT 子句中使用表達式。
那個「無」值——NULL。
範例語句。
您需要解決的問題。
6. 過濾您的資料。
使用 WHERE 精煉您所見的內容。
使用 WHERE 子句。
定義搜尋條件。
範圍。
集合成員資格。
模式匹配。
Null。
使用 NOT 排除行。
使用多個條件。
排除行:第二次。
優先順序。
Null 再次回顧:警示說明。
以不同方式表達條件。
範例語句。
您需要解決的問題。
III. 使用多個表。
7. 集合思維。
集合到底是什麼?
集合運算。
交集。
結果集之間的交集。
您可以用 INTERSECT 解決的問題。
差異。
結果集之間的差異。
您可以用 DIFFERENCE 解決的問題。
聯集。
使用 UNION 結合結果集。
您可以用 UNION 解決的問題。
SQL 集合運算。
尋找共同值——INTERSECT。
尋找缺失值——EXCEPT(差異)。
結合集合——UNION。
8. INNER JOIN。
JOIN 是什麼?
INNER JOIN。
語法。
檢查那些關係!
INNER JOIN 的用途。
查找匹配值。
範例語句。
超過兩個表。
尋找匹配值。
您需要解決的問題。
9. OUTER JOIN。
OUTER JOIN 是什麼?
左/右 OUTER JOIN。
FULL OUTER JOIN。
在非鍵值上進行 FULL OUTER JOIN。
UNION JOIN。
OUTER JOIN 的用途。
查找部分匹配的資訊。
範例語句。
您需要解決的問題。
10. UNION。
聯集是什麼?
使用 UNION 撰寫請求。
結合複雜的 SELECT 語句。
多次使用 UNION。
對 UNION 進行排序。
UNION 的用途。
範例語句。
您需要解決的問題。
11. 子查詢。
子查詢是什麼?
表子查詢。
標量子查詢。
子查詢作為欄位表達式。
聚合函數的介紹——COUNT 和 MAX。
子查詢作為過濾器。
子查詢的特殊謂詞關鍵字。
子查詢的用途。
過濾器。
範例語句。
過濾器中的子查詢。
您需要解決的問題。
IV. 總結與分組資料。
12. 總結資料。
聚合函數。
使用 SUM 計算總和。
使用 AVG 計算平均值。
使用 MAX 找到最大值。
使用 MIN 找到最小值。
使用多個函數。
在過濾器中使用聚合函數。
範例語句。
您需要解決的問題。
13. 分組資料。
為什麼要分組資料?
GROUP BY 子句。
混合欄位和表達式。
在 WHERE 子句中的子查詢中使用 GROUP BY。
模擬 SELECT DISTINCT 語句。
'某些限制適用'。
在表達式上分組。
GROUP BY 的用途。
範例語句。
您需要解決的問題。
14. 過濾分組資料。
'焦點小組' 的新意義。
過濾的時機很重要。
避免 HAVING COUNT 陷阱。
HAVING 的用途。
```