I suggest you to insert in database itself like
Create stored procedure and write whatever query you need then execute that procedure.
Note: It is waste of time to bring the data from backend to front-end and again insert it to backend. (Your processes seem a huge data insertion to the database (Progressbar)!)
Comment