Showing posts with label data computation. Show all posts
Showing posts with label data computation. Show all posts

September 27, 2013

A creative computing script designed to enhance computing performance


Database plays an irreplaceable role in the modern economy and is widely used in the business computing areas like Enterprise Resources Planning (ERP), Customer Relation Management (CRM), Supply Chain Management (SCM), and the Decision Support System (DSS).
Computation on the structured data in the database mainly relies on SQL (Structured Query Language). SQL is the powerful, simple-to-use, and widely-applied database computing script. However, it has some native drawbacks: non-stepwise computation, incomplete set-lization, and no object reference available. Although almost all vendors have introduced and launched some non-compatible solution, such as various stored procedure like PL-SQL®, T-SQL®. These improved alternatives cannot remedy the native SQL drawbacks.
esProc solves these drawbacks completely with more powerful computational capability, much lower technical requirement, and broader scope of application. It is a more capable database computing scripts.

I. Step-by-step Computation
Case Description
A multinational retail enterprise needs to collect statistics on the newly opened retail store, including: How many new retail stores will open in this year? Of which how many companies have the sales over 1 million dollars? Among these companies with over-1-million sales, how many companies are abased overseas?
This question is progressive. The three questions are mutually related, the next question can be regarded as the further exploring on the current question, fit for step-by-step computation.
The original data is from the database of stores table with the main fields: storeCode, storeName, openedTime, profit, and nation. Let's check the SQL solution first.

 SQL Solution
To solve such problem with SQL, you will need to write 3 SQL statements as given below.
l  SELECT COUNT(*) FROM stores WHERE to_char (openedTime, 'yyyy')  =  to_char (sysdate,'yyyy');
l  SELECT COUNT(*) FROM stores WHERE to_char (openedTime, 'yyyy')  =  to_char (sysdate,'yyyy') and profit>1000000;
l  SELECT COUNT(*) FROM stores WHERE to_char (openedTime, 'yyyy')  =  to_char (sysdate,'yyyy') and profit>1000000 and nation<>’local’;
SQL1:Get the result of question 1.
SQL2:Solve the problem 2.Because the step-by-step computation is impossible (that is, the results of previous computation cannot be utilized), you can only solve and take it as an individual problem.
SQL3: Solve the problem 3,and you are not allowed to compute in steps either.

 esProc Solution









A1 cell: Get the records requested in problem 1.
A2 cell: Step-by-step computation. Operate on the basis of cell A1, and get the record meeting the conditions of problem 2.
A3 cell: Proceed with the step-by-step computation, and get the records requested in the problem 3.
B1, B2, and B3 cell: It is still the step-by-step computation. Count the corresponding records.

Comparison
For the SQL, there are 3 associations for you to compute in steps, and explore progressively. However, because step-by-step computation is hard to implement with SQL, this problem has to be divided into 3 individual problems.
esProc is to compute in steps following the natural habit of thinking: Decompose the general objective into several simple objective; Solve every small objective step by step; and ultimately complete the final objective.
In case that you proceed with the computation on the basis of the original 3 problems, for example, seek "proportion of problem 3 taken in the problem 2", or "on" problem 3, group by country". As for esProc users, they can simply write ”=A3/A2”, and ”A3.group(nation)”. In each step, there is a brief and clear expression of highly readable, without any requirements on a strong technical background. By comparison, SQL requires redesigning the statement. The redesigned statement will undoubtedly become more and more complex and longer. Such job can only be left to those who have the advanced technical ability in SQL.
esProc can decompose the complex problem into simple computation procedure based on the descriptions from the business perceptive. This is just the advantage of the step-by-step computation. By comparison, SQL does not allow for computation by step or problem decomposition, and thus it is against the scientific methodology, and not fit for the complex computation.
II.               Complete Set-lization
Case Description
A certain advertisement agency needs to compute the clients whose annual sales values are among the top 10.
The data are from the sales table, which records the annual sales value of each client with the fields like customer, time, and amount.

 SQL solution
SELECT customer
FROM (
    SELECT customer
    FROM (
         SELECT customer,RANK() OVER(PARTITION BY time ORDER BY amount DESC) rankorder 
         FROM  sales ) 
    WHERE rankorder<=10) 
