SQL Cookbook: Query Solutions and Techniques for Database Developers

"O'Reilly Media, Inc."
11
Free sample

You know the rudiments of the SQL query language, yet you feel you aren't taking full advantage of SQL's expressive power. You'd like to learn how to do more work with SQL inside the database before pushing data across the network to your applications. You'd like to take your SQL skills to the next level.

Let's face it, SQL is a deceptively simple language to learn, and many database developers never go far beyond the simple statement: SELECT columns FROM table WHERE conditions. But there is so much more you can do with the language. In the SQL Cookbook, experienced SQL developer Anthony Molinaro shares his favorite SQL techniques and features. You'll learn about:



  • Window functions, arguably the most significant enhancement to SQL in the past decade. If you're not using these, you're missing out


  • Powerful, database-specific features such as SQL Server's PIVOT and UNPIVOT operators, Oracle's MODEL clause, and PostgreSQL's very useful GENERATE_SERIES function


  • Pivoting rows into columns, reverse-pivoting columns into rows, using pivoting to facilitate inter-row calculations, and double-pivoting a result set


  • Bucketization, and why you should never use that term in Brooklyn.


  • How to create histograms, summarize data into buckets, perform aggregations over a moving range of values, generate running-totals and subtotals, and other advanced, data warehousing techniques


  • The technique of walking a string, which allows you to use SQL to parse through the characters, words, or delimited elements of a string

Written in O'Reilly's popular Problem/Solution/Discussion style, the SQL Cookbook is sure to please. Anthony's credo is: "When it comes down to it, we all go to work, we all have bills to pay, and we all want to go home at a reasonable time and enjoy what's still available of our days." The SQL Cookbook moves quickly from problem to solution, saving you time each step of the way.

Read more

About the author

Anthony Molinaro is a SQL developer and database administrator with many years experience in helping developers improve their SQL queries. SQL is particular passion of Anthony's, and he's become known as the go-to guy among his clients when it comes to solving difficult SQL query problems. He's well-read, understands relational theory well, and has nine years of hands-on experience solving tough, SQL problems. Anthony is particularly well-acquainted with new and powerful SQL features such as the windowing function syntax that was added to the most recent SQL standard.

Read more
4.4
11 total
Loading...

Additional Information

Publisher
"O'Reilly Media, Inc."
Read more
Published on
Dec 16, 2005
Read more
Pages
636
Read more
ISBN
9780596555016
Read more
Language
English
Read more
Genres
Computers / Databases / Data Mining
Computers / Databases / Data Warehousing
Computers / Databases / General
Computers / General
Computers / Programming Languages / SQL
Read more
Content Protection
This content is DRM free.
Read more
Read Aloud
Available on Android devices
Read more
Eligible for Family Library

Reading information

Smartphones and Tablets

Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.

Laptops and Computers

You can read books purchased on Google Play using your computer's web browser.

eReaders and other devices

To read on e-ink devices like the Sony eReader or Barnes & Noble Nook, you'll need to download a file and transfer it to your device. Please follow the detailed Help center instructions to transfer the files to supported eReaders.
This unique cookbook contains a wealth of solutions to problems that SQL programmers face all the time. The recipes inside range from how to perform simple tasks, like importing external data, to ways of handling issues that are more complicated, like set algebra. Authors Ales Spetic and Jonathan Gennick, two authorities with extensive database and SQL programming experience, include a discussion with each recipe to explain the logic and concepts underlying the solution.SQL (Structured Query Language) is the closest thing to a standard query language that currently exists, and Transact-SQL -- a full-featured programming language that dramatically extends the power of SQL -- is the procedural language of choice for both Microsoft SQL Server and Sybase SQL Server systems. The Transact-SQL Cookbook is designed so you can use the recipes directly, as a source of ideas, or as a way to learn a little more about SQL and what you can do with it. Topics covered include:Audit logging. In addition to recipes for implementing an audit log, this chapter also includes recipes for: improving performance where large log tables are involved; supporting multiple-languages; and simulating server push.Hierarchies. Recipes show you how to manipulate hierarchical data using Transact-SQL.Importing data. This chapter introduces concepts like normalization and recipes useful for working with imported data tables.Sets. Recipes demonstrate different operations, such as how to find common elements, summarize the data in a set, and find the element in a set that represents an extreme.Statistics. This chapter?s recipes show you how to effectively use SQL for common statistical operations from means and standard deviations to weighted moving averages.Temporal data. Recipes demonstrate how to construct queries against time-based data.Data Structures. This chapter shows how to manipulate data structures like stacks, queues, matrices, and arrays.With an abundance of recipes to help you get your job done more efficiently, the Transact-SQL Cookbook is sure to become an essential part of your library.

