Muutke küpsiste eelistusi

E-raamat: Beginning SQL Queries: From Novice to Professional

  • Formaat: PDF+DRM
  • Ilmumisaeg: 06-Jul-2016
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484219553
Teised raamatud teemal:
  • Formaat - PDF+DRM
  • Hind: 61,74 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: PDF+DRM
  • Ilmumisaeg: 06-Jul-2016
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484219553
Teised raamatud teemal:

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Get started on mastering the one language binding the entire database industry. That language is SQL, and how it works is must-have knowledge for anyone involved with relational databases, and surprisingly also for anyone involved with NoSQL databases. SQL is universally used in querying and reporting on large data sets in order to generate knowledge to drive business decisions.

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. Every relational database supports SQL for its expressiveness in writing queries underlying reports and business intelligence dashboards. Knowing how to write good queries is the foundation for all work done in SQL, and it is a foundation that Clare Churcher's book, Beginning SQL Queries, 2nd Edition, lays well.









What You Will Learn

Write simple queries to extract datafrom a single table

Combine data from many tables into one business result using set operations

Translate natural language questions into database queries providing meaningful information to the business

Avoid errors associated with duplicated and null values

Summarize data with amazing ease using the newly-added feature of window functions

Tackle tricky queries with confidence that you are generating correct results

Investigate and understand the effects of indexes on the efficiency of queries



Who This Book Is For

