Answer the question
In order to leave comments, you need to log in
How much does it cost to get involved in programming the functions of the database itself?
As I understand it, all modern databases allow you to write certain functions in your internal language. Along the way, the question - it turns out that any function can be wrapped in a trigger, right?
How much does it cost to bother with studying / writing directly the functions themselves, if the task can be solved using the programming language itself?
1. In what cases is it advisable to write the functions themselves?
2. What about speed? Are there any tests of stored procedures vs external programming languages?
3. How convenient/functional are built-in languages? Can everything be done with them? Or only a narrow range of tasks?
4. Is it difficult to debug these internal functions?
Answer the question
In order to leave comments, you need to log in
There is even such a way of abstracting a program from data - there is not a single query in the program, but only calls to stored procedures from the database. And then programmers remain programmers, and storage administrators remain storage administrators. Database restructuring may not affect programmers at all.
Well, sending data over the network is still more expensive than processing directly on the server, so it’s better to aggregate huge reports on the database server, rather than drag half the database to the client.
Writing functions is advisable when processing large amounts of data, when their transfer over the network will take longer than the processing itself.
Writing storages is a great thing, but:
1. they cannot be brought under version control
2. If all the logic is on the database, then sooner or later it will be necessary to upgrade the server from the database. In turn, if we use the database as storage (without processing), then we will have more time to prepare for the next change in the system architecture, when the database will once again be a bottleneck.
3. It is better to define various subsystems responsible for certain business tasks in the system, so the processing of business logic is not a direct task of the database.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question