Re: Thoughts on "Love Your Database" - Mailing list pgsql-general

From Paul Jungwirth
Subject Re: Thoughts on "Love Your Database"
Date
Msg-id 572A2A56.80609@illuminatedcomputing.com
Whole thread Raw
In response to Re: Thoughts on "Love Your Database"  (Paul Jungwirth <pj@illuminatedcomputing.com>)
Responses Re: Thoughts on "Love Your Database"  (Guyren Howe <guyren@gmail.com>)
List pgsql-general
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




pgsql-general by date:

Previous
From: Guyren Howe
Date:
Subject: Debugging code on server?
Next
From: Will McCormick
Date:
Subject: Re: Thoughts on "Love Your Database"