Beginning SQL Queries, 2nd Edition is aimed at intelligent laypeople who need to extract information from a database, and at developers and other IT professionals 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 GUIbased reportingsoftware 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 Author xv
About the Technical Reviewer xvii
Acknowledgments xix
Introduction xxi
Chapter 1 Relational Database Overview
1(14)
Introducing Database Tables
1(5)
Attributes
2(1)
The Primary Key
3(1)
Inserting and Updating Rows in a Table
3(2)
Designing Appropriate Tables
5(1)
Introducing Data Models
6(3)
Retrieving Information from a Database
9(4)
Process Approach
10(1)
Outcome Approach
11(1)
Why We Consider Two Approaches
12(1)
Summary
13(2)
Chapter 2 Simple Queries on One Table
15(18)
Subsets of Rows and Columns
15(3)
Using Aliases
18(1)
Saving Queries
19(1)
Specifying Conditions for Selecting Rows
19(4)
Comparison Operators
19(2)
Logical Operators
21(2)
Dealing with Nulls
23(2)
Finding Nulls
24(1)
Comparisons Involving Null Values
24(1)
Managing Duplicates
25(3)
Ordering Output
28(1)
Performing Simple Counts
29(1)
Avoiding Common Mistakes
29(3)
Incorrectly Using a WHERE Clause to Answer Questions with the Word "both"
30(2)
Incorrectly Using a WHERE Clause to Answer Questions with the Word "not"
32(1)
Summary
32(1)
Chapter 3 A First Look at Joins
33(18)
The Process Approach to Joins
33(3)
Cartesian Product
33(2)
Inner Join
35(1)
Outcome Approach to Joins
36(2)
Extending Join Queries
38(6)
A Process Approach
39(2)
Order of Operations
41(1)
An Outcome Approach
42(1)
Expressing Joins Through Diagrammatic Interfaces
43(1)
Other Types of Joins
44(4)
Outer Joins
45(3)
Summary
48(3)
Chapter 4 Subqueries
51(16)
IN Keyword
51(1)
Using IN with Subqueries
52(2)
Being Careful with NOT and <>
54(3)
EXISTS Keyword
57(3)
Different Types of Subqueries
60(3)
Inner Queries Returning a Single Value
60(2)
Inner Queries Returning a Set of Values
62(1)
Inner Queries Checking for Existence
62(1)
Using Subqueries for Updating
63(1)
Summary
64(3)
Examples of Different Types of Subqueries
65(1)
Examples of Different Uses for Subqueries
66(1)
Chapter 5 Self Joins
67(18)
Self Relationships
67(12)
Creating a Self Join
70(1)
Queries Involving a Self Join
71(5)
An Outcome Approach to Self Joins
76(3)
Questions Involving "Both"
79(3)
An Outcome Approach to Questions Involving "Both"
80(1)
A Process Approach to Questions Involving "Both"
81(1)
Summary
82(3)
Self Relationships
82(1)
Questions Involving the Word "Both"
82(3)
Chapter 6 Multiple Relationships Between Tables
85(14)
Two Relationships Between the Same Tables
85(4)
Extracting Information from Multiple Relationships
89(5)
Process Approach
90(3)
Outcome Approach
93(1)
Business Rules
94(3)
Summary
97(2)
Chapter 7 Set Operations
99(30)
Overview of Basic Set Operations
99(2)
Union-Compatible Tables
101(4)
Ensuring Union Compatibility
104(1)
Union
105(6)
Selecting the Appropriate Columns
106(2)
Uses of Union
108(1)
Union and Full Outer Joins
109(2)
Intersection
111(7)
Uses of Intersection
112(3)
The Importance of Projecting Appropriate Columns
115(1)
Managing Without the INTERSECT Keyword
116(2)
Difference
118(4)
Uses of Difference
118(3)
Managing Without the EXCEPT Keyword
121(1)
Division
122(4)
Projecting Appropriate Columns
124(1)
SQL for Division
125(1)
Summary
126(3)
Union
127(1)
Intersection
127(1)
Difference
127(1)
Division
128(1)
Chapter 8 Aggregate Operations
129(18)
Simple Aggregate Functions
129(6)
The COUNT() Function
129(3)
The AVG() Function
132(2)
The ROUND() Function
134(1)
Other Aggregate Functions
135(1)
Grouping
135(9)
Filtering the Result of an Aggregate Query
140(2)
Using Aggregates to Perform Division Operations
142(2)
Nested Queries and Aggregates
144(2)
Summary
146(1)
Chapter 9 Window Functions
147(14)
Simple Aggregates
147(2)
Partitions
149(1)
Order By Clause
150(6)
Cumulative Aggregates
150(2)
Ranking
152(1)
Combining Ordering with Partitions
153(3)
Framing
156(3)
Summary
159(2)
OVER()
159(1)
OVER(PARTITION BY <...>)
159(1)
OVER(ORDER BY <...>)
159(1)
OVER(PARTITION BY <...> ORDER BY <...>)
159(1)
OVERSOWS BETWEEN <...> AND <...>)
159(2)
Chapter 10 Efficiency Considerations
161(14)
What Happens to a Query
161(2)
Finding a Record
163(5)
Storing Records in Order
163(1)
Clustered Index
164(1)
Non-Clustered Indexes
165(1)
Clustered Index on a Compound Key
166(1)
Updating Indexes
167(1)
Covering Indexes
168(1)
Selectivity of Indexes
168(1)
Join Techniques
168(5)
Nested Loops
169(1)
Merge Join
170(1)
Different SQL Expressions for Joins
171(2)
Summary
173(2)
Primary Key
173(1)
Foreign Keys
173(1)
WHERE Conditions
173(1)
Order By, Group By, And Distinct
173(1)
Use the Tools
173(2)
Chapter 11 How to Tackle a Query
175(20)
Understanding the Data
175(6)
Determine the Relationships Between Tables
175(3)
Real World Versus Implementation
178(2)
What Tables Are Involved?
180(1)
Look at Some Data Values
180(1)
Big Picture Method
181(3)
Combine the Tables
181(2)
Find the Subset of Rows
183(1)
Retain the Appropriate Columns
183(1)
Consider an Intermediate View
184(1)
Spotting Keywords in Questions
184(5)
And, Both, Also
185(2)
Not, Never
187(1)
All, Every
188(1)
No Idea Where to Start?
189(2)
Find Some Helpful Tables
189(1)
Try to Answer the Question by Hand
189(1)
Write Down a Description of the Retrieved Result
190(1)
Are There Alternatives?
190(1)
Checking Queries
191(2)
Check a Row That Should Be Returned
192(1)
Check a Row That Should Not Be Returned
192(1)
Check Boundary Conditions
192(1)
Check Null Values
193(1)
Summary
193(2)
Chapter 12 Common Problems
195(16)
Poor Database Design
195(6)
Data That Is Not Normalized
195(3)
Tables with No Primary Key
198(1)
Tables with Missing Foreign Keys
199(1)
Similar Data in Two Tables
199(1)
Inappropriate Types
200(1)
Problems with Data Values
201(2)
Unexpected Nulls
201(1)
Incorrect or Inconsistent Spelling
202(1)
Extraneous Characters in Text Fields
202(1)
Inconsistent Case in Text Fields
203(1)
Diagnosing Problems
203(2)
Check Parts of Nested Queries Independently
204(1)
Understand How the Tables Are Being Combined
204(1)
Remove Extra WHERE Clauses
204(1)
Retain All the Columns
204(1)
Check Underlying Queries in Aggregates
205(1)
Common Symptoms
205(4)
No Rows Are Returned
205(1)
Rows Are Missing
205(2)
More Rows Than There Should Be
207(1)
Incorrect Statistics or Aggregates
208(1)
The Order Is Wrong
209(1)
Common Typos and Syntax Problems
209(1)
Summary
210(1)
Appendix 1 Example Database
211(2)
Appendix 2 Relational Notation
213(20)
Introduction
213(3)
Relations, Tuples, and Attributes
214(2)
SQL, Algebra, and Calculus
216(1)
Relational Algebra: Specifying the Operations
216(9)
Select
217(1)
Project
218(1)
Combining Select and Project
218(1)
Cartesian Product
219(1)
Inner Join
220(1)
Union, Difference, and Intersection
221(2)
Division
223(2)
Relational Calculus: Specifying the Outcome
225(4)
Simple Calculus Expressions
225(1)
Free and Bound Variables
225(1)
Existential Quantifier and SQL
226(2)
Universal Quantifier and SQL
228(1)
An Example
229(4)
Algebra
229(1)
Calculus
230(1)
Conclusion
231(2)
Index 233
Clare Churcher (B.Sc. (Hons), Ph.D.(physics)) has designed several databases for a variety of large and small projects. She is a currently a Senior Lecturer and Development Manager for Applied IT at Tai Poutini Polytechnic.   She spent two years as a Business Analyst for a large international software development company, and prior to that nearly two decades as a senior faculty member of the Applied Computing Group at Lincoln University where her teaching included Analysis and Design, Database, and Programming papers. In 2006 she won a Lincoln University Excellence in Teaching Award.  She has supervised over 70 undergraduate projects designing databases for small projects.