U
U
Urukhayy2017-12-16 09:42:02
Database
Urukhayy, 2017-12-16 09:42:02

Generate a report in its entirety and on the fly, or as data arrives?

You need to get a reporting table in the application. What would you advise about the report generation algorithm? So far there are 2 options.
1. Permanent storage of the reporting document in the database is implied. Update the reporting document in the database as new data enters the system. As soon as the data has arrived, we immediately add another report to the database . When a report is requested by the user, all lines of the report document are retrieved from the database and simply displayed.
2. Do not use the reporting database at all. The entire report is generated "on the fly", without storing in the database. This happens every time the report is requested to be displayed, iterating through the entire project database and extracting the desired data, and then formatting. For each separate report display request, the document will be collected again and again, by the algorithm of passing through the system database.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Griboks, 2017-12-16
@Griboks

the report is not stored in the database and is generated on the fly, and only new data is updated, while old data is not

M
Maxim Fedorov, 2017-12-18
@qonand

it all depends on the project ... if you have a small project with a small amount of data (I mean the data on which you need to build a report) that will be used by a couple of users - then it's easiest to build a report on the fly .. If a project with a large amount of data that a large number of users will constantly use it - then it is quite appropriate to generate a report in the database in advance.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question