GROUP BY customer
HAVING COUNT(*)=(SELECT COUNT(DISTINCT time) FROM sales)
Such Problem requires ranking the sets of a set, that is, group by “time” and then rank by “customer” in the group. Since the popular SQL-92 syntax is still hard to represent this, the SQL-2003 standard, which is gradually supported by several vendors, will be used to solve this problem barely.

Just a tip to compute the customer intersections in the last step, the count of years equals to the count of clients.

 esProc Solution









A1: Group the original dataset by year so that A1 will become a set of sets.
B1: Get the serial number of records whose sales values are among the top 10 of each group. The rank() is used to rank in every group, and pselect() can be used to retrieve the serial number on conditions. ~ is used to represent every member in the set. B1 is the “set of set”.
A2: Retrieve the record from A1 according to the serial number stored in B2, and get the customer field of the record.
A3: Compute the intersection of sets.

Comparison
The SQL set-lization is incomplete and can only be used to represent the simple result set. Developers cannot use SQL to represent the concept of “set of set”. Only the queries of 3-level-nested-loops are available to barely perform the similar computations. In addition, SQL cannot be used to perform the intersection operation easily that developers with advanced techniques can only resort to the unreadable statements to perform the similar operations, such as “count of years equal to the count of clients”. It equals to compute the intersection of client sets.
The set is the base of massive data. esProc can achieve set-lization completely, represent the set, member, and other related generic or object reference conveniently, and perform the set operations easily, such as intersection, complement, and union.

When analyzing the set-related data, esProc can greatly reduce the computation complexity. By taking the advantage of set, esProc can solve many problems agilely and easily that are hard to solve with SQL.

III Ordered Set
Case Description
Suppose that a telecommunication equipment manufacturer needs to compute the monthly link relative ratio of sales value (i.e. the increase percent of sales value of each month compared with that of the previous month). The sales data is stored in the sales table with the main fields including salesMonth, and salesAmount.


 SQL solution
select salesAmount, salesMonth,
        (case when
prev_price !=0 then ((salesAmount)/prev_price)-1
else 0
end) compValue
from (select salesMonth, salesAmount,
lag(salesAmount,1,0) over(order by salesMonth) prev_price
from sales) t

The popular SQL-92 has not introduced the concept of serial number, which adds many difficulties to the computation. Considering this, the designer of SQL-2003 has partly remedied this drawback. For example, the window function lag() is used to retrieve the next record in this example.
In addition, in the above statement, the “case when” statement is used to avoid the error of division by zero on the first record.

 esProc Solution
sales.derive(salesAmount / salesAmount [-1]-1: compValue)

The derive() is an esProc function to insert the newly computed column to the existing data. The new column is compValue by name, and the algorithm is “(Sales value of this month/Sales value of previous month)-1”. The “[n]” is used to indicate the relative position, and so [-1] is to represent the data of the previous month.

On the other hand, for the data of the first record, the additional procedure for division by zero is not required in esProc.

Comparison
From the above example, even if using SQL-2003, the solution to such problem is lengthy and complex, while the esProc solution is simple and clear owing to its support for the ordered set.
Moreover, SQL-2003 only provides the extremely limited computation capability. For example, esProc user can simply use the ”{startPosition,endPosition}” to represent the seeking of a range, and simply use ”(-1)” to represent the seeking of the last record. Regarding the similar functionality, it will be much harder for SQL user to implement.
In the practical data analysis, a great many of complex computations are related to the order of data. SQL users are unable to handle such type of computations as easily as esProc users because SQL lacks of the concept of Being Ordered.

IV Object Reference
An insurance enterprise has the below analysis demands: to pick out the annual outstanding employees (Employee of the Year) whose Department Manager has been awarded with the President Honor. The data are distributed in two tables: department table (main fields are deptName, and manager), and employee table (main fields are empName, empHonor, and empDept).

empHonor has three types of values: null value; ”president's award”, PA for short; and ”employee of the year”, EOY for short. There are 2 groups of correspondence relations: empDept and deptName, and Manager and empName.

 SQL solution
SELECT A.* 
FROM employee A,department B,employee C 
WHERE A.empDept=B.deptName AND B.manager=C.empName AND A.empHonor=‘EOY’ AND C.empHornor=‘PA’

