报表应用的计算中间层
在传统的报表应用中,源数据的计算一般有三种方式:1、报表工具直接连接数据库取数,源数据的计算是提交SQL由数据库完成的;2、报表工具利用自身的计算能力(单元格函数或格间计算),实现部分数据计算;3、报表工具通过API调用Java程序实现数据计算。 下面
在传统的报表应用中,源数据的计算一般有三种方式:1、报表工具直接连接数据库取数,源数据的计算是提交SQL由数据库完成的;2、报表工具利用自身的计算能力(单元格函数或格间计算),实现部分数据计算;3、报表工具通过API调用Java程序实现数据计算。
下面,我们比较一下这三种方式,并探讨最佳方案。
首先,来看数据库计算。
数据库计算的优势是:数据一致性较好,安全性较高。
但是,采用数据库计算报表源数据的问题也比较多:1、报表工具从数据库中取出数据时,要通过JDBC,因为需要做数据流的对象转换,所以关系数据库的JDBC都比较慢,这是一个始终没有解决的问题;2、简单SQL语句执行的速度较快,但复杂SQL则不容易优化。如果是存储过程中用for循环来fetch计算的话有可能要比Java慢;3、数据库是扁平结构,不能以多级目录的形式来管理数据,只适合管理数量较少的表。数据库计算会产生大量相互关联的中间表,出现很多容易混淆的表名,可管理性较差。4、Sql存在:不支持分步计算、集合化不彻底、缺乏有序集合、不支持对象引用的问题。这就造成SQL和存储过程不符合自然思维习惯,编程比较困难。5、数据库的建设和维护成本都比较高。
第二,来看报表工具计算。
由于数据库计算方案的上述不足,很多报表程序员会直接利用报表工具的单元格函数和格间计算等方式来实现源数据计算。报表工具计算的不足是:1、为了完成计算,报表不得不采取隐藏行列的方式储存中间结果,会增加内存消耗,降低性能;2、报表单元格除了存储单元格值,还保留了很多显示格式属性(比如:字体、大小、背景色等等),带着这些属性计算,也会降低性能;3、有些复杂计算是报表工具本身无法完成的,比如:不规则运算、需要多个步骤完成的计算等。
第三,来看Java程序计算。
Java程序计算的优势是在数据库和报表工具之间形成了中间计算层,好处是:1、可以访问文件中的数据,并采用多线程计算,能够提升报表性能和容量;2、支持多样性数据源;3、有效减轻数据库负担;4、实现T+0大数据实时查询,可以在报表中看到最新产生的数据。但是,由于Java程序在结构化和半结构化计算方面的类库较少,实现上述计算很复杂。而且,Java程序和报表模板是分离的,在代码管理上也很麻烦。如果是对数据集的少量调整计算,也要折腾Java的开发环境、代码管理、打包部署等,就太麻烦了。
因此,Java程序计算实际上形成了报表应用的计算中间层,是三个方式中比较具备优势的。但是,Java程序计算问题也还是很多。
可以考虑采用润乾集算报表的源数据计算方案,可以在报表应用和数据库之间形成显式的计算中间层,具备上面所说的Java程序的4个优势。同【本文来自鸿网互联 (http://www.68idc.cn)】时,集算报表又解决了Java程序计算的不足,体现在:1、集算脚本提供了大量的结构化和半结构化计算类库,特点是:分步计算、完全的集合运算、有序集合运算和对象引用机制等,更接近自然思维,编程更简单,代码量更少。2、集算脚本可以直接在报表文件中编写,也可以保存为dfx文件和报表文件成对存放在目录中,代码管理简单。3、集算脚本是解释执行的,无需编译、打包。4、集算脚本封装了Java的多线程编程,化繁为简,提高了开发效率。
润乾集算报表和传统方案的结构对比示意图如下:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

0.What does this article do? We propose DepthFM: a versatile and fast state-of-the-art generative monocular depth estimation model. In addition to traditional depth estimation tasks, DepthFM also demonstrates state-of-the-art capabilities in downstream tasks such as depth inpainting. DepthFM is efficient and can synthesize depth maps within a few inference steps. Let’s read about this work together ~ 1. Paper information title: DepthFM: FastMonocularDepthEstimationwithFlowMatching Author: MingGui, JohannesS.Fischer, UlrichPrestel, PingchuanMa, Dmytr

DDREASE is a tool for recovering data from file or block devices such as hard drives, SSDs, RAM disks, CDs, DVDs and USB storage devices. It copies data from one block device to another, leaving corrupted data blocks behind and moving only good data blocks. ddreasue is a powerful recovery tool that is fully automated as it does not require any interference during recovery operations. Additionally, thanks to the ddasue map file, it can be stopped and resumed at any time. Other key features of DDREASE are as follows: It does not overwrite recovered data but fills the gaps in case of iterative recovery. However, it can be truncated if the tool is instructed to do so explicitly. Recover data from multiple files or blocks to a single

General Matrix Multiplication (GEMM) is a vital part of many applications and algorithms, and is also one of the important indicators for evaluating computer hardware performance. In-depth research and optimization of the implementation of GEMM can help us better understand high-performance computing and the relationship between software and hardware systems. In computer science, effective optimization of GEMM can increase computing speed and save resources, which is crucial to improving the overall performance of a computer system. An in-depth understanding of the working principle and optimization method of GEMM will help us better utilize the potential of modern computing hardware and provide more efficient solutions for various complex computing tasks. By optimizing the performance of GEMM

The role and practical application of arrow symbols in PHP In PHP, the arrow symbol (->) is usually used to access the properties and methods of objects. Objects are one of the basic concepts of object-oriented programming (OOP) in PHP. In actual development, arrow symbols play an important role in operating objects. This article will introduce the role and practical application of arrow symbols, and provide specific code examples to help readers better understand. 1. The role of the arrow symbol to access the properties of an object. The arrow symbol can be used to access the properties of an object. When we instantiate a pair

The performance of JAX, promoted by Google, has surpassed that of Pytorch and TensorFlow in recent benchmark tests, ranking first in 7 indicators. And the test was not done on the TPU with the best JAX performance. Although among developers, Pytorch is still more popular than Tensorflow. But in the future, perhaps more large models will be trained and run based on the JAX platform. Models Recently, the Keras team benchmarked three backends (TensorFlow, JAX, PyTorch) with the native PyTorch implementation and Keras2 with TensorFlow. First, they select a set of mainstream

I cry to death. The world is madly building big models. The data on the Internet is not enough. It is not enough at all. The training model looks like "The Hunger Games", and AI researchers around the world are worrying about how to feed these data voracious eaters. This problem is particularly prominent in multi-modal tasks. At a time when nothing could be done, a start-up team from the Department of Renmin University of China used its own new model to become the first in China to make "model-generated data feed itself" a reality. Moreover, it is a two-pronged approach on the understanding side and the generation side. Both sides can generate high-quality, multi-modal new data and provide data feedback to the model itself. What is a model? Awaker 1.0, a large multi-modal model that just appeared on the Zhongguancun Forum. Who is the team? Sophon engine. Founded by Gao Yizhao, a doctoral student at Renmin University’s Hillhouse School of Artificial Intelligence.

Facing lag, slow mobile data connection on iPhone? Typically, the strength of cellular internet on your phone depends on several factors such as region, cellular network type, roaming type, etc. There are some things you can do to get a faster, more reliable cellular Internet connection. Fix 1 – Force Restart iPhone Sometimes, force restarting your device just resets a lot of things, including the cellular connection. Step 1 – Just press the volume up key once and release. Next, press the Volume Down key and release it again. Step 2 – The next part of the process is to hold the button on the right side. Let the iPhone finish restarting. Enable cellular data and check network speed. Check again Fix 2 – Change data mode While 5G offers better network speeds, it works better when the signal is weaker

Recently, the military circle has been overwhelmed by the news: US military fighter jets can now complete fully automatic air combat using AI. Yes, just recently, the US military’s AI fighter jet was made public for the first time and the mystery was unveiled. The full name of this fighter is the Variable Stability Simulator Test Aircraft (VISTA). It was personally flown by the Secretary of the US Air Force to simulate a one-on-one air battle. On May 2, U.S. Air Force Secretary Frank Kendall took off in an X-62AVISTA at Edwards Air Force Base. Note that during the one-hour flight, all flight actions were completed autonomously by AI! Kendall said - "For the past few decades, we have been thinking about the unlimited potential of autonomous air-to-air combat, but it has always seemed out of reach." However now,
