SQL Queries for Mere Mortals: A HandsOn Guide to Data Manipulation in SQL (Paperback)
Michael J. Hernandez, John L. Viescas
 出版商: AddisonWesley Professional
 出版日期: 20000831
 定價: USD $59.99
 售價: $399
 語言: 英文
 頁數: 528
 裝訂: Paperback
 ISBN: 0201433362
 ISBN13: 9780201433364
立即出貨
買這商品的人也買了...

$480貴賓價: $408 
售價: $199Hack Proofing Your Wireless Network

售價: $399MySQL (Paperback)

$199售價: $157 
$520貴賓價: $442 
貴賓價: $2,016SQL99 Complete, Really

貴賓價: $1,260Microsoft Access Developer's Guide to SQL Server

售價: $660UML for Mere Mortals

貴賓價: $1,440Professional XML Databases

貴賓價: $1,440Microsoft Office Access 2003 Inside Out

貴賓價: $855Database Management: With Website Development Applications

$390貴賓價: $296 
$1,200售價: $948 
$560售價: $442 
售價: $399Web Design Tools and Techniques, 2/e

$650售價: $650 
貴賓價: $2,205The Guru's Guide to TransactSQL (Paperback)

售價: $199Joe Celko's Data & Databases: Concepts in Practice

貴賓價: $1,152Practical Issues in Database Management: A Reference for the Thinking Practition

售價: $1,155Database Design for Mere Mortals, 2/e
產品描述
Description
The practical, handson, plainEnglish 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.
 CDROM contains five realworld sample databases for use with the book's example queries.
