Muutke küpsiste eelistusi

Learning SQL: Generate, Manipulate, and Retrieve Data 3rd Revised edition [Pehme köide]

  • Formaat: Paperback / softback, 380 pages, kõrgus x laius: 235x191 mm
  • Ilmumisaeg: 28-Apr-2020
  • Kirjastus: O'Reilly Media
  • ISBN-10: 1492057614
  • ISBN-13: 9781492057611
Teised raamatud teemal:
  • Pehme köide
  • Hind: 63,19 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Tavahind: 74,34 €
  • Säästad 15%
  • Raamatu kohalejõudmiseks kirjastusest kulub orienteeruvalt 2-4 nädalat
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Tellimisaeg 2-4 nädalat
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 380 pages, kõrgus x laius: 235x191 mm
  • Ilmumisaeg: 28-Apr-2020
  • Kirjastus: O'Reilly Media
  • ISBN-10: 1492057614
  • ISBN-13: 9781492057611
Teised raamatud teemal:

As more and more data floods into your company, you need to put it to work right away&;and SQL is a vital tool for getting the job done. With the latest edition of this introductory guide, author Alan Beaulieu helps developers quickly get up to speed with SQL fundamentals for writing database applications, performing administrative tasks, and generating reports. You&;ll find new chapters on SQL and big data, working with very large databases, and analytic functions.

Each chapter presents a self-contained lesson on a key SQL concept or technique using numerous illustrations and annotated examples. Exercises at the end of each chapter let you practice the skills you learn. Knowledge of SQL is a must for interacting with data. With Learning SQL, you&;ll quickly learn how to put the power and flexibility of this language to work.

With this book, you&;ll:

  • Move quickly through SQL basics and learn several advanced features
  • Use SQL data statements to generate, manipulate, and retrieve data
  • Create database objects, such as tables, indexes, and constraints, using SQL schema statements
  • Learn how datasets interact with queries and understand the importance of subqueries
  • Convert and manipulate data with SQL's built-in functions and use conditional logic in data statements


