On 05/04/2016 08:39 AM, Paul Jungwirth wrote:
On 05/03/2016 09:11 PM, Guyren Howe wrote:
I think I'm going to write a book called Love Your Database, aimed at
web developers

I gave a talk here about doing "interesting" Postgres things in Rails:

Oh also: one part of my talk I did like what giving my mental process for building up a query. Because of SQL's declarative nature, a lot of people just don't know where to start. My own thinking goes like this:

1. Each output row is a _____.
2. Use that for the `FROM`.

From there, it is easy to JOIN to whatever else I need, add filters, and fill in the SELECT.

That's worked really well for me. I'd love to hear what other people do, if you've done any reflection on your own thought process.

I think teaching this is a different thing than just teaching SQL syntax. I haven't seen it written about a lot. It must be somewhere, but any book encouraging "outsiders" to use more SQL could benefit from giving them direction like that.

Paul




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to