Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Interactive Query and Analysis Computation

  1. Mar 5, 2012 #1
    The decision support is based on the query computations on the existing database. The interactive query is the basic need of end users. The accurate and complete retrieval conditions can help user get the required data from the database.

    At present, there are two kinds of interactive query solutions:

    Regarding the tools for interactive query computation, the most common tool is SQL statement querying directly on the database. But, using SQL or stored procedure to query will bring about various troubles. First, users must grasp the database structure and know the name of every table and their relations, just like a database administrator. Second, SQL as a generic query language is quite awkward to deal with the complicated computation: Using SQL to carry out a programmed computation, the developer may be unable to carry through the computation or have to write a long string of complicated statements.
    The interactive computation can also be implemented by programming directly. But this method will result in a much higher difficulty and great workload if compared with using SQL. Moreover, the program is not suitable to modify once programming is completed. You will be unable to handle it timely if the business logic changes or there is a new computation task
    We may need to obtain some useful information by analyzing and computing from time to time, based on the raw data fragment in the database, such as:

    Is there any stock rising to the expected rate for three consecutive business days in a month?
    What are the top n clients achieving half of total sales?
    Is there any goods sold out for at least 3 times by PM 5 in a month?
    What is the average interval between the purchases of iPhone and later the iPad by a same customer?
    Is there any subscriber run out of credit to pay the telephone bill?

    If using SQL to solve these problems, then you may have to write the complicated nested statements to conduct such kind of queries. Only those having a relatively strong technical ability could take the tough job, and such SQL statements are hard to read and comprehend. Programming is not a suitable way to handle such highly flexible problems.

    esProc can complete such jobs perfectly because it only requires relatively less codes to implement the complicated computation.

    For example, from the stock exchange data of a month in a certain exchange, how to pick out the stocks whose increase amplitude is over 3% for three consecutive trading days?

    Sort the trading records by the code(ISIN) and the transaction date(Date), and then group by ISIN. Then, the rise amplitude of a certain stock can be simplified as the rise amplitude resulting from the difference between the present closing price and that of the previous trading day. At last, you can simply pick out the stocks that rise over 0.03 for three consecutive trading days.
    67226648.jpg


    The query in esProc can be carried out by step, and the purpose of each step is clear and easy for user to look into. Through computing, the group of stocks rise over 0.03 in three consecutive trading days is found:
    68019301.jpg


    You can double click to have a look on the detailed record in the group:
    68019306.jpg


    In A8, only the ISIN serial numbers of stocks satisfying the conditions are listed:
    68019327.jpg


    In addition, you can also firstly compute the maximum consecutive rising days during which any stock rises over 0.03, and then filter:
    68019348.jpg

    With esProc, you can easily invoke the computation in the cells whenever necessary. This is quite beneficial for those computations to be done in steps. In A10, the data from A5 is reused to compute the maximum consecutive days during which every stock in the group rises over 0.03. Then, in A11, select the code ISIN of stock that rise for over 3 consecutive days. The result is the same as that of A8:

    68019327.jpg

    With esProc, you can add field and sort, group, filter, sum up, and perform other actions on data to complete the complicated interactive query computation perfectly.

    ----------------------------------------------------
    check Interactive Query Computation for more detail
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Interactive Query and Analysis Computation
  1. Query on Ricci Tensor (Replies: 1)

Loading...