Computing middle layer of a report application, and computing middle layer of a report Application

Source: Internet
Author: User

Computing middle layer of a report application, and computing middle layer of a report Application

In traditional report applications, there are generally three ways to compute source data: 1. The report tool directly connects to the database to fetch data, and the source data is computed by submitting SQL statements completed by the database; 2. Report tools use their own computing capabilities (cell functions or inter-cell computing) to implement partial data computing. 3. Report tools call Java programs through APIS to implement data computing.

Next, we will compare these three methods and discuss the best solutions.

First, let's look at database computing.

Database computing has the advantages of good data consistency and high security.

However, there are also many problems with using the database to calculate the report source data: 1. When the report tool extracts data from the database, it must use JDBC because it needs to convert the data stream objects, therefore, JDBC in relational databases is slow, which is always unsolved. 2. Simple SQL statements are executed quickly, but complex SQL statements are not easily optimized. If the for loop is used in the Stored Procedure for fetch computing, it may be slower than Java; 3. The database is a flat structure and cannot be managed in the form of multi-level directories, only tables with a small number of tables can be managed. Database computing will generate a large number of correlated intermediate tables, and many confusing table names may lead to poor manageability. 4. SQL: it does not support step-by-step computation, incomplete collection, lack of Ordered Sets, and object reference. This makes it difficult to program SQL statements and stored procedures because they do not conform to natural habits. 5. High database construction and maintenance costs.

Second, let's look at the report tool computing.

Due to the deficiencies in the database computing solution, many report programmers directly use the cell functions and inter-cell computing of the report tool to perform source data computing. Insufficient computing capabilities of the report tool: 1. To complete computing, the report has to store intermediate results by hiding rows and columns, which will increase memory consumption and reduce performance; 2. Report cells not only store cell values, but also retain many display format attributes (such as font, size, and background color). computing with these attributes also reduces performance; 3. Some complex computing tasks cannot be completed by the report tool itself, such as irregular operations and computing that requires multiple steps.

Third, let's look at Java program computing.

The advantage of Java program computing is that an intermediate computing layer is formed between the database and the report tool. The benefits are: 1. You can access data in files and use multi-thread computing, improve report performance and capacity; 2. Support for diverse data sources; 3. Effectively reduce the burden on the database; 4. implement real-time query of T + 0 big data, you can view the latest data in the report. However, because Java programs have fewer class libraries in terms of structured and semi-structured computing, It is very complicated to implement the above calculation. Besides, Java programs and report templates are separated, which is also troublesome in code management. If you want to adjust and compute a small amount of data sets, it is too troublesome to use the Java development environment, code management, packaging and deployment, and so on.

Therefore, Java program computing actually forms the computing middle layer of the report application, which is advantageous among the three methods. However, there are still many Java program computing problems.

You can consider using the source data computing solution of the rundry set computing report to form an explicit computing intermediate layer between the report application and the database, which has four advantages of the above mentioned Java program. At the same time, the centralized computing report solves the shortcomings of Java Program Computing. It is reflected in: 1. The set computing script provides a large number of structured and semi-structured computing class libraries, featuring: step-by-step computing, complete set operations, ordered set operations, and object reference mechanisms are closer to natural thinking, simpler programming, and less code. 2. The set computing script can be directly written in the report file, or saved as the dfx file and report file in pairs and stored in the directory. The code management is simple. 3. The computing script is interpreted and executed without compilation or packaging. 4. The computing script encapsulates Java multi-threaded programming, simplifying the complexity and improving the development efficiency.

The structure comparison between the computing report and the traditional solution is as follows:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.