Big Data/Analytics Zone is brought to you in partnership with:

Jim King is the visionary expert in the field of BI, database, Java development and programming. He has more than 10 years of experience in BI and development of Java applications, like esProc and esCalc. He is passionate about applying simpler methods to solve the complex problems of users. He is also an active blogger and has released a serial of original ideas on BI and Java development, such as BI, database application development, report development with help of Java, SQL, etc. Jim has posted 23 posts at DZone. You can read more from them at their website. View Full User Profile

Empower Java with Database Ability for Structured Data Computing

07.03.2013
| 4110 views |
  • submit to reddit

In the process of development with Java, we will occasionally encounter the computation similar to data processing in database. For instance, there are two frequently updated Excel sheets, which are the clients’ information and the orders. We need to query the data of clients who have bought all the products on the list through entering a dynamic product list.

The "computation similar to data processing in database" refers to structured data computation  of an application without database. Although Java is capable of handling such computation, the procedure is very cumbersome and verbose.

It takes programmers a lot of time and efforts to implement the computational details. For example, seek the maximum value, rank, filter, group, and average. In addition, it is cumbersome to define various data types. For example, define class, use object to represent every piece of data, and then use List to store multiple pieces of data. The computational procedure is implemented with nested multiple level of loops. The computations involve the set computation and relation computation between massive data, or computation on relative positions between objects and object attributes. It takes great efforts to implement the underlying logics for these computations.

It is obvious that such computation is hard to perform all by Java itself. Then, how to implement the computation similar to database in Java conveniently? The answer is esProc.

esProc is a Java development tool  especially designed for database computations. esProc offers native support for the cross-database computations and the code reuse, with a set of very perfect debugging functions. No wonder that the development productivity in esProc is also superior to that in SQL. esProc can retrieve from and operate on multiple databases, text files, or Excel sheets. Its grid style and agile syntax are especially designed for the massive structured data computation. esProc supports external parameters and the computational result in esProc can be exported though JDBC for direct invocation with Java language and reporting tools . So, esProc can boost the computational capability of Java dramatically.

With regard to the above-mentioned computational goal, esProc code is as follows:



esProc is good at simplifying the complex computation, and can be integrated with Java in a convenient way.

Class.forName(“com.esproc.jdbc.InternlDriver”);
Connection con=DriverManager.getConnection(“jdbc:esproc:local://”);
PreparedStatement st=con. prepareStatement(“call p31(?)”);

Easily and clearly, let's address the computation similar to database calculation of Java with esProc from now on.



Published at DZone with permission of its author, Jim King.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)