首 页
培 训
教 程
QQ群
首页->所有类别->计算机类->数据库->SQL语言  -> Beginning SQL Queries. From Novice to Professional
搜索: 搜索资料简介

Beginning SQL Queries. From Novice to Professional

Beginning SQL Queries. From Novice to Professional
【推荐级别】 ☆☆☆☆☆   查看网友评价
【下载次数】  105 次
【作者】 Clare Churcher   【出版社】  Apress  
【文件格式】  PDF   【ISBN】  9781590599433  
【资料语言】  英文   【文件大小】 9.15MB  
【上传时间】 2008-04-30   【共享者】  greatcode  查看他还共享了哪些书籍  
资料说明:
Beginning SQL Queries. From Novice to Professional

Author: Clare Churcher
Publisher: Apress
Number Of Pages: 240
Publication Date: 2008-04-09
ISBN-10/ASIN: 1590599438
ISBN-13/EAN: 9781590599433
Binding: Paperback


Clare Churcher's Beginning SQL Queries is your guide to mastering the lingua franca of the database industry: the SQL language. Good knowledge of SQL is crucial to anyone working with databases, because it is with SQL that you retrieve data, manipulate data, and generate business results. Knowing how to write good queries is the foundation for all work done in SQL, and it is a foundation that Clare lays well in her book.

Does not bore with syntax!
Helps you learn the underlying concepts involved in querying a database, and from there the syntax is easy
Provides exceptionally clear examples and explanations
Is academically sound while being practical and approachable


What you'll learn?
Write simple queries to extract data from a single table.
Understand relational algebra and calculus and why they are important.
Combine data from many tables into one business result.
Avoid pitfalls and traps such as Cartesian products and difficulties with null values.
Summarize large amounts of data for reporting purposes.
Apply set theory to the problems of manipulating data and generating reports.


Who is this book for?
Beginning SQL Queries is aimed at intelligent laypeople who need to extract information from a database, and at developers and other IT people who are new to SQL. The book is especially useful for business intelligence analysts who must ask more complex questions of their database than their GUI–based reporting software supports. Such people might be business owners wanting to target specific customers, scientists and students needing to extract subsets of their research data, or end users wanting to make the best use of databases for their clubs and societies.


About the Apress Beginning Series
The Beginning series from Apress is the right choice to get the information you need to land that crucial entry–level job. These books will teach you a standard and important technology from the ground up because they are explicitly designed to take you from “novice to professional.” You'll start your journey by seeing what you need to know—but without needless theory and filler. You'll build your skill set by learning how to put together real–world projects step by step. So whether your goal is your next career challenge or a new learning opportunity, the Beginning series from Apress will take you there—it is your trusted guide through unfamiliar territory!


Related Titles
Beginning Database Design: From Novice to Professional
Date on Database: Writings 2000-2006
Applied Mathematics for Database Professionals


