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

Поиск
Список
Период
Сортировка
От Simon Connah
Тема Is it better keep most logic in the database or the Node.js application?
Дата
Msg-id iP1Q7A5jXefT-1pnTm_xe11oZwWMxeZydnC6UfZAOu4BesbseT2xtKgwpR_3FORbOpg44gUNHiH1N_9FRzCDyz98hXlIubXTRuTKX1TNFVA=@protonmail.com
обсуждение исходный текст
Ответы Re: Is it better keep most logic in the database or the Node.js application?  (Laszlo Forro <getforum@gmail.com>)
Re: Is it better keep most logic in the database or the Node.js application?  (Bzzzz <lazyvirus@gmx.com>)
Re: Is it better keep most logic in the database or the Node.js application?  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-novice
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?

Simon.



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

Предыдущее
От: Santosh Udupi
Дата:
Сообщение: Could not find the table 'pgagent.pga_job'. Have you run pgagent.sql on this database?
Следующее
От: Laszlo Forro
Дата:
Сообщение: Re: Is it better keep most logic in the database or the Node.js application?