Forum Stats

  • 3,874,089 Users
  • 2,266,676 Discussions
  • 7,911,721 Comments

Discussions

save a huge data into oracle column

2875841
2875841 Member Posts: 43
edited Feb 3, 2015 10:14AM in New To Java

How can i save an expression like (a & b) | C | D | (e & f) in oracle. And how how can i retrieve that in java.

a ,b c,d are some values.

Tagged:
BluShadow2875841
«1

Answers

  • BluShadow
    BluShadow Member, Moderator Posts: 42,555 Red Diamond
    edited Feb 2, 2015 9:03AM

    Explain what it is you actually want to store.

    Oracle as a database doesn't have a datatype for expressions.  It can store strings as varchar2, it can store numbers, it can store date's and some other datatypes, but expressions are code that typically evaluate to a boolean result (and oracle doesn't support storing of booleans), though you haven't specified if it's the result of the expression you want to store or the expression itself.

    Be clear in your question and you'll get more clear answers.

  • Unknown
    edited Feb 2, 2015 12:11PM
    How can i save an expression like (a & b) | C | D | (e & f) in oracle. And how how can i retrieve that in java.
    a ,b c,d are some values.
    

    What does that have to do with your thread subject 'big data'?

    JDBC can be used to both store and retrieve values.

    You can compute the value result of that expression in Java and store the result. Or you can just store the string expression and compute the value llater.

    What PROBLEM are you trying to solve?

  • 2875841
    2875841 Member Posts: 43
    edited Feb 2, 2015 12:43PM

    @ Blu Shadow

    I will elaborate my question here . I have set of criteria and each criteria have a collection of criterions.For example my criteria is Location corresponding criterions are I can select like (loc1 & loc2) | (loc3) | (loc4 & loc5) etc .So I have to save these criteria and criterions in to db. If I create CLOB data type to store these criterions ,will it possible.If so how can i show the details in java. Hope you got my question.

    Or do you have any other suggestion in table structure and display.

    Thanks

  • 2875841
    2875841 Member Posts: 43
    edited Feb 2, 2015 12:45PM

    rp0428

    Please check my new comments

  • 2875841
    2875841 Member Posts: 43
    edited Feb 2, 2015 12:46PM

    @ Blu Shadow

    I will elaborate my question here . I have set of criteria and each criteria have a collection of criterions.For example my criteria is Location corresponding criterions are I can select like (loc1 & loc2) | (loc3) | (loc4 & loc5) etc .So I have to save these criteria and criterions in to db. If I create CLOB data type to store these criterions ,will it possible.If so how can i show the details in java. Hope you got my question.

    Or do you have any other suggestion in table structure and display.

    Thanks

  • 2875841
    2875841 Member Posts: 43
    edited Feb 2, 2015 11:15PM

    I need to store logic conditions in database and want show in java

    example(condition1 & condition2) | (condition3) etc

  • BluShadow
    BluShadow Member, Moderator Posts: 42,555 Red Diamond
    edited Feb 3, 2015 3:23AM

    Well, what datatype would you think a logical condition should be stored in?

    http://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements001.htm#SQLRF0021

    The only data types that could store such a 'condition' or 'expression' would be a string based datatype such as VARCHAR2 or CLOB.  However, then it's not a logical condition, it's just a string, so how you're going to use that in your java again depends on what you plan to do with it.

    It sounds as though you're trying to do some dynamic code of some sort, which is often a bad idea.  Perhaps if you explain what it is you're actually trying to achieve, rather than how you're trying to solve it, then people could suggest more appropriate solutions.

  • 2875841
    2875841 Member Posts: 43
    edited Feb 3, 2015 6:22AM

    This is my requirement .UI side

    Som crtiterias here                                                           result

    A1

    (ERN & TVR ) | (CLT) | (ADS & MDF)

    A2

    B|C

    here ( ,& | are free test .The ERN and TVR are value from value chooser.So its a VO.If I select A1 from left side corresponding result can fetch from rt side.

    I want to save this information in oracle db and will display in java.How its possible

  • PhHein
    PhHein Member, Moderator Posts: 7,257 Silver Trophy
    edited Feb 3, 2015 7:08AM

    Save them as VARCHAR2 .

  • 2875841
    2875841 Member Posts: 43
    edited Feb 3, 2015 8:19AM

    no its not possible because in the second column we have upto 50 resultts and how can i display the results in java.Are you suggesting to save it as a single column or seperate row for each results.Let me know your suggestions

This discussion has been closed.