Sams Teach Yourself SQL in 10 Minutes, Fourth Edition

New full-color code examples help you see how SQL statements are structured


Whether you're an application developer, database administrator, web application designer, mobile app developer, or Microsoft Office users, a good working knowledge of SQL is an important part of interacting with databases. And Sams Teach Yourself SQL in 10 Minutes offers the straightforward, practical answers you need to help you do your job.


Expert trainer and popular author Ben Forta teaches you just the parts of SQL you need to know–starting with simple data retrieval and quickly going on to more complex topics including the use of joins, subqueries, stored procedures, cursors, triggers, and table constraints.


You'll learn methodically, systematically, and simply–in 22 short, quick lessons that will each take only 10 minutes or less to complete.


With the Fourth Edition of this worldwide bestseller, the book has been thoroughly updated, expanded, and improved. Lessons now cover the latest versions of IBM DB2, Microsoft Access, Microsoft SQL Server, MySQL, Oracle, PostgreSQL, SQLite, MariaDB, and Apache Open Office Base. And new full-color SQL code listings help the beginner clearly see the elements and structure of the language.

10 minutes is all you need to learn how to...

Use the major SQL statements Construct complex SQL statements using multiple clauses and operators Retrieve, sort, and format database contents Pinpoint the data you need using a variety of filtering techniques Use aggregate functions to summarize data Join two or more related tables Insert, update, and delete data Create and alter database tables Work with views, stored procedures, and more Table of Contents

1 Understanding SQL

2 Retrieving Data

3 Sorting Retrieved Data

4 Filtering Data

5 Advanced Data Filtering

6 Using Wildcard Filtering

7 Creating Calculated Fields

8 Using Data Manipulation Functions

9 Summarizing Data

10 Grouping Data

11 Working with Subqueries

12 Joining Tables

13 Creating Advanced Joins

14 Combining Queries

15 Inserting Data

16 Updating and Deleting Data

17 Creating and Manipulating Tables

18 Using Views

19 Working with Stored Procedures

20 Managing Transaction Processing

21 Using Cursors

22 Understanding Advanced SQL Features

Appendix A: Sample Table Scripts

Appendix B: Working in Popular Applications

Appendix C : SQL Statement Syntax

Appendix D: Using SQL Datatypes

Appendix E: SQL Reserved Words


Kuchařka programátora je vyčerpávající sbírkou návodů, řešení problémů a praktických příkladů. Stírá propast mezi obvykle teoretickými průvodci a reálnými programy pro praxi. Odhalí vám nová, univerzálnější řešení daných problémů a rozšíří vaše poznání SQL na ryze praktickém základě – bude neocenitelným pomocníkem každého databázového vývojáře v SQL v každodenní praxi. Kniha pokrývá oblasti od základních operací s tabulkami a daty přes vyhledávání a zpracování jeho výsledků až po komplikované složené dotazy pracující s několika tabulkami. Některé kapitoly jsou věnovány i operacím se specifickými datovými typy. V knize naleznete konkrétní a úplné recepty například pro: - Přístup k záznamům v databázi - Řazení výsledků hledání - Efektivní práci s více tabulkami - Počítání s daty kalendáře - Modifikaci uložených dat, práci s metadaty - Maximální využití operací s čísly i řetězci - Vytváření komplikovaných vyhledávacích a hierarchických dotazů - Práci s intervaly a datovými sklady Určeno pro SQL Server, PostgreSQL, Oracle, MySQL a DB2 O autorovi: Anthony Molinaro pracuje jako vývojář databází ve firmě Wireless Generation, Inc. Je odborníkem na jazyk SQL a má za sebou devět let zkušeností s každodenním řešením náročných problémů v tomto jazyce. Kromě vývoje databází se zabývá také podporou dalších vývojářů, kterým pomáhá při řešení databázových projektů.
©2018 GoogleSite Terms of ServicePrivacyDevelopersArtistsAbout Google|Location: United StatesLanguage: English (United States)
By purchasing this item, you are transacting with Google Payments and agreeing to the Google Payments Terms of Service and Privacy Notice.