File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes storing/retrieving many large double[] arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "storing/retrieving many large double[] arrays" Watch "storing/retrieving many large double[] arrays" New topic

storing/retrieving many large double[] arrays

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
As the title reads, I have to manage many (> 20000) large double[] arrays (length > 100000). These arrays represent measured power consumption values (KWh) with an interval of approx. five minutes.
These array values are used for billing purposes as well as near future power consumption forecasts. These arrays have to be stored in an RDBMS, notably Oracle comes to mind. Object databases are out of the question, because our customers don't even know what these things are ...
I am not an SQL/RDBMS expert; I'm a mathematician I have to confess, so basically I know nothing at all My question boils down to this: how can I store/retrieve/update these arrays as efficiently as possible?
I've been reading my way into BLOBS. Saving/loading a double[] array into a blob is a two step process: wrapping a DataOutputStream around a ByteArrayOutputStream, hooked up to a BLOB does the job, but somehow I feel that this is going to be slow.
OTOH, most (all?) of those RDBMS's implement an 'ARRAY' type; are these ARRAYs resizable? They need to be, because newly measured data have to be appended to the existing 'vectors' of data. If these arrays aren't resizable, they're useless for my purposes, but if they aren't could they be a solution to my problem?
I'm a bit stuck at the moment, so I'd really appreciate tips, hints, solutions, anything.
thanks in advance and kind regards,
I agree. Here's the link:
subject: storing/retrieving many large double[] arrays
It's not a secret anymore!