Preface xi
1 A Little Background
1(16)
Introduction to Databases
1(7)
Nonrelational Database Systems
2(3)
The Relational Model
5(2)
Some Terminology
7(1)
What Is SQL?
8(5)
SQL Statement Classes
9(1)
SQL: A Nonprocedural Language
10(1)
SQL Examples
11(2)
What Is MySQL?
13(1)
SQL Unplugged
14(1)
What's in Store
15(2)
2 Creating and Populating a Database
17(28)
Creating a MySQL Database
17(1)
Using the mysql Command-Line Tool
18(2)
MySQL Data Types
20(7)
Character Data
20(3)
Numeric Data
23(2)
Temporal Data
25(2)
Table Creation
27(6)
Step 1 Design
27(1)
Step 2 Refinement
28(2)
Step 3 Building SQL Schema Statements
30(3)
Populating and Modifying Tables
33(6)
Inserting Data
33(5)
Updating Data
38(1)
Deleting Data
38(1)
When Good Statements Go Bad
39(2)
Nonunique Primary Key
39(1)
Nonexistent Foreign Key
39(1)
Column Value Violations
40(1)
Invalid Date Conversions
40(1)
The Sakila Database
41(4)
3 Query Primer
45(22)
Query Mechanics
45(2)
Query Clauses
47(1)
The select Clause
48(5)
Column Aliases
50(1)
Removing Duplicates
51(2)
The from Clause
53(5)
Tables
53(3)
Table Links
56(1)
Defining Table Aliases
57(1)
The where Clause
58(2)
The group by and having Clauses
60(1)
The order by Clause
61(4)
Ascending Versus Descending Sort Order
63(1)
Sorting via Numeric Placeholders
64(1)
Test Your Knowledge
65(2)
Exercise 3-1
65(1)
Exercise 3-2
65(1)
Exercise 3-3
65(1)
Exercise 3-4
65(2)
4 Filtering
67(20)
Condition Evaluation
67(3)
Using Parentheses
68(1)
Using the not Operator
69(1)
Building a Condition
70(1)
Condition Types
71(11)
Equality Conditions
71(2)
Range Conditions
73(4)
Membership Conditions
77(2)
Matching Conditions
79(3)
Null: That Four-Letter Word
82(3)
Test Your Knowledge
85(2)
Exercise 4-1
86(1)
Exercise 4-2
86(1)
Exercise 4-3
86(1)
Exercise 4-4
86(1)
5 Querying Multiple Tables
87(14)
What Is a Join?
87(6)
Cartesian Product
88(1)
Inner Joins
89(2)
The ANSI Join Syntax
91(2)
Joining Three or More Tables
93(5)
Using Subqueries as Tables
95(1)
Using the Same Table Twice
96(2)
Self-Joins
98(1)
Test Your Knowledge
99(2)
Exercise 5-1
99(1)
Exercise 5-2
99(1)
Exercise 5-3
100(1)
6 Working with Sets
101(14)
Set Theory Primer
101(3)
Set Theory in Practice
104(1)
Set Operators
105(6)
The union Operator
106(2)
The intersect Operator
108(1)
The except Operator
109(2)
Set Operation Rules
111(3)
Sorting Compound Query Results
111(1)
Set Operation Precedence
112(2)
Test Your Knowledge
114(1)
Exercise 6-1
114(1)
Exercise 6-2
114(1)
Exercise 6-3
114(1)
7 Data Generation, Manipulation, and Conversion
115(32)
Working with String Data
115(14)
String Generation
116(5)
String Manipulation
121(8)
Working with Numeric Data
129(5)
Performing Arithmetic Functions
129(2)
Controlling Number Precision
131(2)
Handling Signed Data
133(1)
Working with Temporal Data
134(10)
Dealing with Time Zones
134(2)
Generating Temporal Data
136(4)
Manipulating Temporal Data
140(4)
Conversion Functions
144(1)
Test Your Knowledge
145(2)
Exercise 7-1
145(1)
Exercise 7-2
145(1)
Exercise 7-3
145(2)
8 Grouping and Aggregates
147(14)
Grouping Concepts
147(3)
Aggregate Functions
150(5)
Implicit Versus Explicit Groups
151(1)
Counting Distinct Values
152(1)
Using Expressions
153(1)
How Nulls Are Handled
153(2)
Generating Groups
155(4)
Single-Column Grouping
155(1)
Multicolumn Grouping
156(1)
Grouping via Expressions
157(1)
Generating Rollups
157(2)
Group Filter Conditions
159(1)
Test Your Knowledge
160(1)
Exercise 8-1
160(1)
Exercise 8-2
160(1)
Exercise 8-3
160(1)
9 Subqueries
161(26)
What Is a Subquery?
161(2)
Subquery Types
163(1)
Noncorrelated Subqueries
163(8)
Multiple-Row, Single-Column Subqueries
164(5)
Multicolumn Subqueries
169(2)
Correlated Subqueries
171(4)
The exists Operator
173(1)
Data Manipulation Using Correlated Subqueries
174(1)
When to Use Subqueries
175(9)
Subqueries as Data Sources
176(6)
Subqueries as Expression Generators
182(2)
Subquery Wrap-Up
184(1)
Test Your Knowledge
185(2)
Exercise 9-1
185(1)
Exercise 9-2
185(1)
Exercise 9-3
185(2)
10 Joins Revisited
187(14)
Outer Joins
187(5)
Left Versus Right Outer Joins
190(1)
Three-Way Outer Joins
191(1)
Cross Joins
192(6)
Natural Joins
198(1)
Test Your Knowledge
199(2)
Exercise 10-1
200(1)
Exercise 10-2
200(1)
Exercise 10-3 (Extra Credit)
200(1)
11 Conditional Logic
201(12)
What Is Conditional Logic?
201(1)
The case Expression
202(3)
Searched case Expressions
202(2)
Simple case Expressions
204(1)
Examples of case Expressions
205(6)
Result Set Transformations
205(1)
Checking for Existence
206(2)
Division-by-Zero Errors
208(1)
Conditional Updates
209(1)
Handling Null Values
210(1)
Test Your Knowledge
211(2)
Exercise 11-1
211(1)
Exercise 11-2
211(2)
12 Transactions
213(10)
Multiuser Databases
213(2)
Locking
214(1)
Lock Granularities
214(1)
What Is a Transaction?
215(7)
Starting a Transaction
217(1)
Ending a Transaction
218(1)
Transaction Savepoints
219(3)
Test Your Knowledge
222(1)
Exercise 12-1
222(1)
13 Indexes and Constraints
223(16)
Indexes
223(10)
Index Creation
224(5)
Types of Indexes
229(2)
How Indexes Are Used
231(1)
The Downside of Indexes
232(1)
Constraints
233(4)
Constraint Creation
234(3)
Test Your Knowledge
237(2)
Exercise 13-1
237(1)
Exercise 13-2
237(2)
14 Views
239(12)
What Are Views?
239(3)
Why Use Views?
242(3)
Data Security
242(1)
Data Aggregation
243(1)
Hiding Complexity
244(1)
Joining Partitioned Data
244(1)
Updatable Views
245(4)
Updating Simple Views
246(1)
Updating Complex Views
247(2)
Test Your Knowledge
249(2)
Exercise 14-1
249(1)
Exercise 14-2
250(1)
15 Metadata
251(16)
Data About Data
251(1)
information_schema
252(5)
Working with Metadata
257(8)
Schema Generation Scripts
257(3)
Deployment Verification
260(1)
Dynamic SQL Generation
261(4)
Test Your Knowledge
265(2)
Exercise 15-1
265(1)
Exercise 15-2
265(2)
16 Analytic Functions
267(20)
Analytic Function Concepts
267(3)
Data Windows
268(1)
Localized Sorting
269(1)
Ranking
270(7)
Ranking Functions
271(3)
Generating Multiple Rankings
274(3)
Reporting Functions
277(7)
Window Frames
279(2)
Lag and Lead
281(2)
Column Value Concatenation
283(1)
Test Your Knowledge
284(3)
Exercise 16-1
284(1)
Exercise 16-2
285(1)
Exercise 16-3
285(2)
17 Working with Large Databases
287(16)
Partitioning
287(10)
Partitioning Concepts
288(1)
Table Partitioning
288(1)
Index Partitioning
289(1)
Partitioning Methods
289(8)
Partitioning Benefits
297(1)
Clustering
297(1)
Sharding
298(1)
Big Data
299(4)
Hadoop
299(1)
NoSQL and Document Databases
300(1)
Cloud Computing
300(1)
Conclusion
301(2)
18 SQL and Big Data
303(16)
Introduction to Apache Drill
303(1)
Querying Files Using Drill
304(2)
Querying MySQL Using Drill
306(3)
Querying MongoDB Using Drill
309(6)
Drill with Multiple Data Sources
315(2)
Future of SQL
317(2)
A ER Diagram for Example Database 319(2)
B Solutions to Exercises 321(28)
Index 349
Alan Beaulieu has been designing, building, and implementing custom database applications for over 25 years. He is the author of Learning SQL and Mastering Oracle SQL (O'Reilly), and has written an online course on SQL for the University of California. He currently runs his own consulting company that specializes in database design and development in the fields of Financial Services and Telecommunications. Alan has a Bachelor of Science degree in Operations Research from the Cornell University School of Engineering.