SQL users can use the nested query or associated query to solve such kind of problems. In this case, we choose the association query that is both concise and clear. The association statement behind the “where” has established the one-to-many relation between deptName and empDept, and the one-to-one relation between manager and empName.

 esProc Solution
employee.select(empHonor:"EOY",empDept.manager.empHornor:"PA")
esProc solution is intuitive: select the employee of “EOY” whose Department Manager has be awarded with “PA”.

Comparison
The SQL statement to solve such kind of question is lengthy and not intuitive. In fact, the complete association query language is “inner join…on…” style. This statement is simplified in the above example. Otherwise it will be much hard to understand.

esProc users can use ”.” for object reference. Such style is intuitive and easy to understand. The complex and lengthy association statement for multiple tables can thus be converted to the simple object access, which is unachievable for SQL. When there are more and more tables, the complexity of SQL association query will rise in geometric series. By comparison, the esProc user can always access the data intuitively and easily by taking the advantage of object reference.

Regarding the multi-table associations of complex computation, esProc can handle it more intuitively and conveniently than SQL.

From the comparison of the above four examples, we can see that esProc is not only characterized with step-by-step computation, complete set-lization, sorted sets, and object reference. The analysis style is intuitive, the syntax style is agile, and the function is powerful. esProc is a tool especially designed for mass data computation, and a more powerful database computing script.

September 17, 2013

Data Source Preparation Tool Especially for Report Developers

Many report developers may have the experience in presenting the KPIs in a report for those outstanding sales man whose sales has been rising over 10% for consecutive 3 months. The procedure of finding the outstanding salesmen is actually preparing the data source.

Preparing the data source is the key and the tough part of developing a report.

There are multiple ways to prepare the data source. SQL or SP can be used to handle the normal data computation of a single database; R language for the complex data computation; ETL or data warehouse for cross-database computation, by arranging all to a same database and then compute. For the structural data from non-database files or sheets, the senior programing languages can be used to generate result sets, for example, retrieving the data from Text file with Java class. However, these methods all have some drawbacks as discussed below.
        
Let’s start the discussion with SQL/SP. First, SQL/SP alone can only work on a single database because various cumbersome workarounds are unavoidable for multi-database computation. What’s worse, second, SQL statement is hard to debug. That situation is even worse for the long SQL statement since a more complex computational goal will inevitably give rise to more steps and a longer statement. It is the real nightmare for preparing data source. Third, the inability of SQL statement to run step by step has great impact on the maintenance and re-use. The SQL statement can only run as a whole, and all computational logics must be crammed into a single statement. It is impossible to split one SQL statement into several examinable computational procedures for users to check out the result at each step intuitively. Forth, SQL lacks the explicit sets and the direct support for the ordered computation which are common in the complex computation. So, SQL/SP usually costs several-fold more time and effort than other tools do in the related computation.
        
R language is quite good at handling the complex data computing, isn’t it a better choice? No. The truth is that R language has not incorporated with a perfect IDE. It is very inconvenient for users to compose and edit the computational scripts, not to mention its poor debugging. The report developers are not the professional coder, so their productivity will suffer if working in such IDE. More importantly, R does not provide JDBC or any output interface for the direct use by reporting tools. In order to use the R in reports, users have to implement a report interface program additionally to process the data and receive the parameters. Too much trouble.

For ETL or data warehouse, first, it usually incurs a great expense on human resources, equipment, maintenance, and training. Second, report developers will have to grasp ETL scripts like PHP, Perl, VBScript, and JavaScrip, and design the massive update algorithms. Considering these troubles, 99% report developers will surely get a headache.

The real trouble for Java and other senior languages is that users will have to implement all the details by themselves: open the Excel file, build a record, generate a List, retrieve with loops, seek the maximum value, group, compute the average, filter the data, sort, and then seek the top N – the greatest flexibility seems to be obtained at the cost of the greatest workload.
        
In view of all these discussions above, that would have been good news for report developers if there is a data source computation tool specially built for the report, with all advantages of the above methods, and free from their disadvantages.

