Practical SQL The Sequel
Judith S. Bowman
- 出版商: Addison Wesley
- 出版日期: 2000-12-15
- 定價: $1,360
- 售價: 5.0 折 $680
- 語言: 英文
- 頁數: 352
- 裝訂: Paperback
- ISBN: 0201616386
- ISBN-13: 9780201616385
-
相關分類:
SQL
立即出貨(限量) (庫存=3)
買這商品的人也買了...
-
$680$578 -
$1,250$1,188 -
$1,440The C++ Programming Language Special Edition (Hardcover)
-
$980$833 -
$1,000$950 -
$1,090$1,068 -
$1,200$1,176 -
$1,150$1,093 -
$1,300$1,235 -
$1,050$998 -
$1,890$1,796 -
$1,750$1,663 -
$1,440C++ Templates: The Complete Guide (Hardcover)
-
$750$638 -
$560$476 -
$780$663 -
$550$468 -
$280$218 -
$750$638 -
$580$199 -
$890$703 -
$620$484 -
$760$600 -
$580$493 -
$1,990$1,891
商品描述
Description
The business problem-solving sequel to the best selling, The Practical SQL Handbook.
- Built around real business problems and solutions, not SQL features.
- The perfect "next step" for SQL-literate professionals ready to go far beyond the basics.
- CD-ROM: real-world example databases and complete Sybase Adaptive Server Anywhere database system to run them on.
Judith S. Bowman has been involved in databases since the early 1980s at Sybase and other database companies, in publications, sales, technical marketing, product marketing, and engineering. She has been an independent database consultant since 1994. Bowman is lead author of The Practical SQL Handbook (Addison Wesley), 0-201-44787-8.
Table Of Contents
List of Tables.List of Figures.
Acknowledgments.
1. Introduction.
In This Chapter.
Who This Book Is For.
Contents.
Speaking Multiple SQLs.
Following Conventions.
Understanding the MSDPN Database.
Using the Examples.
Summary.
Why This Book?
Use, Not Feature.
Lots of Examples.
Multiple Systems.
Legacy.
Tuning.
Use, Not Feature.
Lots of Examples.
Multiple Systems.
Legacy.
Tuning.
Who This Book Is For.
Contents.
Chapters.
Appendices.
Appendices.
Speaking Multiple SQLs.
SQL Engines.
SQL Dialects.
SQL Dialects.
Following Conventions.
Text.
Code.
Code.
Understanding the MSDPN Database.
Table Details.
Customer.
Supplier.
Product.
Ordermaster.
Orderdetail.
Employee.
Customer.
Supplier.
Product.
Ordermaster.
Orderdetail.
Employee.
Using the Examples.
Summary.
2. Handling Dirty Data.
In This Chapter.
Dirty Data.
Case.
Space.
Size.
LIKE.
Position of Expression in Expression.
Sounds Like.
BETWEEN.
Dealing with Dates.
Summary.
Dirty Data.
Case.
Sort Order.
UPPER and LOWER in Searches.
UPPER and LOWER in UPDATE.
UPPER and LOWER with Dates.
INITCAP.
UPPER and LOWER in Searches.
UPPER and LOWER in UPDATE.
UPPER and LOWER with Dates.
INITCAP.
Space.
Removing Spaces.
Additional Features.
Additional Features.
Size.
Actual Size.
Defined Size.
Defined Size.
LIKE.
Quoting Wildcards with ESCAPE.
LIKE Variants.
Datatypes and LIKE.
LIKE Variants.
Datatypes and LIKE.
Position of Expression in Expression.
How LOCATE Works.
Using LOCATE Functions.
Using LOCATE Functions.
Sounds Like.
BETWEEN.
Dealing with Dates.
Converting Dates (and Other Datatypes).
Doing Math on Dates.
Finding Dates.
Doing Math on Dates.
Finding Dates.
Summary.
3. Translating Values.
In This Chapter.
Why Translate?
CASE/DECODE.
Translating NULL.
Point Functions.
UNION.
Joins and Outer Joins.
Subqueries.
Summary.
Why Translate?
CASE/DECODE.
CASE.
DECODE.
CASE/DECODE Variations.
DECODE.
CASE/DECODE Variations.
Translating NULL.
COALESCE/ISNULL/NVL.
Finding the First Non-NULL: COALESCE.
NULLIF.
Finding the First Non-NULL: COALESCE.
NULLIF.
Point Functions.
Getting CASE Effects from Functions and Column Values.
Getting CASE Effects from Multiple Functions.
Getting CASE Effects from Multiple Functions.
UNION.
How UNION Works.
UNION and NULL.
UNION Problems?
UNION and NULL.
UNION Problems?
Joins and Outer Joins.
Joins and NULL Values.
Outer Joins.
Outer Joins.
Subqueries.
Subqueries and Displays.
Embedded Correlated Subqueries.
Correlated and Non-Correlated Subqueries.
Another Conditional Expression: TRANSLATE.
Embedded Correlated Subqueries.
Correlated and Non-Correlated Subqueries.
Another Conditional Expression: TRANSLATE.
Summary.
4. Managing Multiples.
In This Chapter.
What's the Issue with Multiples?
Duplicates.
Near Duplicates.
Locating Disconnected Rows.
Counting Items.
Figuring Distribution.
Summary.
What's the Issue with Multiples?
Duplicates.
Duplicates and a Holding Table.
Using ROWID to Remove Duplicates.
Using ROWID to Remove Duplicates.
Near Duplicates.
Self Join.
Unequal Joins.
SIMILAR.
Unequal Joins.
SIMILAR.
Locating Disconnected Rows.
Using Outer Joins.
Using NOT IN Subqueries.
Using MINUS.
Using NOT IN Subqueries.
Using MINUS.
Counting Items.
Grouping by a Subset.
Locating the Critical Element.
Groups and Outer Joins.
Locating the Critical Element.
Groups and Outer Joins.
Figuring Distribution.
Checking Detail against Master.
Two Products Together?
HAVING.
Two Products Together?
HAVING.
Summary.
5. Navigating Numbers.
In This Chapter.
Auto-Numbering.
Finding the High Value.
Row Numbers.
Top N: Six Approaches.
Finding Every Nth.
Running Total.
Summary.
Auto-Numbering.
ASA: Default.
Transact-SQL: Column Property.
Microsoft SQL Server: IDENTITY (start, increment).
Sybase Adaptive Server Enterprise: IDENTITY.
Oracle: CREATE SEQUENCE.
Informix: SERIAL Datatype.
Associated Issues.
Transact-SQL: Column Property.
Microsoft SQL Server: IDENTITY (start, increment).
Sybase Adaptive Server Enterprise: IDENTITY.
Oracle: CREATE SEQUENCE.
Informix: SERIAL Datatype.
Associated Issues.
Finding the High Value.
GROUP BY, COUNT, HAVING MAX (COUNT).
FROM Subquery.
Row Counts of Various Sorts.
FROM Subquery.
Row Counts of Various Sorts.
Row Numbers.
System Numbers.
You Make the Numbers.
You Make the Numbers.
Top N: Six Approaches.
1: Row Limits and ORDER BY.
2: Row Numbers and HAVING.
3: Subquery.
4: Nested Subqueries.
5: Aggregates & Many Copies.
6: Cursors.
2: Row Numbers and HAVING.
3: Subquery.
4: Nested Subqueries.
5: Aggregates & Many Copies.
6: Cursors.
Finding Every Nth.
What Modulo Is.
Modulo in WHERE and HAVING.
Back to Nth Row.
Modulo in WHERE and HAVING.
Back to Nth Row.
Running Total.
Summary.
6. Tuning Queries.
In This Chapter.
Perform, #%@!
The Basic Problem.
The Optimizer and Tools for Understanding It.
WHERE Clause.
Covering Indexes.
Joining Columns.
Sorting.
HAVING and WHERE.
Views.
Forcing Indexes.
Summary.
In This Chapter.
Systematically Speaking.
System Catalogs.
System Functions.
Writing SQL with SQL.
Creating Test Data.
Summary.
Perform, #%@!
The Basic Problem.
The Optimizer and Tools for Understanding It.
Getting Information on Indexes.
Checking the Optimizer.
SQL Conventions.
Checking the Optimizer.
SQL Conventions.
WHERE Clause.
Why a Table Scan?
Data Distribution Statistics.
Disabling an Index with a Bad WHERE.
Comparing Columns in the Same Table.
Using Non-Selective Indexes.
Doing Math on a Column.
Using Functions.
Finding Ranges with BETWEEN.
Matching with LIKE.
Comparing to NULL.
Negating with NOT.
Converting Values.
Using OR.
Finding Sets of Values with IN.
Using Multi-Column Indexes.
Data Distribution Statistics.
Disabling an Index with a Bad WHERE.
Comparing Columns in the Same Table.
Using Non-Selective Indexes.
Doing Math on a Column.
Using Functions.
Finding Ranges with BETWEEN.
Matching with LIKE.
Comparing to NULL.
Negating with NOT.
Converting Values.
Using OR.
Finding Sets of Values with IN.
Using Multi-Column Indexes.
Covering Indexes.
Joining Columns.
Sorting.
DISTINCT.
UNION.
WHERE.
UNION.
WHERE.
HAVING and WHERE.
Views.
Forcing Indexes.
Summary.
Asking Performance Questions.
USING SQL TO WRITE SQL.
USING SQL TO WRITE SQL.
In This Chapter.
Systematically Speaking.
System Catalogs.
Listing System Catalogs.
Writing Queries Using System Catalogs.
Writing Queries Using System Catalogs.
System Functions.
Getting Administrative Information.
Finding Today's Date.
Finding Today's Date.
Writing SQL with SQL.
GRANTing Permissions.
Removing Junk Objects.
Removing Junk Objects.
Creating Test Data.
Summary.
Appendix A. Understanding the Sample.
In This Appendix.
MegaSysDataProNet Co.
Collecting the CREATE Scripts.
Explaining the INSERT Scripts.
Experimenting and Transaction Management.
Removing Data and Objects: DROP and DELETE Commands.
Summary.
MegaSysDataProNet Co.
Collecting the CREATE Scripts.
Adaptive Server Anywhere.
Sybase Adaptive Server Enterprise.
Microsoft SQL Server.
Oracle.
Informix.
Sybase Adaptive Server Enterprise.
Microsoft SQL Server.
Oracle.
Informix.
Explaining the INSERT Scripts.
INSERT INTO customer.
INSERT INTO supplier.
INSERT INTO product.
INSERT INTO employee.
INSERT INTO ordermaster.
INSERT INTO orderdetail.
INSERT INTO supplier.
INSERT INTO product.
INSERT INTO employee.
INSERT INTO ordermaster.
INSERT INTO orderdetail.
Experimenting and Transaction Management.
Removing Data and Objects: DROP and DELETE Commands.
Remove Database.
DROP Commands.
DELETE FROM Command.
DROP Commands.
DELETE FROM Command.
Summary.
Appendix B. Comparing Datatypes and Functions.
In This Appendix.
Comparatively Speaking.
Datatype Comparison.
Function Comparison.
Join Syntax Comparison.
Notes on Environment and Display.
Summary.
Comparatively Speaking.
Datatype Comparison.
Function Comparison.
Character (String) Functions.
Number Functions.
Date Functions.
Conditional Functions.
Sequential Number Methods.
Row Number and Row ID Methods.
Other Functions.
Tuning Functions.
System Functions.
Number Functions.
Date Functions.
Conditional Functions.
Sequential Number Methods.
Row Number and Row ID Methods.
Other Functions.
Tuning Functions.
System Functions.
Join Syntax Comparison.
Notes on Environment and Display.
Summary.
Appendix C. Using Resources.
In This Appendix.
Books.
Web Sites.
Database Vendors.
Newsgroups.
Books.
General.
Informix.
Microsoft SQL Server.
mSQL/MySQL.
Oracle.
Sybase.
Transact-SQL.
Informix.
Microsoft SQL Server.
mSQL/MySQL.
Oracle.
Sybase.
Transact-SQL.
Web Sites.
Database Vendors.
Other Offerings.
Newsgroups.
Index. 0201616386T04062001
