Book description
SQL for Smarties was hailed as the first book devoted explicitly to the advanced techniques needed to transform an experienced SQL programmer into an expert. Now, 20 years later and in its fifth edition, this classic reference still reigns supreme as the only book written by a SQL master that teaches programmers and practitioners to become SQL masters themselves! These are not just tips and techniques; also offered are the best solutions to old and new challenges. Joe Celko conveys the way you need to think in order to get the most out of SQL programming efforts for both correctness and performance. New to the fifth edition, Joe features new examples to reflect the ANSI/ISO Standards so anyone can use it. He also updates data element names to meet new ISO-11179 rules with the same experience-based teaching style that made the previous editions the classics they are today. You will learn new ways to write common queries, such as finding coverings, partitions, runs in data, auctions and inventory, relational divisions and so forth. SQL for Smarties explains some of the principles of SQL programming as well as the code. A new chapter discusses design flaws in DDL, such as attribute splitting, non-normal forum redundancies and tibbling. There is a look at the traditional acid versus base transaction models, now popular in NoSQL products. You’ll learn about computed columns and the DEFERRABLE options in constraints. An overview of the bi-temporal model is new to this edition and there is a longer discussion about descriptive statistic aggregate functions. The book finishes with an overview of SQL/PSM that is applicable to proprietary 4GL vendor extensions.
- New to the 5th Edition:
- Overview of the bitemporal model
- Extended coverage of descriptive statistic aggregate functions
- New chapter covers flaws in DDL
- Examination of traditional acid versus base transaction models
- Reorganized to help you navigate related topics with ease
- Expert advice from a noted SQL authority and award-winning columnist Joe Celko, who served on the ANSI SQL standards committee for over a decade
- Teaches scores of advanced techniques that can be used with any product, in any SQL environment, whether it is SQL 92 or SQL 2011
- Offers tips for working around deficiencies and gives insight into real-world challenges
Table of contents
- Cover image
- Title page
- Table of Contents
- Copyright
- Dedication
- Introduction to the Fifth Edition
-
Part 1: Data Declaration Features
- Chapter 1: Databases Versus File Systems
-
Chapter 2: Transactions and Concurrency Control
- Abstract
- 2.1 Sessions
- 2.2 Transactions and ACID
- 2.3 Concurrency Control
- 2.4 The Isolation Levels
- 2.5 Pessimistic Concurrency Control
- 2.6 SNAPSHOT Isolation Optimistic Concurrency
- 2.7 Logical Concurrency Control
- 2.8 CAP Theorem
- 2.9 BASE
- 2.10 Server-Side Consistency
- 2.11 Error Handling
- 2.12 Deadlock and Livelocks
- Chapter 3: Tables
- Chapter 4: Keys, Locators, and Generated Values
-
Chapter 5: Normalization
- Abstract
- 5.1 Functional and Multivalued Dependencies
- 5.2 First Normal Form (1NF)
- 5.3 Second Normal Form (2NF)
- 5.4 Third Normal Form (3NF)
- 5.5 Elementary Key Normal Form (EKNF)
- 5.6 Boyce-Codd Normal Form (BCNF)
- 5.7 Fourth Normal Form (4NF)
- 5.8 Fifth Normal Form (5NF)
- 5.9 Domain-Key Normal Form (DKNF)
- 5.10 Practical Hints for Normalization
- 5.11 Non-Normal Form Redundancy
- Chapter 6: VIEWs, Derived, and Other Virtual Tables
- Chapter 7: Auxiliary Tables
- Chapter 8: Other Schema Objects
- Chapter 9: DDL Flaws to Avoid
- Part 2: Data Types
-
Part 3: Row and Column Level Features
- Chapter 17: Comparison or Theta Operators
- Chapter 18: Subquery Predicates
- Chapter 19: BETWEEN and OVERLAPS Predicates
- Chapter 20: CASE Expression Family
- Chapter 21: LIKE and SIMILAR TO Predicates
- Chapter 22: Basic SELECT Statement
- Chapter 23: Basic Aggregate Functions
- Chapter 24: Advance Descriptive Statistics
- Chapter 25: OLAP Aggregation in SQL
- Chapter 26: Advanced SELECT Statements
-
Part 4: Data Structures in SQL
- Chapter 27: Graphs in SQL
-
Chapter 28: Trees and Hierarchies in SQL
- Abstract
- 28.1 Adjacency List Model
- 28.2 Finding the Root Node
- 28.3 Finding Leaf Nodes
- 28.4 Finding Levels in a Tree
- 28.5 Tree Operations
- 28.6 Nested Sets Model
- 28.7 Finding Root and Leaf Nodes
- 28.8 Finding Subtrees
- 28.9 Finding Levels and Paths in a Tree
- 28.10 Functions in the Nested Sets Model
- 28.11 Deleting Nodes and Subtrees
- 28.12 Summary Functions on Trees
- 28.13 Inserting and Updating Trees
- 28.14 Converting Adjacency List to Nested Sets Model
- 28.15 Converting Nested Sets to Adjacency List Model
- 28.16 Comparing Nodes and Structure
- Chapter 29: Queues
- Chapter 30: Matrices in SQL
-
Part 5: Typical Queries
- Chapter 31: Partitioning and Aggregating Data in Queries
-
Chapter 32: Sub-sequences, Regions, Runs, Gaps, and Islands
- Abstract
- 32.1 Finding Subregions of Size (n)
- 32.2 Numbering Regions
- 32.3 Finding Regions of Maximum Size
- 32.4 Bound Queries
- 32.5 Run and Sequence Queries
- 32.6 Summation of a Handmade Series
- 32.7 Swapping and Sliding Values in a List
- 32.8 Condensing a List of Numbers
- 32.9 Folding a List of Numbers
- 32.10 Coverings
- 32.11 Equivalence Classes and Cliques
- Chapter 33: Auctions
- Chapter 34: Relational Division
- Chapter 35: Temporal Queries
- Part 6: Implementation and Coding Issues
- Index
Product information
- Title: Joe Celko's SQL for Smarties, 5th Edition
- Author(s):
- Release date: December 2014
- Publisher(s): Morgan Kaufmann
- ISBN: 9780128008300
You might also like
book
Joe Celko's Trees and Hierarchies in SQL for Smarties, 2nd Edition
The demand for SQL information and training continues to grow with the need for a database …
book
SQL and Relational Theory, 3rd Edition
SQL is full of difficulties and traps for the unwary. You can avoid them if you …
book
SQL: A Beginner's Guide, Fourth Edition, 4th Edition
This fully revised, self-paced learning tool lays out all the necessary steps to quickly and easily …
book
The Language of SQL, 3rd Edition
Get Started Fast with SQL! The only book you need to gain a quick working knowledge …