esProc is such a tool. On the one hand, it is as capable as SQL or SP regarding its professional database computational capability; on the other hand, it offers the convenient debugging and enables the step-by-step computation. Compared with R, esProc also supports the ordered computations and the explicit sets for solving the complex computation problem, while still offering a more user-friendly IDE interface and JDBC output interface to ensure the usability. esProc is as capable as ETL/data warehouse on performing the cross-database computation, but more cost-effectively owing to its low TCO and efficient deployment and usage. esProc allows for the direct data retrieval from Excel and Txt file as Java does, and more superior to Java in the respect of handling the massive structural data directly.

In conclusion, esProc is the ideal tool specially designed to prepare the data source of reports.

September 3, 2013

Powerful and Easy-to-use Data Computation Tool


esProc is the development tool for database computation. esProc IDE is simple and easy-to-use, providing an higher development efficiency than SQL does. It is especially ideal for reaching a complex computational goal, or acting as a data source computation tool of reports, or a data computational layer of applications.

Characteristics: Tailored for Database Computation

1. Its basic data type supports the structured data

The TSeq is the commonest basic data type introduced in esProc  As the result set of esProc, TSeq is the set of structural records, which is same as that of SQL; However, TSeq is more superior than the result set of SQL in many respects owing to its support for the access via sequence number, generic data, and explicit set. The TSeq can be used for common computations on structural data, and more suitable for simplifying the complex database computation.

2. Its syntax structure is especially tailored for the database computation.

The syntax of esProc is agile and efficient, especially designed for the database computation. For example:

Basic filtering: A1.select(conditions)
Dichotomic filtering: A1.select@b(conditions)

Dichotomic filtering and filtering out the complementary set: A1.select@bx(conditions)

Getting the amount field for the last record: A1.m(-1).(amount)

The intersection of 2 result sets: A1^B1

The cyclical function of esProc can simplify and streamline the complex SQL, for example:

Add the computational column LRR, and compute the yearly link relative ratio of amount: A1.derive(amount/amount[-1]-1: LRR)

Compute the moving average of recent 3 days, and assign it to column ma:A1.run (ma= ~{-1,1}.( amount).avg())

3. Fascinating functions for database
In esProc IDE, users can compose SQL statement directly, and take advantages of the database structure browser, SQL wizard, and other facilitating functions. The figure is shown below:





4. Retrieve and modify the structural data directly

The structural data is mainly stored in the database, and partly from the Excel and Txt.  For these three types of data, esProc supports the direct retrieval and modification.

For example, firstly, retrieve the order information from the database and client details from Txt file. Secondly, by computing, find out the clients who have bought the products of all kinds. Lastly, write the result into the Excel file.

Characteristics: Easy-to-use Development Environment

1. Cellset of grid style

The script of esProc is stored in the grid-like cellset, which saves the effort of formatting. The scripts are presented in a clear and readable way by nature. For example, scripts will auto-aligned to the ruler. When composing the judgment statement, loop statement, and other long statements, users can be benefited by indentation in indicating the work scope of computation straightforwardly. The figure is shown below:













2. Step-by-step computation

The step-by-step refers to decomposing the computation goal into several simple steps. This is the most effective method and the most important metric on the ability to solve the complex computation. Because SQL lacks the ability to support the step-by-step computation, it is quite difficult to achieve the complex computation goal. With the grid style, esProc can achieve the step-by-step computation and result reuse easily.











As shown above, the data filtering for B5 cell has completed easily. Click B5 to view the result of this cell on the right directly. In other cells, B6 for example, the result of B5 can be referenced directly through the cell name. No need to define the variables specially. B6 has completed the grouping and summarizing on B5, and B7 can continue to work on B6. In this way, the interactive computation can be carried on constantly. Each step only requires completing one simple computation to get the solution to the complex computational goal.

3. Debug functions
esProc provides the perfect debugging functions, with support for the breakpoint, single step, and run to cursor functions, as shown in the below figure:










Many long SQL/SP statements can only be composed and comprehended as a whole. The internal working details cannot be monitored. So, their debugging functions are not practical. For example, for the grouping and the summarizing, esProc can implement them in 2 steps, while SQL cannot.

4. Instant computation mode

