HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Joe Celko's SQL for Smarties: Advanced SQL Programming (The Morgan Kaufmann Series in Data Management Systems)

Joe Celko · 7 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Joe Celko's SQL for Smarties: Advanced SQL Programming (The Morgan Kaufmann Series in Data Management Systems)" by Joe Celko.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
Joe Celkos SQL for Smarties: Advanced SQL Programming offers tips and techniques in advanced programming. This book is the fourth edition and it consists of 39 chapters, starting with a comparison between databases and file systems. It covers transactions and currency control, schema level objects, locating data and schema numbers, base tables, and auxiliary tables. Furthermore, procedural, semi-procedural, and declarative programming are explored in this book. The book also presents the different normal forms in database normalization, including the first, second, third, fourth, fifth, elementary key, domain-key, and Boyce-Codd normal forms. It also offers practical hints for normalization and denormalization. The book discusses different data types, such as the numeric, temporal and character data types; the different predicates; and the simple and advanced SELECT statements. In addition, the book presents virtual tables, and it discusses data partitions in queries; grouping operations; simple aggregate functions; and descriptive statistics, matrices and graphs in SQL. The book concludes with a discussion about optimizing SQL. It will be of great value to SQL programmers.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
Enough rope to shoot yourself in the foot - rules for C/C++ programmers - Allen I. Holub https://www.amazon.com/gp/product/0070296898/ref=dbs_a_def_r... - explained C++ to me in a way no others did

SQL for smarties - You like getting shit out of databases? Me too! https://www.amazon.com/Joe-Celkos-SQL-Smarties-Programming/d...

Light on Yoga/Light on Pranayama (breath control) BKS Iyengar Because you need to know your body better https://www.amazon.com/Light-Pr%C3%A3n%C3%A3y%C3%A3ma-Yogic-...

A handbook of Chinese healing herbs - Daniel Reid Why? Chinese herbalism is the root of many western drugs. Many still are untranslated to the pill: https://www.amazon.com/Handbook-Chinese-Healing-Herbs-Easy/d...

Vitality, Energy, Spirit: A Taoist Sourcebook - Kleary https://www.amazon.com/Vitality-Energy-Spirit-Sourcebook-Sha... - protect yourself, your mind.

Everything I learned on is old school. Joe Celko was a great author back in the day. I always enjoyed this book:

https://www.amazon.com/Joe-Celkos-SQL-Smarties-Programming/d...

Although it is 10 years old, not much has changed in the universe of SQL basics. If I were to capture the essence of good schema design it is mostly about keeping data normalized until you have a really good reason not to. Denormalization is almost always an optimization choice.

And before you optimize you should have basic things covered, like indexes, etc. I have fixed more than one "slow" query by simply adding indicies to everything people are joining on. So, check out a tool like pgAdmin that has a cool query planner optimization feature. What is happening under the hood doesn't matter a /lot/ when learning SQL, but it is really insightful to see how indicies of various types impact performance. I believe this book basically covers it all from a theoretical perspective. Optimization and indices aren't super well covered in SQL for smarties, which make sense, it isn't about optimization but is a little higher level.

There are /tons/ of data sets out there now a days. CSV files, etc. Find some interesting data and start challenging yourself with interesting ways to design that data into a database. I actually design most of my SQL databases using an ORM these days, but, my bedrock knowledge of SQL makes it very efficient and I can avoid committing "SQL sins" (denormalization) prematurely. You will be surprised at how much you can learn on simple data sets :)

This book is good

https://www.amazon.com/Joe-Celkos-SQL-Smarties-Fourth/dp/012...

mwexler
Props to Joe Celko's books. I found they helped me reconceptualize how to get SQL to solve problems that I thought required another language.
matwood
I'll also thumbs up Celko's books. He takes hard problems and solves them with SQL. His books do assume you already know SQL, and are now looking for better ways to apply that knowledge.
Start with sqlite (Easy to set up, file based, good for playing and for embedded systems) then PostgreSQL or MSSQL if you are going to be in Windows land. MySQL later if you have to. It's fallen out of favor in some communities since Oracle bought it and it's just not as powerful as PostgreSQL though it does the job.

Also go buy the book "Joe Celko's SQL for Smarties" [1] (And everything else he wrote on SQL...) and actually learn what SQL and DDL is really all about how to properly model data. Lean some SQL and DDL before you start messing with ORMs like Rails Active Record or SQLAlchemy and all that stuff.

[1] http://www.amazon.com/Joe-Celkos-SQL-Smarties-Fourth/dp/0123...

Also, maybe just go read "SQL For Web Nerds" right now but take it with a grain of salt and again forget Oracle for now. It's old but good... http://philip.greenspun.com/sql/

vicks711
Thanks
HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.