Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5f68-0006BV-9S for pgsql-general@arkaria.postgresql.org; Mon, 09 Apr 2018 22:17:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f5f66-0001kF-LC for pgsql-general@arkaria.postgresql.org; Mon, 09 Apr 2018 22:17:10 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f5f66-0001k6-7B for pgsql-general@lists.postgresql.org; Mon, 09 Apr 2018 22:17:10 +0000 Received: from mail-pf0-x22d.google.com ([2607:f8b0:400e:c00::22d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f5f5u-0004GO-U2 for pgsql-general@lists.postgresql.org; Mon, 09 Apr 2018 22:17:05 +0000 Received: by mail-pf0-x22d.google.com with SMTP id l27so6553451pfk.12 for ; Mon, 09 Apr 2018 15:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=d+T6k93eHov+VCC8rlQUVimUJHsY7WD0KDAehHAVJHo=; b=OyaTLayTs19hAsdIaaIHIs1EJoExPRlf8qGUbg/rERCxtwGIFjWRJHU8ws8dIA0k0w oVbyDOJ+QI3S/YbZYoPOpd+C9jcTq6pYMAH/o/OmyFNua2hbfi+jpdeYxjdh/BMpJ8d5 /1nDonXgyM/N0SlFTLCgLij4Hlw4mapWHmBjEQEw/GOxBAW0tz2ti+DcHwQ+IcX/xaK4 QRqHWSfKNkNR72sr5TzOFXcv/G1thaGS3ILsobNkqttNf9uWm+ubyTlPJQfpFtqikUc7 PupZcDfzFMOOeMksFNOOYoqb3lKyHsMTyW+S96qmE2o0K3B8d795NS3qM9FkHmehGoS0 J+YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=d+T6k93eHov+VCC8rlQUVimUJHsY7WD0KDAehHAVJHo=; b=pECnJESTGbfzNI6QCo1+bSUA3JwJjf3RAoH0IY23jK2jp9n/dhEL+upRpsf9WQK0JN ORNxIDyq3BduhdJd+ye6ECTqd8QQW7c7C9AbTYlFPc2Xry+2k5XvSADwvUFoL/VkfFN/ TlOA1IlQEj+lXbHkNDWVPao82o6arXg20fTh38e+7zEhxtAFdTFoyTUxZKEG3qBTu4rf YoPj3U1IhyURwS7MlbZx/6Fds2cJ16zKxvgtf2XQe5WFRaewNb1weLDAl2+hMWCEhfLn 36JLBmlX24yrS2fdj+9kMw8za4gYgu3u6Y/b5SVKTT9zjWYECOZkjFQtGqE9PXXLLf6Z hH7w== X-Gm-Message-State: ALQs6tBxljBIHR8difIzbOG1evGbcuKirLbIjDSVi1BElyy2l4V2kcIE jIuFX6TPDFe0u+Eptyilustj4gr/ X-Google-Smtp-Source: AIpwx4+TFesIJCGlK3dwFe1700gH0EzVov82yanaQlV3nuU4SOP8Bzf7XRAkUUbifl4/xq/cthoc9g== X-Received: by 10.101.88.194 with SMTP id e2mr12999807pgu.229.1523312217317; Mon, 09 Apr 2018 15:16:57 -0700 (PDT) Received: from tim-desktop (2001-44b8-31f2-bb00-651a-8465-7ff7-d6b7.static.ipv6.internode.on.net. [2001:44b8:31f2:bb00:651a:8465:7ff7:d6b7]) by smtp.gmail.com with ESMTPSA id c3sm2613489pfd.28.2018.04.09.15.16.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Apr 2018 15:16:56 -0700 (PDT) References: <7e56cc47-ae9c-43ee-9984-77df3a485d2e@Spark> <20180409134451.7cag3c7427zncayl@hjp.at> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Tim Cross To: "Peter J. Holzer" Cc: pgsql-general@lists.postgresql.org Subject: Re: Rationale for aversion to the central database? In-reply-to: <20180409134451.7cag3c7427zncayl@hjp.at> Date: Tue, 10 Apr 2018 08:16:52 +1000 Message-ID: <87d0z86n57.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter J. Holzer writes: > In my applications I use SQL heavily. RDBMs are good at processing > queries, so use them for that. If all you want is a key-value store, > don't use PostgreSQL. I'm not very fond of ORMs. I know what I want to > do and can express it in SQL. An ORM makes me translate that into a > different (and usually inferior) query language, which is then > translated back into SQL. That doesn't make things easier for me. > Could not agree more! My experience has been that ORMs just get in the way. Worse yet, when I've investigated performance problems raised by developers, I've often found it is due to the ORM layer, which is unable to map more complex queries efficiently. The only 'layer' I've ever used which I liked was HugSQL. I quite liked this approach as you write the queries in SQL and these get exposed to the application layer as high level functions, so gives a nice clean interface. > > I come from Oracle, not MySQL, But I have also used MySQL, and I guess > the very wide gap in capabilities between Oracle and MySQL made me > cautious about putting too much into the database. There is also the > expectation that you should be able to use a different database engine > (SQL is a standard, right?) just like you should be able to use a > different C compiler, but in practice that never works. And of course I > wasn't very impressed with PL/SQL. (PostgreSQL gives you a much wider > range of languages for stored procedures than Oracle, but PL/PerlU still > isn't quite the same as Perl (And I suspect it's the same for Python). > > hp Again, totally agree. Nice in theory and reminds me of the 'write once, run everywhere' dream. Very few of the places I've worked have actually maintained cross database functionality for long, if at all. The problem is that while SQL may have a standard, how that standard is implemented is very different. When I have worked at places which tried to be database neutral, they inevitably give up as they find that in the end, they needed to maintain separate SQL or have separate database maintenance teams anyway. You will only get seamless SQL across different databases if your SQL is very basic, in which case, you probably don't need a full blown RDMS anyway. Most of the time, your choice of database will be dictated by your dominate platform in the market your application targets. -- Tim Cross