esProc supports the instant computation mode of auto-computing after each step of scripting. The result will auto-appear in the result column on the right side. With the instant computation mode, users can script and monitor the result at the same time. The algorithm for the next step can thus be decided on the basis of the characteristics of result. The computational procedure will be more focused, and scripting will be more smooth and natural. Neither R language, SQL, or other computational utilities have such ability.

5. JDBC output

Since esProc supports JDBC interface, other tools (reporting tools for example) or Java language can retrieve the result from esProc through JDBC interface. Judging from the code reuse and maintenance perspectives, esProc can be taken as the data computational layer of low coupling in the application. Regarding the performance, esProc can off-load the complex data computing from database, so that the pressure on database server is relieved greatly.

6. Big data computation

esProc has implemented the hadoop interface, is capable of being called by mapreduce, allows for the easy retrieval and writing to the HDFS, and supports the big data computing directly. esProc is especially fit for the complex data computation, which makes it superior than other big data computation tools.

7. Plotting arbitrarily
esProc supports the graphic plotting functions and the graphic parameter editor. Not only the common statistical charts can be generated directly, but also the underlying chart element control functions are made available to esProc users. They are thus enabled to plot the personalized charts of any kinds arbitrarily.



August 28, 2013

Dramatically Improving Your Java Programming with Innovative Ways

In Java, implementing via SQL is a well-developed practice for database computation. However, the structured data is not only stored in the database, but also in the text, Excel, and XML files. Considering this, how to compute appropriately regarding the structured data from non-database files? This article raises 3 solutions for your reference: implement via Java API, convert to database computation, and adopt the common data computation layers.

Implement via Java API. This is the most straightforward method. Programmers will benefit from Java API in controlling every computational step meticulously, monitoring the computed result in each step intuitively, and debugging conveniently. Needless to say, no learning cost is also an additional advantage of Java API.

Thanks to the well-developed API for retrieving and writing-back data to Txt, Excel, and XML files, Java has enough technical strength to offer the full support for such computation, in particular the simple computational goals.

However, this method requires great workload and quite inconvenient.

For example, since the common data algorithms have not implemented in Java, programmers will have to spend great time and efforts to implement all the ins and outs manually by aggregating, filtering, grouping, and sorting and some other common actions.

For another example of data storage and detail data retrieval through Java API, programmers will have to combine every data and 2D table with List/map and other objects, and then compute in nested loops at multi-levels. Moreover, such computation usually involves the set operations and relational computations on massive data, as well as the computations between objects and object properties. It takes great efforts to implement the underlying logics and even greater workload in handling the complex ordered computation.

In order to reduce the programing workload, programmers always prefer leveraging the existing algorithms to implementing all specifics by themselves. In view of this, the second choice below would be a better choice:

Convert to database computation. This is the most conservative method. Concretely speaking, it is to import the non-database data to the database via the common ETL tools like DataStage, DTS, Informatica, and Kettle. The advantages of this practice include the high computational efficiency, steadfast running, and less workload for Java programmers. It fits for the scenarios of great data volume, high performance demand, and medium-level computational complexity. These advantages are evident for the mixed computation on the database and the non-database files in particular.

The main drawback of this method is the great workload in the early stage of ETL and the great maintenance difficulty. First, since the non-database data cannot be used directly without field-splitting, merging, and judging, programmers have to write a great many of Perl/JS scripts to clean and re-organize the data. Second, the data is usually updatable, so the scripting must handle the changing incremental update issues. The data from various data sources can hardly be compatible with a normal form. So, the data is unusable before the level 2 or even the level 3 ETL process. Third, scheduling is also a problem when there are lots of tables – which table must be uploaded first? Which one is the second to upload? What’s the interval? In facts, the huge workload of ETL is always beyond our expectation, and it is always quite tough to evade project risk. Plus, the real-time performance of ETL is poor owing to the regular transit of the database.

In some operating environments, there is probably no database service at all for the sake of security or performance. For another example, if most data is saved in the TXT/XML/Excel and no database involved, then the existence value of ETL gets void. What can we do? Let’s try the 3rd method:

