4 ms·
We had several kinds of stored logic in Oracle: 1. for logical consistency of data (i.e. when you store new message you should increment counter for folder, thr
by d0uble 10y ago
We had several kinds of stored logic in Oracle:
1. for logical consistency of data (i.e. when you store new message you should increment counter for folder, thread, etc.). It seems correct to have such logic in the database rather than in the application.
2. for common code (i.e. moving a message from one folder to another may be done from web backend, mobile backend, imap backend or pop3 backend). This kind of logic is easier to have in one place than in all backends.
3. some business logic (i.e. finding thread for a new incoming message was done in PL/SQL).
First type is still in the database. Some part of type 2 was moved to our abstraction library (that is used by all applications). Logic of thrird type was moved to our applications and it greatly reduced stored code size.