Hi,
Le 04/05/2016 13:36, Szymon Lipiński a écrit :
On 4 May 2016 at 13:13, Chris Travers <chris.travers@xxxxxxxxx
<mailto:chris.travers@xxxxxxxxx>> wrote:
A few observations
On Wed, May 4, 2016 at 12:31 PM, Geoff Winkless <pgsqladmin@xxxxxxxx
<mailto:pgsqladmin@xxxxxxxx>> wrote:
On 4 May 2016 at 06:46, dandl <david@xxxxxxxx
<mailto:david@xxxxxxxx>> wrote:
> I'm a strong believer in putting the business code next to the data, not the wrong
> side of the object-relational divide. However, for many the challenge of writing and
> debugging SQL code is just too high!
Your source for this statement please? "For many" sounds rather like
weasel-words to me. In my experience, a wide range of people, from
beginners to experts, find SQL easy to write and debug.
Yes, I agree. SQL is just crystal-clear to write, read and understand. I
found out that debugging is usually not a common exercise in SQL,
because the language is so trivial.
...
From my perspective there is one more thing: when I tried, in couple of
companies, to move some part of the logic to a database, then usually
the management said "no, that's not doable, as we will have trouble with
finding good sql programmers later",
Shocking! Apart from very few languages I know, SQL is by far more
productive and efficient, for many-many tasks.
and we were still writing all the logic outside the database.
I used to implement the logic outside the database, like you mention,
*but* I was writing plain SQL. Only when I had specific needs, then I
would switch to another language which would just get the results from a
well-polished plain SQL query, process, and feed back things into the
database (with another well-polished SQL, of course) or just throw the
results out somewhere else (file, screen, picture, whatever). No ORM or
any complication.
And I find SQL fairly easy to debug and maintain, no need for fancy
tools: an editor and a console (psql or equivalent) and you're up and going!
Nowadays, things got quite different, and I tend to stuff more and more
logic inside the database. Which is often merely converting SQL queries
into views...
But it comes with a counterpart: the more you put logic inside your
DBMS, the more dependent you become. As far as I'm concerned, I recently
decided to just stick to PostgreSQL forever! (or almost)
À+
Pierre
PS: sorry for the double-reply, Szymon: I forgot *again* to hit
Shift-Ctrl-R instead of Ctrl-R, shame on me...
--
____________________________________________________________________________
Pierre Chevalier
PChGEI: Pierre Chevalier Géologue Et Informaticien
Partenaire DALIBO
Mesté Duran
32100 Condom
Tél+fax : 09 75 27 45 62
06 37 80 33 64
Émail : pierrechevaliergeolCHEZfree.fr
icq# : 10432285
jabber: pierre.chevalier1967@xxxxxxxxx
http://pierremariechevalier.free.fr/pierre_chevalier_geologue
____________________________________________________________________________
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general