The common data computational layer is typified by the esProc and R. The data computational layer is a layer in-between the data persistence layer and the application layer. This layer is responsible for computing the data from data persistence layer uniformly and returning the computed result to the application layer. The data computation layer of Java is mainly used to reduce the coupling between the application layer and the data persistence layer, and alleviate the computational pressure on them.

The common data computational layer offers the direct support for various data sources - not only the database, but also the non-database data sources. By taking the advantage, programmers can access to various data sources directly, free from such things as real-time problems. In addition, programmers are allowed to implement the interactive computation between various data sources conveniently, for example, the computations between DB2 and Oracle, and MYSQL and Excel. In the past, such access is by no means easy to implement.

The versatile data computational layers are usually more professional on structured data, for example, it supports the generic, explicit set, and ordered array. So, the complex computational goals, which are tough jobs for ETL/SQL and other conventional tools, can be solved with this layer easily.

The drawback of such method mainly lies in the performance. The common data computation layer is of the full memory computation, so the size of memory determines the upper limit of the data volumes to handle. But both esProc and R support the Hadoop directly so that their users can handle the big data in the distributed environment.

The main difference between esProc and R is that esProc supports the direct JDBC output and convenient integrating with Java codes. In addition, esProc IDE is much easier to use, with the support for the true debugging, and scripts in grid, and cell name for direct referencing the computed result. R does not provide such advantages, nor support for JDBC, and thus a bit complex for R users to integrate. However, R supports the correlation analyses and other model analyses. R programmers do not have to implement all specifics to generate the computed result directly. R also supports the Txt/ Excel / XML files and other lots of more non-database data sources. By comparison, esProc only supports 2 of them. The last but not the least advantage of R is that the low-end edition of R supports the open source to the full.

The above is the comparison between these three methods, and you can choose the right one based on your project characteristics.

July 31, 2013

Five Useful Computation Layers Solve Java’s Data Calculation


The data computation layer in between the data persistent layer and the application layer is responsible for computing the data from data persistence layer, and returning the result to the application layer. The data computation layer of Java aims to reduce the coupling between these two layers and shift the computational workload from them. The typical computation layer is characterized with below features:

1.  Ability to compute on the data from arbitrary data persistence layers, not only databases, but also the non-database Excel, Txt, or XML files. Of all these computations, the key is the computation on the commonest structured data.

2.  Ability to perform the interactive computations among various data sources uniformly, not only including the computation among different databases, but also calculation between the databases and non-database data sources.
       
3.  The couplings between database and computation layer, as well as the computation layer and Java code can be kept as low as possible to facilitate the migration.
       
4.   The architecture can be non-Java but should be integrated with Java conveniently.

5.   Higher development efficiency in the respects of scripting, readability, debugging, and daily maintenance

6.  As for the tendency of the complex computation and big data computation, the computation layer can provide the direct support to achieve the goal.

In this survey, 5 data computation layers of Hibernate, esProc, SQL, iBATIS, and R language are tested and compared on the basis of the below metrics: maturity, low coupling, scripting, integration, UI friendliness, performance, complex computation, support for big data, non-database computation, cross-database computation, and convenience for debugging.

Hibernate

Hibernate is the lightweight ORM frame, which was invented by Gavin King, and is now owned by JBOSS. It is the outstanding computational layer in the non-distributed environment, for example Intranet. Hibernate provides the access mode based on the object completely, while esProc and iBATIS can only be treated as the semi-object or object-alike ones.
esProc is a newly-emerged Java development tool, especially designed to solve the complex cross-database computations. Unlike other data computation layers, esProc only takes SQL as a data source. Once data is retrieved from SQL, the computation in esProc is completely independent from SQL. By comparison, PJA/Hibernate would be forced to open the interface for SQL to handle some computations they are unable to handle.
Hibernate almost enables the complete uncoupling between computational scripts, Java code, and database completely. However, what’s a pity is that Hibernate still heavily rely on SP/SQL in many respects due to its lack of computational capability.


Besides, the EJB JPA is one of the computation layer protocols. Since Hibernate is actually the JPA, we will not dwell on it here.

Maturity: 4 stars. With more than a decade of market testing, Hibernate is already well developed and mature.

Low coupling: 4 stars. Hibernate was introduced for this advantage. But the local SQL is still unavoidable, and Hibernate is hard to achieve the perfect migration.