Contents
Beginning SQL Queries: From Novice to Professional 1
Contents at a Glance 7
Contents 9
About the Author 15
About the Technical Reviewer 17
Acknowledgments 19
Introduction 21
Unknown
Two-Pronged Approach 21
Who This Book Is For 22
Objective of This Book 22
Relational Database Overview 23
What Is a Relational Database? 23
Introducing Data Models 24
Introducing Tables 26
Inserting and Updating Rows in a Table 27
Designing Appropriate Tables 29
Maintaining Consistency Between Tables 31
Retrieving Information from a Database 32
Relational Algebra: Specifying the Operations 33
Relational Calculus: Specifying the Result 35
Why Do We Need Both Algebra and Calculus? 36
Summary 37
Simple Queries on One Table 39
Retrieving a Subset of Rows 42
Relational Algebra for Retrieving Rows 42
Relational Calculus for Retrieving Rows 42
SQL for Retrieving Rows 43
Retrieving a Subset of Columns 44
Relational Algebra for Retrieving Columns 44
Relational Calculus for Retrieving Columns 44
SQL for Retrieving Columns 45
Using Aliases 45
Combining Subsets of Rows and Columns 46
Saving Queries 47
Specifying Conditions for Selecting Rows 47
Comparison Operators 48
Logical Operators 49
Dealing with Nulls 51
Comparing Null Values 53
Finding Nulls 54
Managing Duplicates 54
Ordering Output 57
Performing Simple Counts 57
Avoiding Common Mistakes 58
Misusing Select to Answer Questions with the Word fbothf 60
Misusing Select Operations to Answer Questions with the Word fiotf 61
Summary 61
A First Look at Joins 63
Joins in Relational Algebra 63
Cartesian Product 63
Inner Join 65
SQL for Cartesian Product and Join 66
Joins in Relational Calculus 67
Extending Join Queries 68
An Algebra Approach 69
Order of Algebra Operations 72
A Calculus Approach 73
Expressing Joins Through Diagrammatic Interfaces 75
Other Types of Joins 76
Summary 80
Nested Queries 83
IN Keyword 83
Using IN with a Nested Query 84
Being Careful with NOT and <> 86
EXISTS Keyword 89
Different Types of Nesting 91
Inner Queries Returning a Single Value 92
Inner Queries Returning a Set of Values 94
Inner Queries Checking for Existence 94
Using Nested Queries for Updating 95
Summary 97
Self Joins 99
Self Relationships 99
Creating a Self Join 101
Queries Involving a Self Join 102
What Are the Names of the Coaches? 103
Who Is Being Coached by Someone with a Higher Handicap? 103
List the Names of All the Members and the Names of Their Coaches 103
Who Coaches the Coaches, or Who Is My Grandmother? 105
A Calculus Approach to Self Joins 107
Questions Involving fiBthf 110
A Calculus Approach to Questions Involving fiothf 112
An Algebra Approach to Questions Involving fiothf 113
Summary 114
Self Relationships 114
Questions Involving the Word fBothf 115
More Than One Relationship Between Tables 117
Representing Multiple Relationships Between Tables 117
Algebra Approach to Two Relationships Between Tables 119
Calculus Approach to Two Relationships Between Tables 123
Business Rules 124
Summary 127
Set Operations 129
Overview of Basic Set Operations 130
Union-Compatible Tables 131
Union 133
Ensuring Union Compatibility 134
Selecting the Appropriate Columns 135
Uses for Union 136
Intersection 139
Uses of Intersection 139
The Importance of Projecting Appropriate Columns 142
Managing Without the INTERSECT Keyword 144
Difference 145
Uses of Difference 146
Managing Without the EXCEPT Keyword 148
Division 149
Projecting Appropriate Columns 151
SQL for Division 152
Summary 154
Aggregate Operations 155
Simple Aggregates 155
The COUNT Function 155
The AVG Function 158
Other Aggregate Functions 160
Grouping 161
Filtering the Result of an Aggregate Query 165
Using Aggregates to Perform Division Operations 167
Nested Queries and Aggregates 169
Summary 172
Efficiency Considerations 175
Indexes 175
Types of Indexes 176
Indexes for Efficiently Ordering Output 179
Indexes and Joins 180
What Should We Index? 182
Query Optimizer 183
What Does the Query Optimizer Consider? 183
Does the Way We Express the Query Matter? 184
Summary 189
How to Approach a Query 191
Understanding the Data 191
Determine the Relationships Between Tables 191
The Conceptual Model vs. the Implementation 193
What Tables Are Involved? 195
Look at Some Data Values 196
Big Picture Approach 196
Combine the Tables 197
Find the Subset of Rows 198
Retain the Appropriate Columns 199
Consider an Intermediate View 200
Spotting Key Words in Questions 201
And, Both, Also 201
Not, Never 204
All, Every 205
No Idea Where to Start? 205
Find Some Helpful Tables 205
Try to Answer the Question by Hand 205
Write Down a Description of the Retrieved Result 206
Is There Another Way? 207
Checking Queries 208
Check a Row That Should Be Returned 209
Check a Row That Should Not Be Returned 209
Check Boundary Conditions 209
Check Null Values 210
Summary 210
Common Problems 213
Poor Database Design 213
Data That Is Not Normalized 213
No Keys 216
Similar Data in Two Tables 217
Wrong Types 218
Problems with Data Values 219
Unexpected Nulls 219
Wrong or Inconsistent Spelling 219
Extraneous Characters in Text Fields 220
Inconsistent Case in Text Fields 221
Diagnosing Problems 222
Check Parts of Nested Queries Independently 223
Understand How the Tables Are Being Combined 223
Remove Extra WHERE Clauses 223
Retain All the Columns 224
Check Underlying Queries in Aggregates 224
Common Symptoms 224
No Rows Are Returned 224
Rows Are Missing 225
Should You Have an Outer Join? 225
Have Selection Conditions Dealt with Nulls Appropriately? 225
Are You Looking for a Match with a Text Value? 226
Have You Used AND Instead of OR? 226
Do You Have Correct Columns in Set Operations? 227
More Rows Than There Should Be 227
Did You Use NOT Instead of Difference? 227
Have You Dealt with Duplicates Appropriately? 228
Statistics or Aggregates Incorrect 229
The Order Is Wrong 229
Common Typos and Syntax Problems 229
Summary 230
Sample Database 231
Index 233

资料下载
打开下载链接  点此链接需花费积分5分。如何获取积分
注册新会员 积分不够?请用手机短信充值
·请先登录 ,然后下载
·下载后,您的积分会减少5分
·48小时内重复下载该资料不另外扣分
·下载前,请先阅读下载声明
·管理员对书籍只进行了初步审核,如果您发现该书违反了分享规则,请向管理员投诉!
 
·本服务的所有资料文件是其作者提供和网友推荐收集整理的,如有侵犯版权敬请指出。
·所有资料文件的准确性、安全性和完整性未经验证,NetYi不承担用户因使用这些下载内容而造成的任何形式的损失或伤害。
    会员登录

客户服务
    
电话:028-66868000
         13568916094
下班时间请点击此处留言
    注:客服服务时间为周一至周五09:00—17:30,周六周日休息。

客服QQ: 506123380   562029233   15636140   客服电话:028-66868000   13568916094
得益网(NetYi.net) 版权所有 蜀ICP证050487号