Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How does Java process data without Database

  1. #1
    Junior Member datathinker's Avatar
    Join Date
    Jul 2013
    Location
    Beijing, China
    Posts
    7
    My Mood
    Daring
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How does Java process data without Database

    Java programmers are always working with questions. Similarly some days earlier, I came up with an issue about Data process (here refers to Data query, Select result set from data source after processing). Whenever DATA is involved in our java application, what comes to our mind immediately is Database, because it’s easy, powerful, but costly. So here I would like to discuss how does java process Data without database?

    In my application, my data-source is an Excel sheet downloaded from a finance website; I have to figure out the Shares rising for N consecutive days in a certain period. For the computation on structured data, programmers usually embed the SQL statements in the Java code, and access the database server via JDBC.
    This is what we did conventionally when Database is employed.

    Without Database, I tried many ways to work this out. Initially I tried to process Excel Sheet Data with java coding, but I failed because it became very complex for java to complete simply data computation. One issue is how to store these data imported from Excel Sheet. No more options except List. How about aggregating, filter, sorting and grouping, we can not imagine how complicated this is. How to figure out the Shares rising for N consecutive days in a certain period from an Excel Sheet downloaded from finance web? I consulted many people and they shared their similar experience with me. One of the solutions they shared with me is called esProc which I never heard of before, At first look, it is similar with Excel cell style, it is a little bit new for me, but it is not difficulty to use. In my case, the code for this issue is given below:

    A1: =file(“E:\\targetData.xlsx”).import@t() //import data
    A2=A1.select(Date>=paramStart&&Date<=paramEnd) //filter by data
    A3=A2.group(Code) //group by Code
    A4=A3.(~.sort(Date)) //sort by Date in each group
    A5=A4.(~.dup@t()) //change to Tseq(structured data)
    A6=A5.(~.derive((Close-Close[-1]):INC)) //add a colum, increased price
    A7=A6.(~derive(if(INC>0,CID=CID[-1]+1,0):CID)) // add a column, continuous increased days
    A8=A7.select(~.max(CID)>=ParamNDays) //stock max CID is bigger than N days
    A9=A8.(~.Code) //finally, stock code


    My difficult issue is solved, but it is with the help of a data process middleware esProc, and I failed to work out this purely with java or other tools. Here I would like to see what would you do if you are having similar case? Please share with me and put you idea or code in your reply, thanks.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: How does Java process data without Database

    It's a lot of reading, and I have no idea what your question is . . . well, I gave up somewhere in paragraph #3. Can you just ask a short question without the story?

    What are you trying to do? What code have you written to do that? What didn't work with that approach? Post a short code example and/or a sample run to illustrate the problem.

Similar Threads

  1. Replies: 1
    Last Post: August 5th, 2013, 02:30 PM
  2. Not able to inser data in mysql database
    By vineetpbpl in forum What's Wrong With My Code?
    Replies: 4
    Last Post: June 27th, 2013, 09:43 AM
  3. how to get a data from database and store it in a variable?
    By jabaman in forum What's Wrong With My Code?
    Replies: 4
    Last Post: December 6th, 2012, 03:34 PM
  4. How to delete several data in database using java?
    By shihab2555 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 8th, 2012, 04:57 PM
  5. [SOLVED] Using Java CheckBox to insert data to MSAccess Database
    By sandlucky in forum JDBC & Databases
    Replies: 1
    Last Post: May 15th, 2011, 11:43 PM