Storing Array of Floats as a BLOB

I am designing a new laboratory database. For some tests, I have several waveforms with ~10,000 data points acquired simultaneously. In the application (written in C), the waveforms are stored as an array of floats.
I believe I would like to store each waveform as a BLOB.
Can the data in a BLOB be structured in such a way that Oracle can work with the data itself using only SQL or PL/SQL?
* Determine max, min, average, etc
* Retrieve index when value first exceeds 500
* Retrieve 400th number
* Create BLOB which is a derivative of first BLOB

Let me start from your last question should I use BLOBS?, the answer is simple - NO, why the hell do you need to store is on BLOB's, you are talking about 6,000,000 rows per day it avarag no more, uses reular tabular reprisentitiona and you will be able to query the data properlly.
1. If I decide to use a BLOB then the calculations must be performed in the application. Correct? - Yes
2. In order to query on data derived from the raw data, the result of any calculations must be re-inserted into the database. Correct? - Not exacly.
3. Considering the quantity of data and how I want to use it, should I use BLOBS? - Regulat tabular represintition, and you can archive the data after X day or use summery tables.

Similar Messages

  • Converting float array to Float array

    Hi, is there any efficent way to convert float[][] to Float[][] without iterating the array and creating Float object for each float data? I have a method performing calculations based on a 2D array( float[][]) and then need to store the result in a TreeMap data structure. The "put" method for TreeMap ask Object type.
    Thanks in advance!

    1) No
    2) An array of float is an object as well:
    Object obj = new float[]{1.0, 2.0, 3.0};3) What you want to store? If your structure is somewhat like this:
    float[][] f = {
       { 1.0, 2.0, 3.0 },
       { 4.0, 5.0, 6.0 },
    };and you want to "index" your TreeMap by the first element of each row of your float[] array, you could do something like this:
        SortedMap sm = new TreeMap();
        sm.put(new Float(f[0][0]), f[0]); // Arrays are objects as well
        sm.put(new Float(f[1][0]), f[1]); //and so on.

  • Actually PRINT (i.e. spool to a printer) a PDF stored in the DB as a BLOB

    Hi Folks.
    I have got APEX to generate PDF files for me based on a shared components query & report template. These are stored in the database as BLOB.
    Is there a way to send these BLOB PDF files directly to a printer?
    I don't want to have to export the files to the server file system and then have the user manually select them from there for printing. Ideally I want the users to select the documents for printing in the UI and these then get spooled to the printer.
    If anyone has a suggestion/steer for me, I'd love to hear it.
    Many thanks
    Simon.
    Application Express 3.1.1.00.09
    Database 10.2.0.3.0
    BI Publisher 10.1.3.3.2

    Hi Tyler
    OK, here's where I'm at...
    Got SoapUI 2.0.2
    Creating a new project
    Setting initial WSDL to http://xx.xxx.x.xx:9704/xmlpserver/services/PublicReportService?wsdl
    (Real IP substitued with 'x' for security)
    'Create Requests' - Checked
    'Create Project File' - Checked
    When I press 'OK' I get an error message stating...
    "com.eviware.soapui.support.SoapUIException: Error importing wsdl"
    A bit more info.
    If I enter the following into my browser address bar...
    http://xx.xxx.x.xx:9704/xmlpserver/services/PublicReportService
    I get...
    PublicReportService
    Hi there, this is an AXIS service!
    Perhaps there will be a form for invoking the service here...
    And If I enter...
    http://xx.xxx.x.xx:9704/xmlpserver/services/PublicReportService?wsdl
    I get...
    AXIS error
    Sorry, something seems to have gone wrong... here are the details:
    Fault - ; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: Implementation does not support the object requested.
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: oracle.xml.parser.v2.XMLDOMException: Implementation does not support the object requested.
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}hostname:xxXXXX
    Am I missing something?
    Kind regards
    Simon.

  • Storing array(or other data structure) in a session object

    hi wise ones
    to minimise my calls to a database I would like to store the information retrieved from a ResultSet in an array and then store this in a session object, retrieving it with getAttribute("nameOfArray"); when I need it.
    I have tried to print the object contents to test what is happening but am getting a[b] [Ljava.lang.String;@11d646c[/b] response which is something, but not what I expected.
    Is using a session the right way to make the information available to all servlets? If not what other method is appropriate?
    thank you

    thanks for your comments Annie & MLRon. I have tried both suggestions but am still hitting problems
    the usual method to get the elements results in my compiler complaining that sessionINFO is an object and .length cannot be applied to an object.
    for (int i = 0; i < sessionINFO.length; i++) {
                       out.print(sessionINFO);
                   out.print("<BR>");
    An array IS an object though?
    I have used Arrays.asList(sessionINFO) and get another compiler error stating that java.util.Arrays cannot be applied to an object
    I took my variables from the ResultSet and converted them all to Strings and put them into a String array
    int bankIDLogin=customerResults.getInt("id");
                                   //convert to String for array
                                   String bankIDLoginSTR = String.valueOf(bankIDLogin);
                                  String passwordLogin =customerResults.getString("password");
                                  String accNo=customerResults.getString("number");
                                  float accBal=customerResults.getFloat("balance");
                                  //convert to String for array                              
                                  String accBalSTR = String.valueOf(accBal);
                                  //put info into array
                                  String[]customerDetails={bankIDLoginSTR,passwordLogin,accNo,accBalSTR};then I put that array into the session object
                        HttpSession session =req.getSession(true);
                        session.setAttribute("id",bankID);
                        session.setAttribute("customerdetails",customerDetails);In a separate servlet I called the session object
    Object sessionINFO = session.getAttribute("customerdetails");How can I get the original array out of this object?
    What should I do if more than one result set is created and I need to create two session objects with customer details, (one customer has two accounts)? multi dimensional array?

  • Storing array elements

    I'm running quite a big application. I'm storing data in an array what I find that that while the application is running the value of the elements inside the array is not releasing even though the idex of the element is already passed to the next one. Hoever the values of the elements inside the array will be showed after the application is complete. This is not what I want I want to show that index array is the application taking the data from at the moment and what value of the data. How can I see those current values instead of seeing them after the application is completed?

    There's probably probably something in your code that prevents the array from being updated straight away.. My guess is that it's a data flow problem. Let's say e.g. that the array you are looking at is wired to the output of a VI, a shift register, or through the side of a loop, case or sequence...then the array does not really receive the new data until everything inside that structure (VI/loop etc...) is finished running. LabVIEW does not release the data coming out of such structures until all outputs of that structure is ready...so you need to put the indicator inside that "border" or use a local/global (functional) to see the data on the fly...
    If you could take a picture of the code; showing the array terminal /wires and the data source ...or a copy of the VI(s
    ) that would help pin-point the problem.
    MTO

  • Storing array of single bits

    Hi, I have an object in my application which is hogging memory as there is up to 3million
    of them in memory at one time and i am trying to cut down the size of it.
    the core data structure is an array of 1's and zero's.
    currently i'm using a byte[] to store these.
    Because i know i only ever want to store a 1 or a 0 at each index, is there a way of storing
    these as a boolean[] {1bit of storage in my understanding} so that i can save memory

    Here's an example of packing 8 of your bytes from the array into a byte, then unpacking it into a String.
            byte[] ba        = {0, 0, 1, 0, 1, 0, 1, 0};
            // when packed into a byte the array value is decimal 42
            //Pack a byte
            byte packedByte  =
                (byte) ((byte) ((ba[0] & 0xf) << 7) |
                        (byte) ((ba[1] & 0xf) << 6) |
                        (byte) ((ba[2] & 0xf) << 5) |
                        (byte) ((ba[3] & 0xf) << 4) |
                        (byte) ((ba[4] & 0xf) << 3) |
                        (byte) ((ba[5] & 0xf) << 2) |
                        (byte) ((ba[6] & 0xf) << 1) |
                        (byte) ((ba[7] & 0xf) << 0));
            System.out.println("The byte value is " + packedByte);
            //Unpack a byte
            String UnpackedByte = Integer.toBinaryString(packedByte);
            System.out.println("The binary string is " + UnpackedByte);

  • Storing arrays in a single file!!

    Hello all,
    Is it possible to store two arrays into a single file either separately or together as a POJO. How to accomplish this??..Need some guidance

    try DataInputStream and DataOutputStream
    ObjectInput/OutputSTream is used to store Object which use more space.

  • MYSQL JSP  Storing array to a database

    I have an combobox by which multiple values can be selected. I need to store the values available in the combo box into mysql database as an array in the database.
    eg:
    If I select one,two,three,four as values for the number field
    then in the db it should be shown like this
    name | values
    number | one
    | two
    | three
    | four

    Ok here is the sample code
    Table in db
    mysql> create table test (a INT NOT NULL, b SET('USA', 'India', 'Pakistan', 'Russia'));
    First.htm (say)
    <html>
    <body>
    <form name="frm" action="Test.jsp" method="post">
    <input type=text name="na" >
    <select size="1" name="a8" tabindex="7" multiple>
    <option>India</option>
    <option>USA</option>
    <option>Russia</option>
    <option>Pakistan</option>
    <input type="submit" name="abc" value="ok">
    </form>
    </body>
    </html>
    First.jsp
    <%@ page language="java" import="java.sql.*"%>
    <html>
    <head>
    <title>Testing SET in MySQL</title>
    </head>
    <body>
    <%
    String arr[] = request.getParameterValues("a8");
    String strToInsert = "";
    for(int i=0; i<arr.length; i++) {
    if(i==arr.length-1) {
    strToInsert += arr;
    } else {
    strToInsert += arr[i] + ",";
    out.println(strToInsert);
    String strID = request.getParameter("na");
    int iID = Integer.parseInt(strID);
    Class.forName("Driver");
    Connection con = DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/dbName?user=username&password=password");
    Statement stmt = con.createStatement();
    stmt.executeUpdate("insert into test values("+iID+", '"+strToInsert+"')");
    %>
    </body>
    </html>
    I assume that int value will be sent in text filed named "na".
    Above file will insert record in db.....

  • Storeing values in floate data type upto two decimal places

    Hi
    I want a float type field in my table but want to store value up to two decimal places.
    so what syntax i need to follow plz suggest.
    thanks

    it is not possible to store with Number datatype. if you are using the data to sho report, then change its format (like 45 to 45.00). if you want to store 45.00 in database, then you have to modify the datatype for that column. for this follow the following path
    1. Add a column of datatype Varchar2.
    2. Copy all the value of your number field to it.
    3. Drop the old column.
    4. However make sure that if you have used that column somewhare in arithmetic calculation, the modify it and use to_number function to do arithmetic opration.

  • Storing array in session

    hi guys, i need your advice , is it safe to store array in session will it use up the webserver memory ? thanks a lot

    hi,
    session.setAttribute("attibuteName", Object);
    you can put all u need in your sesion's attributes.
    get them with:
    if(session.getAttribute("attributeName")!=null) variable = (variableDataType) session.getAttribute("attributeName");
    for example:
    vector myVector = new Vector();
    if(session.getAttribute("myVector")!=null) myVector = (Vector)session.getAttribute("myVector");
    hope this helps
    Message was edited by:
    Tobi

  • Stored Procedure or function to extract Blob

    How can I extract Blob from Oracle to the way it was inserted in the db ? I tried using utl_raw but it gave me "Buffer too small"
    ERROR at line 1:
    ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual:
    236143, maximum: 2000)

    I am trying this but it's not working for some reason:
    create or replace function F(B BLOB)
    return clob is
    c clob;
    n number;
    begin
    if (b is null) then
    return null;
    end if;
    if (length(b)=0) then
    return empty_clob();
    end if;
    dbms_lob.createtemporary(c,true);
    n:=1;
    while (n+32767<=length(b)) loop
    dbms_lob.writeappend(c,32767,utl_raw.cast_to_varchar2(dbms_lob.substr(b,32767,n)));
    n:=n+32767;
    end loop;
    dbms_lob.writeappend(c,length(b)-n+1,utl_raw.cast_to_varchar2(dbms_lob.substr(b,length(b)-n+1,n)));
    return c;
    end;
    I get ORA-22921: length of input buffer is smaller than amount requested
    ORA-06512: at "SYS.DBMS_LOB", line 833
    ORA-06512: at "SYS.F", line 15

  • Creating array of float...

    import java.io.*;
    import java.util.*;
    public class AskUser{
         public static void main(String args[])
              throws IOException
              Float amt[] = new Float[3];
              String option;
              String flag = "y";
              String userInput;
              BufferedReader stdin = new BufferedReader
                   (new InputStreamReader(System.in));
              for(int i = 1;i<4;i++)
                   System.out.print("Enter your price"+i+":" );
                   userInput = stdin.readLine();                          
                   amt= Float.parseFloat(userInput);
              System.out.print("Do u want to print out the amount the user enter??[y/n]");
              option = stdin.readLine();
              if(option.equals(flag))
                   for(int j =1; j<4;j++)
                        System.out.println("The price u enter is $ "+amt[j]);
              else
                   System.out.println("Thank u for using our system.");
    how come there is an err in this program???

    amt= Float.parseFloat(userInput);
    You can't put a float value into a Float variable.
    This will fix it.
    amt[i] = new Float(Float.parseFloat(userInput));

  • Storing very small floats

    We're trying to store small decimal numbers (in the region of e-300), is there a way to do this? There seems to be a hard limit on how low you can go before a number is rounded out to 0, as these statements show:
    SELECT DUMP(6.4322131131214125e-130) FROM DUAL
    Typ=2 Len=10: 128,7,44,23,14,12,32,22,42,26
    SELECT DUMP(6.4322131131214125e-131) FROM DUAL
    Typ=2 Len=1: 128
    SELECT DUMP(6.4322131131214125e-132) FROM DUAL
    Typ=2 Len=1: 128

    You use the NUMBER datatype to store fixed or floating-point numbers. You can specify precision and scale. The maximum precision of a NUMBER value is 38. The magnitude range is 1.0E-130 to 9.99...9E125 (38 nines followed by 88 zeroes). Scale can range from -84 to 127.
    Oracle can represent numbers with greater precision than most floating-point implementations because the internal format of Oracle numbers is decimal. This can cause a loss of precision when fetching into a FLOAT variable

  • How can I run a sequence file which is stored as BLOB

    Hallo,
    I' using (or better will use) TestStand 3.1 and a ORACLE database. Is there a way to load and execute sequence files which are not stored on the filesystem but as BLOBs in the ORACLE DB. The choice which sequence has to be executed is done dynamically within a custom built process model. A certain sequencefile should be loaded and started by referencing it not by filename but with the PrimaryKey of the table.
    I don't know if this would be a certain capability implemented in TestStand or in ORACLE. It could be something like mapping a BLOB into the Filesystem and pretend that the file is present on the filesystem, something like that!
    Any ideas are highly appreciated
    Thanks
    Oliver Friedrich

    Oliver -
    TestStand does not have any hooks to allow a test system developer to override the internal searching for a file on disk. The only simple option that I see is to to query the database and download the latest sequences ahead of time. This is similar to a Source Code Control mechanism. Keep in mind that once an execution loads a sequence file, the file is typically not released until the last execution completes so you cannot load an updated copy of the sequence file while executing, especially the client sequence file.
    Scott Richardson
    National Instruments

  • Diaplay  Word file stored in blob into a browser using JSP

    Dear All
    I have files stored in oracle table in a blob field.I store the files using forms 10g and webutil. I can upload the files and display them successfully in forms, however when i use JSP to retrieve the files and display them in Internet Explorer, I'm able to display the pdf files, bmp , jpg and video but I'm getting junk characters when I try displaying (word , excel , access or powerpoint files which might contain arabic Characters )
    the code I use to display the files is as follows :
    <%
    try
    Connection conn = null;
    String username=session.getAttribute("username").toString().toUpperCase();
    String password=session.getAttribute("password").toString().toUpperCase();
    String ip = "*****************";
    String sid = "***************";
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@"+ip+":1521:"+sid,username,password);
    String par = request.getParameter("LETTER");
    String par1 = request.getParameter("SERIAL");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("select * from TableName where PK1 like '"+par+"'"+" and PK2 like '"+par1+"'" );
    if (rs.next())
    Blob pic = null;
    byte[] blobBytesArray = null;
    OutputStream stream = response.getOutputStream();
    pic = rs.getBlob("BLOBFIELD");
    int len = new Integer( new Long( pic.length()).toString() ).intValue();
    blobBytesArray = pic.getBytes(1,len);
    if (blobBytesArray != null)
    if (blobBytesArray.length > 0 )
    stream.write(blobBytesArray) ;
    catch(Exception e)
    System.out.println("Exception: " + e.getMessage() + "<BR>");
    %>
    can you please guide me of how to display other file types.
    Best Regards.

    Hello,
    Ideally when you store the document put the content-type in a column and set the content type in your JSP. This will indicate to the browser what is the type of file and you should not have any issue with any type.
    Regards
    Tugdual Grall

Maybe you are looking for

  • Report in new page does not know of session and presentation variables

    I have a question about GOURL. I am using GOURL as a column function in one report (report A), so that when i click on that column it takes me to another report(report B) that open in new popup window. the first report (A) also uses some session and

  • TDS line item not generated during down payment.

    Hi, TDS line item not generated during down payment to vendors. Advanced tax codes have been properly assigned to vendors. Kindly help. Thanks in advance... Regards, Sriram.

  • Created jar-file doesn't find other jars

    Hi, I built an application using jars (among others the ojdbc14.jar) - working "perfectly" in eclipse. But when I create a jar - I receive an "Class-not-found-Exception", when the Class.forName("oracle.jdbc.driver.OracleDriver"); is invoked. I tried

  • Read Only Schema in Oracle APPS EBS R12 database

    I want create a read only schema say apps_read in EBS database which have select access on all objects like apps. Kindly let us know how can I accomplish it or What is the best practice of doing it.

  • Standard FI report

    I am looking for a report or reports that will list all changes in the master data for customers and suppliers (such as the creation of a new customer - supplier / banking information change / terms of payment).  The report/reports would need to be r