Re: Thoughts on "Love Your Database"

From: Paul Jungwirth <pj(at)illuminatedcomputing(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Thoughts on "Love Your Database"
Date: 2016-05-04 15:39:24
Message-ID: 572A17AC.9080800@illuminatedcomputing.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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
>
> What might I cover that I haven't mentioned? What are the usual objections to server-side code and how can they be met? When *are* they justified and what should the criteria be to put code in Postgres? Any other thoughts? Any other websites or books on the topic I might consult?

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

https://github.com/pjungwir/rails-and-sql-talk

I don't think that will satisfy many people on this list advocating for
stored procedures, but it is an example of trying to teach what SQL can
do, and how you can do those things without losing your convenient and
familiar ORM tools, e.g. running a query and getting back a bunch of
Ruby objects.

I was not really happy with the talk to be honest. I felt it lacked
unity, it didn't fit in the time I had, and it was too split between
"for beginners" and advanced stuff. It was just snippets---in other
words CTEs and window functions :-). I would like to see something that
offers more strategic advice. Give me a plan.

I would be very interested in that book. I think the biggest challenge
will be identifying with your audience: knowing their priorities and
concerns and workflows. My take on the last 25 years of software
architecture theory is "how to put a layer in front of my database." I
think most people who want business logic in the database are dismissive
of this work and too derogatory toward typical web developers, so I
would be pleased to see a book that takes that history more seriously.
You aren't going to convince the world to trade Rails for PLSQL. But are
there ways I can use SQL (and PLSQL) without giving up Rails? How will I
maintain that stuff? Does it play nice with Rails database migrations?
How will I write tests for it? How do I debug it? What principles will
help me draw the line between (PL)SQL and Ruby?

Good luck! I think a book like that would be great.

Paul

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2016-05-04 15:55:27 Re: Thoughts on "Love Your Database"
Previous Message John McKown 2016-05-04 15:08:15 Re: Thoughts on "Love Your Database"