Stored Procedure or Code

I do not ask for an opinion, but more about the documents.

We have many data files (XML, CSV, Plantext, etc.), and they need to be processed, their data can be divided.

The database leader suggested using a stored procedure to complete the task. Basically we have an intermediate table in which the file becomes serialized and stored in the clob or XML column. Then from there, he suggested continuing to use the stored procedure to process the file.

I am an application developer with a db background, especially on application development, and I may be biased, but using this logic in the DB seems like a bad idea, and I can not find any documentation that confirms or disapproves that I’m talking about to put the car on a train to pull out a load of goods.

So my questions are: How well do databases (Oracle, DB2, MySQL, SqlServer) perform when we talk about finding regular expressions, finding and replacing data in clob, dom traversal, recursion? Compared to a programming language such as Java, PHP, or C #, for the same problems.

Edit

So, I am looking for documentation on the analysis of matching / runtime of a specific programming language compared to a DBMS, in particular, for searching and replacing strings, searching and replacing regular expressions. Passing an XML site. Memory usage when calling recursive methods. And, in particular, how well they scale in a collision with 10 - 100 GB of data.

+6
source share
2 answers

It looks like you're about to throw business logic in the storage tier. For operations as you describe, you should not use a database. You may find yourself looking for workarounds for show-stop solutions or creating fancy solutions because of inflexibility.

Also support technical support. How many people will be able to support the decision later?

Speaking of speed, choosing the right programming language, you can process data in multiple threads. In the end, your feeling with the car on the train is true;)

+1
source

It is better to derive processing logic from the data layer. Profiling your implementation in the database will be difficult.

You get freedom and the opportunity to choose between libraries and compare their performance if the implementation is performed in any language. In addition, you can select frameworks of the type (Spring -Batch for Java) for processing bulk data in the form of a batch process.

+1
source

Source: https://habr.com/ru/post/913513/


All Articles