SQL Cookbook (Cookbooks (O'Reilly)) [Paperback] Author: Anthony Molinaro | Language: English | ISBN:
0596009763 | Format: PDF, EPUB
SQL Cookbook ) Epub FreeYou can download SQL Cookbook ) Epub Free for everyone book mediafire, rapishare, and mirror link
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.
Direct download links available for SQL Cookbook (Cookbooks (O'Reilly)) [Paperback] Epub Free
- Series: Cookbooks (O'Reilly)
- Paperback: 636 pages
- Publisher: O'Reilly Media; 1 edition (December 23, 2005)
- Language: English
- ISBN-10: 0596009763
- ISBN-13: 978-0596009762
- Product Dimensions: 9.1 x 6.9 x 1.4 inches
- Shipping Weight: 2.3 pounds (View shipping rates and policies)
Ultimately, the goal of this book is to give you a glimpse of what can be done using SQL outside of what is considered the typical SQL problem domain. This text is unique in that the target audience is wide, incorporating all levels of SQL programmers as well as those who are completely unfamiliar with SQL.
Both complex and simple solutions are provided, and solutions for five different vendors are available when a common solution does not exist. These five databases are DB2 v.8, Oracle Database 10g (with the exception of a handful of recipes, the solutions will work for Oracle8i Database and Oracle9i Database as well), PostgreSQL 8, SQL Server 2005 and MySQL 5. All of the examples are built around a small set of tables containing employee data. This helps the reader get familiar with the example data, so that, having become familiar with the data, you can focus on the technique that each recipe illustrates.
Chapter 1, Retrieving Records, introduces very simple queries. Examples include how to use a WHERE clause to restrict rows from your result set, providing aliases for columns in your result set, using an inline view to reference aliased columns, using simple conditional logic, limiting the number of rows returned by a query, returning random records, and finding NULL values. Most of the examples are very simple, but some of them appear in later more complex recipes, so it's a good idea to read this chapter if you're relatively new to SQL or aren't familiar with any of the examples listed for this chapter.
Chapter 2, Sorting Query Results, introduces recipes for sorting query results. The ORDER BY clause is introduced and is used to sort query results.
It doesn't take long to learn the basics of SQL. Once you start to do multi-table joins and you get to sub-selects and outer joins you can almost convince yourself you are an expert. Trust me. You aren't. I've read at least ten books on using SQL. This is the first one to blow my horizons away and open a completely new landscape.
The "recipies" are well explained and almost entirely practical and useful. This book showed me dozens of things I did not ever think of using SQL for, even though I have the BNF for SQL pretty much in my head after more than 18 years of being a practicing programmer.
Before this book I used to recommend "generic" SQL books to students and newbies because such books apply to virtually all SQL databases and it can be harmful for one to use a specific "dialect" (such as Oracle or SQL Server) that won't port to other SQL databases. I would urge people to learn "generic" SQL. You can always add the features of you specific dialect, but it is hard to give up features you assume will be in all dialects.
This book neatly avoids that problem by providing dialect-specific sections when you can or must code differently for a particular database. Even better, they explain the differences and the pros and cons of those differences. So this book can even be an aid to selecting the "right" database for your application.
I happen to be a fan of Open Source and Free Software and I'm pleased to say that this book covers both MySQL and PostgreSQL. Naturally it provides the "big three" of Oracle, Microsoft SQL Server, and IBM's DB2.
This book really opened my eyes to possibilities in SQL that I really didn't know existed in spite of the fact that I have been using the language (apparently without mastering it) for almost two decades.
Book Preview
SQL Cookbook ) Download
Please Wait...