
Joe Celko's SQL for Smarties
Advanced SQL Programming
- 5th Edition - December 2, 2014
- Author: Joe Celko
- Language: English
- Paperback ISBN:9 7 8 - 0 - 1 2 - 8 0 0 7 6 1 - 7
- eBook ISBN:9 7 8 - 0 - 1 2 - 8 0 0 8 3 0 - 0
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 lat… Read more

Purchase options

Institutional subscription on ScienceDirect
Request a sales quoteSQL 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
advanced SQL programmers and SQL developers. Students taking advanced SQL courses
- Dedication
- Introduction to the Fifth Edition
- What is New in this Edition
- Corrections and Additions
- Part 1: Data Declaration Features
- Chapter 1: Databases Versus File Systems
- Abstract
- 1.1 The Schema Statement
- 1.2 Tables as Entities
- 1.3 Tables as Relationships
- 1.4 Rows Versus Records
- 1.5 Columns Versus Fields
- 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
- Abstract
- 3.1 CREATE TABLE Statements
- 3.2 Column Definitions
- 3.3 Computed Columns
- 3.4 [NOT] DEFERRABLE Constraints
- 3.5 CREATE DOMAIN and CREATE SEQUENCE
- 3.6 Character Set Related Constructs
- Chapter 4: Keys, Locators, and Generated Values
- Abstract
- 4.1 Key Types
- 4.2 Practical Hints for Denormalization
- 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
- Abstract
- 6.1 VIEWs in Queries
- 6.2 Updatable and Read-Only VIEWs
- 6.3 Types of VIEWs
- 6.4 How VIEWs are Handled in the Database Engine
- 6.5 WITH CHECK OPTION Clause
- 6.6 Dropping VIEWs
- 6.7 Materialized Query Tables
- Chapter 7: Auxiliary Tables
- Abstract
- 7.1 Series Table
- 7.2 Look-up Auxiliary Tables
- 7.3 Advance Auxiliary Function Tables
- 7.4 Global Constants Tables
- 7.5 A Note on Converting Procedural Code to Tables
- Chapter 8: Other Schema Objects
- Abstract
- 8.1 CREATE SCHEMA Statement
- 8.2 Schema Tables
- 8.3 Temporary Tables
- 8.4 CREATE ASSERTION Statement
- 8.5 CREATE DOMAIN Statement
- 8.6 CREATE COLLATION Statement
- 8.7 CREATE TRANSLATION Statement
- 8.8 CREATE PROCEDURE Statement
- 8.9 TRIGGERs
- 8.10 The TRIGGER Model
- Chapter 9: DDL Flaws to Avoid
- Abstract
- 9.1 Tibbling and Related Errors
- 9.2 Attribute Splitting
- 9.3 Overloading Design Flaws
- 9.4 Non-Normal Form Redundancy
- Chapter 1: Databases Versus File Systems
- Part 2: Data Types
- Chapter 10: Numeric Data in SQL
- Abstract
- 10.1 Exact Numeric Data Types
- 10.2 Approximate Numeric Data Types
- 10.3 Numeric Type Conversions
- 10.4 Four Function Arithmetic
- 10.5 Converting Values to and from NULL
- 10.6 Mathematical Functions
- 10.7 IP Addresses
- Chapter 11: Character Data Types in SQL
- Abstract
- 11.1 Problems with SQL Strings
- 11.2 Standard String Functions
- 11.3 Common Vendor Extensions
- 11.4 Cutter Tables
- Chapter 12: Temporal Data Types in SQL
- Abstract
- 12.1 Notes on Calendar Standards
- 12.2 The Nature of Temporal Data Models
- 12.3 SQL Temporal Data Types
- 12.4 INTERVAL Data Types
- 12.5 Queries with Date Arithmetic
- 12.6 Use of NULL for “Eternity”
- 12.7 The OVERLAPS() Predicate
- 12.8 State-Transition Constraints
- 12.9 Calendar Tables
- Chapter 13: Multiple Column Data Elements
- Abstract
- 13.1 Vector and Coordinate Data Elements
- 13.2 Hierarchical Data Elements
- Chapter 14: NULLs—Missing Data in SQL
- Abstract
- 14.1 Empty and Missing Tables
- 14.2 Missing Values in Columns
- 14.3 Context and Missing Values
- 14.4 Comparing NULLs
- 14.5 NULLs and Logic
- 14.6 Math and NULLs
- 14.7 Functions for NULLs
- 14.8 NULLs and Host Languages
- 14.9 Design Advice for NULLs
- 14.10 A Note on Multiple NULL Values
- Chapter 15: Table Operations
- Abstract
- 15.1 DELETE FROM Statement
- 15.2 INSERT INTO Statement
- 15.3 The UPDATE Statement
- 15.4 A Note on Flaws in a Common Vendor Extension
- 15.5 MERGE Statement
- Chapter 16: Set Operations
- Abstract
- 16.1 UNION and UNION ALL
- 16.2 INTERSECT and EXCEPT
- 16.3 A Note on ALL and SELECT DISTINCT
- 16.4 Equality and Proper Subsets
- Chapter 10: Numeric Data in SQL
- Part 3: Row and Column Level Features
- Chapter 17: Comparison or Theta Operators
- Abstract
- 17.1 Converting Data Types
- 17.2 Row Comparisons in SQL
- 17.3 IS [NOT] DISTINCT FROM Operator
- 17.4 Monadic Operators
- Chapter 18: Subquery Predicates
- Abstract
- 18.1 The UNIQUE Predicate
- 18.2 The [NOT] IN() Predicate
- 18.3 [NOT] EXISTS() Predicate
- 18.4 < theta > [SOME
- Chapter 17: Comparison or Theta Operators
- No. of pages: 852
- Language: English
- Edition: 5
- Published: December 2, 2014
- Imprint: Morgan Kaufmann
- Paperback ISBN: 9780128007617
- eBook ISBN: 9780128008300
JC
Joe Celko
Mr. Celko is author a series of books on SQL and RDBMS for Elsevier/MKP. He is an independent consultant based in Austin, Texas.
He has written over 1200 columns in the computer trade and academic press, mostly dealing with data and databases.