x
login register about faq

Efficient way to calculate value for mathametical function from db?

In .net application, either window or web application,

To perform different mathematical functions like sqrt, maximum,minimum,avg,count on larger amount of data. Using stored procedures or normal program logic using iteration. which is the best way for doing this.???

more ▼

asked Aug 07, 2012 at 02:08 AM

Suresh_K gravatar image

Suresh_K
17 8 10 9

(comments are locked)
10|600 characters needed characters left

1 answer: sort voted first

Hi Suresh, this will depends what's your focus. If the computation is for structured data or mass data or frequent computation, then stored procedures are better. If computation for data array and data is not so huge or occasional computing, then normal program logic is better. But both are not the best solutions. Because:

A stored procedure is a collection of SQL queries and flow control statements. The stored procedure is usually used to break a complex computation task down to several simple computation steps. Although the stored procedure can improve the flexibility at the cost of complexity, it is always hindered by the inherent drawbacks of SQL, such as incomplete stepwise mechanism, unordered data, and lack of sets and references.

Java is the most widely used programming language with an outstanding architecture. It is the top preferred language to develop the enterprise application. However, Java is not fit for the mass data computation. If encountering the computation that is too complex to be represented in a single SQL statement or it is not allowed to add stored procedures to database, then drawbacks of Java would be highlighted: no specific library function, lack of concise syntax for computation, lengthy and unreadable codes, and high demand on technical capability of developers.

Here is another solution-esProc. It not only overcomes the above drawbacks of SQL, but also greatly lowers the requirements on the technical background of developers. It is an ideal tool to substitute the stored procedure. Besides, esProc is the query language of a new generation with Java architecture and JDBC interface. esProc can uplift the computational capability of Java all-aroundly. You can have a try: http://www.raqsoft.com/download.html

more ▼

answered Nov 06, 2012 at 09:14 PM

JessicaQiu gravatar image

JessicaQiu
17 8 10 10

(comments are locked)
10|600 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3
x1
x1

asked: Aug 07, 2012 at 02:08 AM

Seen: 1959 times

Last Updated: Nov 06, 2012 at 09:14 PM