Scripting: 2 stars. Hibernate computation modes include the object reference and HQL. The former one can get 5 stars since it is quite easy. The latter one gets 2 starts because it is more difficult than SQL to lean, extremely tough to debug, and less efficient than SQL. Its unavoidable reliance on SQL to handle some computations makes users face the great challenge to use these two languages in combination. Let’s give it 2 stars and overall 3 stars on average. 
        
Integration: 2 stars. Hibernate is built with the pure Java architecture. So, to integrate, just copy the jar package and several mapping files, and pay attention to use the session well. It is easy to start, but far more difficult when it comes to the mandatory Hibernate cache, which demands so extremely strong architectural design capabilities that the normal programmers are not encouraged to explore it. Needless to say, the inherited disadvantage of ORM does not exist in other computation layers.

UI friendliness: 0 star. Hibernate provides the object generator, but lacks the most important HQL graphic design interface. Almost no usable GUI is available.

Performance: 3 stars. Its support for L3 cache is less capable than that of SQL. But it is equivalent to 60% of SQL all-roundly according to my personal experience.

Complex computation: 0 star. No support is available for the complex computation, and you may need the SQL/external tools.

Support for big data: 1 star. No direct support is available for hadoop architecture, and relevant research has been carried out.

Non-database computation: 0 star. No direct support is available for non-database computation.

Cross-database computation: 0 star. No direct support is available for cross-database computation. Each HQL only supports a single database.

Convenience for debugging: 0 star. The awkwardness in debugging is a fatal drawback for programmers.

esProc:

Maturity: 1 star. Only 1 year passes since its entering the marketplace. The breadth and depth of its application is worse than other data computation layer.

Low coupling: 4 stars. Its scripts are independent from databases and Java codes, and its algorithms have nothing to do with the concrete database, which can be concluded as the low coupling. Immigration to various databases can be implemented easily. Because the output interface is JDBC, immigration to reports can be achieved easily as well. This is an unmatched feature in comparison to other computation layers.

Scripting: 4 stars. It allows for scripting in grid, reference with cell name, direct verifying result at each step, and decomposing a complex goal to several simple steps. Its syntax focuses on object-reference but no object only. Unlike the descriptive style of SQL statements, the brand new experience requires some knowledge about esProc. Java programmers will have their own choices based on their own experiences.
        
Integration: 5 stars. A pure Java architecture is adopted by esProc. The JDBC interface is offered for easy integration by any database programmer without esProc background.

UI friendliness: 4 stars. Independent graphic editor is easy to use and intuitive. However, the helpdesk system is not friendly enough.

Performance: 2 stars. All computations are performed in memory. So, it is not recommended to handle too huge amount of data.

Complex computation: 5 stars. This is purpose to develop esProc.

Non-database computation: 3 stars. Support for Excel/Txt, but not XML or Web Service.

Support for big data: 4 stars. HDFS access is offered. Plus, it is said that the parallel computing is also supported, but the details in pending to reveal.

Cross-database computation: 5 stars. esProc syntax is independent from the specific database, and supports the cross-database computation by nature.

Convenience for debugging: 5 stars. The debugging function is perfect and quite convenient to use. Considering its supports for verifying the computation steps of the finest granularity, we can say no other computation layers can offer such convenience.

SQL

SQL/SP/JDBC is of one kind. They are old computation layers boasting the performance and flexibility. However, things change that SQL alone become hard to satisfy the need, such as the growing development of Java, data explosion, and emerging complex problems. Although there are not so many high scores SQL have achieved, the weights are generally the highest.

Maturity: 5 stars. The most mature one.

Low coupling: 0 star. High coupling! Except for lab use, it’s nearly impossible for users to write the computational scripts independent from the databases and codes.

Scripting: 3 stars. SQL is actually very difficult to write and maintain, and cost users a great deal of time to learn. Fortunately, SQL is mature and well established. There are many forums with rich contents. Hibernate becomes popular because it addresses the need to solve the incapability between various data.

Integration: 5 stars. The first lesson of Java programmers is taught to connect the database through JDBC.

UI friendliness: 5 stars. Abundant SQL development tools with high maturity are available. I myself have tried more than 10 tools.

