Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to fetch numbers from different databases and associate calculations on the page

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces how to take numbers from different databases and associate calculations on the page, the content is very detailed, interested friends can refer to, hope to be helpful to you.

You can fetch numbers from different databases through java code, calculate the association and return it to the foreground page for display. The specific idea is as follows:

1) read table data from each database and store it in CachedRowSet object

2) Association calculation can use JoinRowSet to complete the inner join of two tables.

3) when it comes to data filtering, you can use FilteredRowSet to complete conditional filtering.

4) return the result set to the foreground for presentation

This approach is fine when the amount of data is small, but as the amount of data increases, performance becomes uncontrollable (differences in developer capabilities). In addition, if the data not only comes from the database, but also needs to be fetched from files, distributed systems, and other data sources, it will increase the amount of code and the difficulty of processing. Of course, if only individual requirements, then you can still use code development to do this, but if similar requirements account for a large proportion, then it is recommended to use report tools to achieve, the configuration is relatively simple and easy to operate, but also convenient for later maintenance.

Report tool scheme 1: fetch data from multiple data sets and correlate calculation of cell functions

Multiple data sets are fetched from different databases, and functions are used in the cells for correlation calculation.

Specific operation can be referred to: multi-database association fetch method 1

Report tool scenario 2: the aggregator script unifies the returned result set

In the script, the fetching and association calculation between different databases are completed through the function, and the report cells can be configured according to the normal fetch.

On the page how to take numbers from different databases and associated calculation is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report