Software for generating SQL proc diagrams in a program thread

I have a couple of very long processes in Oracle 2000+ chains with lots of calls. And I would like to generate a diagram (algorithm) of the program flow for a better understanding of the process of further refactoring.

This is not the code I wrote, so I don’t know enough logic.

What would you advise to do in this case? I tried to draw a text stream, but it takes a lot of time and it is still difficult to cover all the logic of understanding.

The best approach I see is a flowchart generated from SQL-proc, with links to the "transition" between the code and the diagram.

UPDATE: Found several programs that do the same:

  • ClearSQL - creates CRUD diagrams, call map and flowchart.

  • Quest SQL Navigator Expert (using it now): it has Outline (makes a code stream with the ability to collapse-expand blocks of code - really cool!), Code Explorer (lists all func, params with ti links SQL text - only in the interface) functions

+4
source share
2 answers

There is a Code Visual to Flowchart product that can accept code in different languages ​​and do something like what you are describing. Unfortunately, although Oracle is not included in the list of supported languages, but Microsoft TSQL; perhaps you could at least transfer your proc from Oracle to MS and use it to roughly visualize the proc stream.

Failure that the burnall sentence sounds like the best way to go, essentially divide and win.

+6
source

I doubt that such a tool, even if it exists, can help to better understand. I think the time for large flowcharts is over.
I would advise understanding the logic with phased refactoring:
iteratively extract parts of the procedure into smaller procedures and add tests.

+3
source

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


All Articles