Performance: 5 stars. Databases support this language directly with the highest performance.

Complex computation: 3 stars. SQL is quite fit for the normal computation. The complex problems can be also solved with SQL but a very tough procedure is unavoidable, while Hibernate cannot cope with it at all. SP appears with no great improvement to the reality. The code is hard to split, mainly owing to the complex goal is hard to be decomposed into several simple steps.

Support for big data: 1 star. Several database vendors have declared their support for big data. This adds fuel to the incompatibility of SQL statements, and I’ve never seen a successful case yet.

Non-database computation: 1 star. No direct support is available. ETL/data warehouse can achieve the goal at great cost.

Cross-database computation: 1 star. Support several databases but the performance is poor. In addition, the middleware like DBLink and link server can barely support it to a degree far from “arbitrary and convenient”.

Convenience for debugging: 1 star. It is quite hard for users to debug and check the intermediate results. Only after all scripts have been run can users to check the final result. The only solution is “programing with debugging” which is deliberately creating a great numbers of temporary tables instantly.

iBATIS:

The computation layer is powerful for its simpleness and agility. Unlike Hibernate, iBATIS encourages programmers to write SQL statements. So, its learning cost is the least. In addition, iBATIS has implemented the uncoupling between computational scripts and Java code at the least cost – 80% Hibernate functions at 20% costs. The pending unsolved 20% is the uncoupling between the computational scripts and database.

The complex computation environment is its weak points, for example, distributed computation, complex computation, non-database computation, and cross-database computation.

Maturity: 4 stars. iBATIS is a proven frame with decades of marketing test. It is my favorite frame, though it still has the drawback of insufficient support for cache.

Low coupling: 2 stars. SQL can be replaced seamlessly. However, it’s still SQL for specific database. In facts, this latter one is the database-related problem. Since the vendor is determined to retain the customers, the incompatiblilty of SQL ensures the inability to migrate. On the other side, the programmers always look for the freedom to migrate by whatsoever means.

Scripting: 3 stars. It is SQL.

Integration: 4 stars. Basically, it’s not difficult. It takes the beginner half a day to grasp it well.

UI friendliness: 4 stars. No graphic design interface for computational procedure is available, but SQL tools can be used instead.

Performance: 3 stars. It’s slightly less powerful than SQL, mainly because the conversion between resultSet and map/list is a bit more time-consuming. In addition, its support for cache is worse than that of Hibernate. By general comparison, their differences are not great. In my opinion, it is a failure to introduce the ORM along with the performance problem.
Complex computation: 3 stars. It’s the same as SQL, and stronger than Hibernate.

Support for big data: 1 star. Same as SQL

Non-database computation: 1 star. Same as SQL

Cross-database computation: 1 star. Same as SQL

Convenience for debugging: 1 star. Same as SQL

R language

R is not easy to integrate with Java. However, it is worth to mention because of its powerful computational capability, wide support for communities and advantages in big data. Needless to say, it is the hardest to learn among all these computation layers.

Maturity: 5 stars. The long history of R is only shorter than that of SQL. R has been a hot topic in many forums, in particular in the age of big data.

Low coupling: 4 stars. R language makes no difference to that of esProc in this respect.

Scripting: 3 stars. In this respect, R is very similar to esProc. But esProc is more agile, more flexible in scripting, and more professional in supporting the structural data, while R has a great number of inbuilt model syntax. Let’s call it even.

Integration: 1 star. R is not built with Java architecture, and hard to integrate with Java. Considering its comparably unsatisfactory performance, the performance would drop dramatically once integrated.

UI friendliness: 3 stars. A specific IDE interface is offered. However, it is not finely built, and suffers the low usability, which is common to all open source products.

Performance: 2 stars. Full memory computation makes it hard to handle large data volume.

Complex computation: 5 stars. It’s similar to esProc.

Support for big data: 3 stars. There is a combination mechanism of using R together with Hadoop. But it is not easy to combine the non-Java system and Java-system, which also compromises the performance greatly.

Non-database computation: 5 stars. It’s similar to esProc.

Cross-database computation: 5 stars. It’s similar to esProc.

Convenience for debugging: 2 stars. The debugging is barely offered and is very unprofessional.