Live data from Hacker News

Awesome SQL blog

explainextended.com

1–10 of 23 posts

Re: Awesome SQL blog

#2
It's an excellent cookbook of useful SQL queries with well written explanations. I've used SQL for decades, but after reading a few articles, it was obvious that I could learn some new tricks. The articles are bite sized an tasty.

Re: Awesome SQL blog

#3
Fans of this will probably also like Joe Celko's SQL for Smarties. ISBN: 0123693799

It's unfortunate that a lot of new programmers are relying on their framework's ORM to abstract the SQL away from them, weakening their understanding of it.

Re: Awesome SQL blog

#4
post #3

Fans of this will probably also like Joe Celko's SQL for Smarties. ISBN: 0123693799 It's unfortunate that a lot of new programmers are relying on their framework's ORM to abstract the SQL away from them, weakening their understanding of it.

I think that's a little unfair to people using ORMs. Obviously I'd hope people don't want to avoid knowledge, but I'll be damned if I want to write SQL, it's not fun for me. That being said I contribute to the ORM of my framework of choice, if I write the solution to my problem once I'll never have to do it again. I think it's a bit like complaining that C programs are trying to abstract away assembly. Yes they are, but as long as they have some level understanding of how machines work they'll be ok, and a hell of a lot more productive.

Re: Awesome SQL blog

#5
post #3

Fans of this will probably also like Joe Celko's SQL for Smarties. ISBN: 0123693799 It's unfortunate that a lot of new programmers are relying on their framework's ORM to abstract the SQL away from them, weakening their understanding of it.

I'm good enough at SQL to know about normal forms and how to write recursive queries.

I also know that there is very little value in me writing a new set of CRUD queries for a low-load site when someone else has written a well-debugged interface for me.

Re: Awesome SQL blog

#6
post #4
post #3

Fans of this will probably also like Joe Celko's SQL for Smarties. ISBN: 0123693799 It's unfortunate that a lot of new programmers are relying on their framework's ORM to abstract the SQL away from them, weakening their understanding of it.

I think that's a little unfair to people using ORMs. Obviously I'd hope people don't want to avoid knowledge, but I'll be damned if I want to write SQL, it's not fun for me. That being said I contribute to the ORM of my framework of choice, if I write the solution to my problem once I'll never have to do it again. I think it's a bit like complaining that C programs are trying to abstract away assembly. Yes they are,…

Yes, but C maps pretty cleanly to the underlying assembly, whereas there is a very large gap between (proper, nontrivial) SQL and the typical ORM.

Perhaps "Haskell is trying to abstract away assembly" is a better comparison.

Re: Awesome SQL blog

#7
post #3

Fans of this will probably also like Joe Celko's SQL for Smarties. ISBN: 0123693799 It's unfortunate that a lot of new programmers are relying on their framework's ORM to abstract the SQL away from them, weakening their understanding of it.

I like this style better than SQL for Smarties. Celko tries to stick with the ANSI standard, which is fine, but I much to prefer to know how to get the most out of each platform.

Like here, http://explainextended.com/2009/09/, he covers adjacency list vs. nested sets on MySQL, Postgres, Oracle and SQL Server. Different platforms, different optimal solutions. The man knows his database internals.

Re: Awesome SQL blog

#8
post #3

Fans of this will probably also like Joe Celko's SQL for Smarties. ISBN: 0123693799 It's unfortunate that a lot of new programmers are relying on their framework's ORM to abstract the SQL away from them, weakening their understanding of it.

Hi, I'm the author of the blog.

Actually, most askers (both on Stack Overflow and on the site) are either the ORM developers or the people who need to deal with huge volumes of data (financial reports etc).

As with every other abstracting tool, it's perfectly OK to rely on an ORM — as long as you know which load can it handle and under which carpet the service hatch is.

Re: Awesome SQL blog

#9
post #2

It's an excellent cookbook of useful SQL queries with well written explanations. I've used SQL for decades, but after reading a few articles, it was obvious that I could learn some new tricks. The articles are bite sized an tasty.

Thanks!

Re: Awesome SQL blog

#10
Sorry, it is wrong. SQL is not baſed on ſets, but bags, which are quite different and more complicated. And, by the way, CTEs are a feature of ISO SQL, not only of MS SQL Server.

Finally, entity‐relationſhip is not terribly practical as a model, but as diagrammiŋ.

Post reply on HN