Michael J. Hernandez is a wellknown relational database consultant, toprated Microsoft Access instructor, and owner of DataTex Consulting Group in Seattle, WA. He is author of the bestselling Database Design for Mere Mortals, 0201694719. 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.
Are You a Mere Mortal?
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".
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?"
Topics Covered in This Chapter.
Types of Databases.
A Brief History of the Relational Model.
Anatomy of a Relational Database.
What's in It for Me?
Types of Databases.
A Brief History of the Relational Model.
In the Beginning . . ..
Relational Database Software.
Relational Database Software.
Anatomy of a Relational Database.
Tables.
Fields.
Records.
Keys.
Views.
Relationships.
Fields.
Records.
Keys.
Views.
Relationships.
What's in It for Me?
"Where Do I Go from Here?"
2. Ensuring Your Database Structure Is Sound.
Topics Covered in This Chapter.
Why Is This Chapter Here?
Why Worry about Sound Structures?
Finetuning Fields.
Finetuning Tables.
Establishing Solid Relationships.
Is That All?
Why Is This Chapter Here?
Why Worry about Sound Structures?
Finetuning Fields.
What's in a Name? (Part One).
Smoothing Out the Rough Edges.
Resolving Multipart Fields.
Resolving Multivalued Fields.
Smoothing Out the Rough Edges.
Resolving Multipart Fields.
Resolving Multivalued Fields.
Finetuning Tables.
What's in a Name? (Part Two).
Ensuring a Sound Structure.
Resolving Unnecessary Duplicate Fields.
Identification Is the Key.
Ensuring a Sound Structure.
Resolving Unnecessary Duplicate Fields.
Identification Is the Key.
Establishing Solid Relationships.
Establishing a Deletion Rule.
Setting the TYpe of Participation.
Setting the Degree of Participation.
Setting the TYpe of Participation.
Setting the Degree of Participation.
Is That All?
3. A Concise History of SQL.
Topics Covered in This Chapter.
The Origins of SQL.
Early Vendor Implementation.
". . . And Then There Was a Standard".
Evolution of the ANSI/ISO Standard.
What the Future Holds.
Why Should You Learn SQL?
The Origins of SQL.
Early Vendor Implementation.
". . . And Then There Was a Standard".
Evolution of the ANSI/ISO Standard.
Other SQL Standards.
Commercial Implementations.
Commercial Implementations.
What the Future Holds.
Why Should You Learn SQL?
II. SQL BASICS.
4. Creating a Simple Query.
Topics Covered in This Chapter.
Introducing SELECT.
The SELECT Statement.
A Quick Aside: Data vs. Information.
Translating Your Request into SQL.
Eliminating Duplicate Rows.
Sorting Information.
Saving Your Work.
Sample Statements.
Problems for You to Solve.
Introducing SELECT.
The SELECT Statement.
Major Clauses in a SELECT Statement.
A Quick Aside: Data vs. Information.
Translating Your Request into SQL.
Expanding the Field of Vision.
Eliminating Duplicate Rows.
Sorting Information.
First Things First: Collating Sequences.
Let's Now Come to Order.
Let's Now Come to Order.
Saving Your Work.
Sample Statements.
Problems for You to Solve.
5. Getting More Than Simple Columns.
Topics Covered in This Chapter.
The SELECT Clause: Take Two.
Moving Beyond Basic Information.
What Is an Expression?
What Are You Trying to Express?
Types of Expressions.
Using Expressions in a SELECT Clause.
That "Nothing" ValueNULL.
Sample Statements.
Problems for You to Solve.
The SELECT Clause: Take Two.
Specifying Explicit Values.
Moving Beyond Basic Information.
What Is an Expression?
What Are You Trying to Express?
Data Types in SQL.
Types of Expressions.
Concatenation.
Mathematical.
Date And Time Arithmetic.
Mathematical.
Date And Time Arithmetic.
Using Expressions in a SELECT Clause.
A Brief Digression: Value Expressions.
That "Nothing" ValueNULL.
Introducing Null.
Sample Statements.
Problems for You to Solve.
6. Filtering Your Data.
Topics Covered in This Chapter.
Refining What You See Using WHERE.
Defining Search Conditions.
Using Multiple Conditions.
Nulls Revisited: A Cautionary Note.
Expressing Conditions in Different Ways.
Sample Statements.
Problems for You to Solve.
Refining What You See Using WHERE.
The WHERE Clause.
Using A WHERE Clause.
Using A WHERE Clause.
Defining Search Conditions.
Comparison.
Range.
Set Membership.
Pattern Match.
Null.
Excluding Rows with NOT.
Range.
Set Membership.
Pattern Match.
Null.
Excluding Rows with NOT.
Using Multiple Conditions.
Introducing AND and OR.
Excluding Rows: Take Two.
Order of Precedence.
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.
Topics Covered in This Chapter.
What Is a Set, Anyway?
Operations on Sets.
Intersection.
Difference.
Union.
SQL Set Operations.
What Is a Set, Anyway?
Operations on Sets.
Intersection.
Intersection in Set Theory.
Intersection between Result Sets.
Problems You Can Solve with INTERSECT.
Intersection between Result Sets.
Problems You Can Solve with INTERSECT.
Difference.
Difference in Set Theory.
Difference Between Result Sets.
Problems You Can Solve with DIFFERENCE.
Difference Between Result Sets.
Problems You Can Solve with DIFFERENCE.
Union.
Union in Set Theory.
Combining Result Sets Using UNION.
Problems You Can Solve with UNION.
Combining Result Sets Using UNION.
Problems You Can Solve with UNION.
SQL Set Operations.
"Classical" Set Operations vs. SQL.
Finding Common ValuesINTERSECT.
Finding Missing ValuesEXCEPT (Difference).
Combining SetsUNION.
Finding Common ValuesINTERSECT.
Finding Missing ValuesEXCEPT (Difference).
Combining SetsUNION.
8. INNER JOINs.
Topics Covered in This Chapter.
What Is a JOIN?
The INNER JOIN.
Uses for INNER JOINs.
Sample Statements.
Problems for You to Solve.
What Is a JOIN?
The INNER JOIN.
What's "Legal" to JOIN?
Syntax.
Check Those Relationships!
Syntax.
Check Those Relationships!
Uses for INNER JOINs.
Find Related Rows.
Find Matching Values.
Find Matching Values.
Sample Statements.
Two Tables.
More Than Two Tables.
Looking for Matching Values.
More Than Two Tables.
Looking for Matching Values.
Problems for You to Solve.
9. OUTER JOINs.
Topics Covered in This Chapter.
What is an OUTER JOIN?
The Left/Right OUTER JOIN.
The FULL OUTER JOIN.
Uses for OUTER JOINS.
Sample Statements.
Problems for You to Solve.
What is an OUTER JOIN?
The Left/Right OUTER JOIN.
Syntax.
The FULL OUTER JOIN.
Syntax.
FULL OUTER JOIN on NonKey Values.
UNION JOIN.
FULL OUTER JOIN on NonKey Values.
UNION JOIN.
Uses for OUTER JOINS.
Find Missing Values.
Find Partially Matched Information.
Find Partially Matched Information.
Sample Statements.
Problems for You to Solve.
10. UNIONs.
Topics Covered in This Chapter.
What Is a Union?
Writing Requests with UNION.
Uses for UNION.
Sample Statements.
Problems for You to Solve.
What Is a Union?
Writing Requests with UNION.
Using Simple SELECT Statements.
Combining Complex SELECT Statements.
Using UNION More Than Once.
Sorting a 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.
Topics Covered in This Chapter.
What Is a Subquery?
Subqueries as Column Expressions.
Subqueries as Filters.
Uses for Subqueries.
Sample Statements.
Problems for You to Solve.
What Is a Subquery?
Row Subqueries.
Table Subqueries.
Scalar Subqueries.
Table Subqueries.
Scalar Subqueries.
Subqueries as Column Expressions.
Syntax.
An Introduction to Aggregate FunctionsCOUNT and MAX.
An Introduction to Aggregate FunctionsCOUNT and MAX.
Subqueries as Filters.
Syntax.
Special Predicate Keywords for Subqueries.
Special Predicate Keywords for Subqueries.
Uses for Subqueries.
Column Expressions.
Filters.
Filters.
Sample Statements.
Subqueries in Expressions.
Subqueries in Filters.
Subqueries in Filters.
Problems for You to Solve.
IV. SUMMARIZING AND GROUPING DATA.
12. Summarizing Data.
Topics Covered in This Chapter.
Aggregate functions.
Using Aggregate Functions in Filters.
Sample Statements.
Problems for You to Solve.
Aggregate functions.
Counting Rows and Values with COUNT.
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.
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.
Topics Covered in This Chapter.
Why Group Data?
The GROUP BY Clause.
"Some Restrictions Apply".
Sample Statements.
Problems for You to Solve.
Why Group Data?
The GROUP BY Clause.
Syntax.
Mixing Columns and Expressions.
Using GROUP BY in a Subquery in a WHERE Clause.
Simulating a SELECT DISTINCT Statement.
Mixing Columns and Expressions.
Using GROUP BY in a Subquery in a WHERE Clause.
Simulating a SELECT DISTINCT Statement.
"Some Restrictions Apply".
Column Restrictions.
Grouping on Expressions.
Uses for GROUP BY.
Grouping on Expressions.
Uses for GROUP BY.
Sample Statements.
Problems for You to Solve.
14. Filtering Grouped Data.
Topics Covered in This Chapter.
A New Meaning of "Focus Groups".
When You Filter Makes A Difference.
Uses for HAVING.
Sample Statements.
Problems for You to Solve.
A New Meaning of "Focus Groups".
When You Filter Makes A Difference.
Should You Filter in WHERE or in HAVING?
Avoiding the HAVING COUNT Trap.
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