V
V
Vitaly Stolyarov2016-09-18 22:36:57
Database
Vitaly Stolyarov, 2016-09-18 22:36:57

Data validation and transformation: in the platform or in the DBMS?

Such a simple question, but with an unclear result: where is it better to check and process the data that should (or not) enter the database?
Let's say data has arrived at the server under Node.js, it needs to be
1. checked
2. processed
3. transferred to the database.
You can do this in the same order on Nodejs, but what if you remember about rarely used triggers in which you can check and process this data , then you can start from point 3 and perform the first two in the DBMS.
When and which option is preferable and how to find that edge of the optimal use of computing resources?
On the one hand, if when checking and transmitting smalldata needs to be accessed by the database, it may be better to transfer all this at once, which will turn out to be a minimum amount. On the other hand, once again transmit data that may not pass the test?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question