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.
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?
Fine-tuning Fields.
Fine-tuning Tables.
Establishing Solid Relationships.
Is That All?
Why Is This Chapter Here?
Why Worry about Sound Structures?
Fine-tuning 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.
Fine-tuning 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 "N
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 "N