Re: Is it better keep most logic in the database or the Node.js application?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Is it better keep most logic in the database or the Node.js application?
Дата
Msg-id 20210319171604.GB3566@momjian.us
обсуждение исходный текст
Ответ на Is it better keep most logic in the database or the Node.js application?  (Simon Connah <simon.n.connah@protonmail.com>)
Ответы Re: Is it better keep most logic in the database or the Node.js application?  (Simon Connah <simon.n.connah@protonmail.com>)
Список pgsql-novice
On Fri, Mar 19, 2021 at 08:37:48AM +0000, Simon Connah wrote:
> Hi,
> 
> I've been wondering this for some time but is it better to keep the vast majority of the logic in the database using
functions,stored procedures, triggers and everything else or should I keep the SQL in the Node.js web application and
usethat to directly query the database object? I would have thought using database functions would be faster as the
databasewill know what the query is ahead of time and can perform some optimisations on it but this is just a guess on
mypart.
 
> 
> What should I do? Keep everything in the Node.js application or do as much as possible in PostgreSQL?

I have a blog entry about it:

    https://momjian.us/main/blogs/pgblog/2017.html#June_14_2017

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.




В списке pgsql-novice по дате отправления:

Предыдущее
От: Bzzzz
Дата:
Сообщение: Re: Is it better keep most logic in the database or the Node.js application?
Следующее
От: Simon Connah
Дата:
Сообщение: Re: Is it better keep most logic in the database or the Node.js application?