Searching XML - which is better?

I'm just starting with XML and will be querying mainframe
data provided in xml format. The file will be pretty large
(muncipal property database) and the idea is to get
up-to-the-minute data.as opposed to nightly dumps.
I'm unsure how to bring this into Coldfusion most
efficiently. The user will need to search based on property address
and then retrieve proprty details like taxes etc.
Logically XmlSearch would seem most efficient since it skips
the steps of converting to a query object, but I'll need to present
it all sorted in list formats too. Then there is the question of
resource consumption each time a person hits the site to search the
data.
I'm confused. Can anybody help steer me in the right
direction?
Thanks!

XML processing is pretty expensive, so if you have a lot of
searching, I think I'd try converting to a query and running tests
to see which is faster.

Similar Messages

  • Help with XML - which is better - Help needed

    Current version of Oracle:
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    I'm new to XML & this is my first post.
    Background: I have a "few" relational tables which are designed to assist the form scraping and to store the values as Key-Value-Attribute from the UI capture. (the change to the design is not possible at this time). I've also built the "normalized" schema which will hold the normalized data from this form-scrapping schema.
    In order to achive this: I plan on having (1) XML view which the UI will call and then it will be inserted/updated in the normalized schema (2) to be able to use the same XML by the BI publisher for reporting (3) end user query this form-scraping db to view as normalized data.
    Following are my thoughts about the approach & please correct & guide if my understanding/approach is wrong.
    After some good reading on this forum and other materials, I've come up with the below mentioned XML generation method. How can I convert this XML "record" such that it can satisfy the above stated.
    output:
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
      <FORM_TYPE_ID>900</FORM_TYPE_ID>
      <SYSTEM_NAME>HAZMAT_ENROLLMENT</SYSTEM_NAME>
      <FORM_TYPE>ENR-HAZMAT</FORM_TYPE>
      <FORM_ID>2371370</FORM_ID>
      <SUBMISSION_TYPE_ID>60</SUBMISSION_TYPE_ID>
      <FILING_DATE>29-APR-11</FILING_DATE>
      <SECTION>
       <SECTION_ROW>
        <SECTION_ID>6750</SECTION_ID>
        <SECTION_NAME>Personal Information</SECTION_NAME>
        <ATTRIBUTE>
         <ATTRIBUTE_ROW>
          <SRC>FRM_RSP</SRC>
          <ATTR_ID>30001</ATTR_ID>
          <ATTR_NAME>ENROLLEE_FIRST_NAME</ATTR_NAME>
          <ATTR_DESC>Enrollee&apos;s First Name</ATTR_DESC>
          <ATTR_VAL>Test First Name</ATTR_VAL>
         </ATTRIBUTE_ROW>
         <ATTRIBUTE_ROW>
          <SRC>FRM_RSP</SRC>
          <ATTR_ID>30002</ATTR_ID>
          <ATTR_NAME>ENROLLEE_MIDDLE_INIT</ATTR_NAME>
          <ATTR_DESC>Enrollee&apos;s Middle Initial</ATTR_DESC>
          <ATTR_VAL>Test Middle Initial</ATTR_VAL>
         </ATTRIBUTE_ROW>
       </SECTION_ROW>
      </SECTION>
    </ROW>
    </ROWSET>
    Code:
    *(All REF_% tables are lookup and FRM_RESPONSE is a KVA capture table and TBL_RESPONSE is also a KVA capture only used if the input is table wise (rows X columns))*
    FORM is made up of SECTIONs (1-to-many), SECTIONs contain ATTR_IDs (question ids, 1-to-many), %RESPONSE is always linked to an ATTR_ID
    CREATE OR REPLACE function DEVDBA.gen_xmlstr (p_form_id form.form_id%type) return clob as
    str clob := '
    SELECT rft.form_type_id, rft.system_name,rft.form_type, f.form_id, f.submission_type_id, f.sp_id,
           f.filing_date, f.tracking_num, f.spplmntl_num, f.parent_form_id, f.created_date, f.created_by,
           f.updated_date, f.updated_by,
           CURSOR(SELECT rs.section_id,
                         rs.section_name,
                         CURSOR(SELECT ''FRM_RSP'' src, fr.frm_response_id, ra.attr_id, ra.attr_name, ra.attr_desc, fr.attr_val
                                  FROM frm_response fr, ref_attr ra, ref_section_attr rsa
                                 WHERE fr.form_id = f.form_id
                                 AND fr.attr_id = rsa.attr_id
                                 AND fr.form_section_id = rsa.form_section_id
                                 AND fr.attr_id = ra.attr_id
                                 AND rsa.form_section_id = rfs.form_section_id
                                UNION
                                SELECT ''TBL_RSP1'' src, tr.tbl_response_id, tr.col_attr_id1, ra.attr_name, ra.attr_desc, col_attr_val1
                                  FROM tbl_response tr, ref_attr ra, ref_section_attr rsa
                                 WHERE tr.form_id = f.form_id
                                 AND tr.col_attr_id1 = ra.attr_id
                                 AND tr.form_section_id = rsa.form_section_id
                                 AND rsa.form_section_id = rfs.form_section_id
                                UNION
                                SELECT ''TBL_RSP2'' src, tr.tbl_response_id, tr.col_attr_id2, ra.attr_name, ra.attr_desc, col_attr_val2
                                  FROM tbl_response tr, ref_attr ra, ref_section_attr rsa
                                 WHERE tr.form_id = f.form_id
                                 AND tr.col_attr_id2 = ra.attr_id
                                 AND tr.form_section_id = rsa.form_section_id
                                 AND rsa.form_section_id = rfs.form_section_id
                                UNION
                                SELECT ''TBL_RSP3'' src, tr.tbl_response_id, TO_NUMBER(tr.col_attr_id3), ra.attr_name, ra.attr_desc, col_attr_val3
                                  FROM tbl_response tr, ref_attr ra, ref_section_attr rsa
                                 WHERE tr.form_id = f.form_id
                                 AND TO_NUMBER(tr.col_attr_id3) = ra.attr_id
                                 AND tr.form_section_id = rsa.form_section_id
                                 AND rsa.form_section_id = rfs.form_section_id
                                UNION
                                SELECT ''TBL_RSP4'' src, tr.tbl_response_id, tr.col_attr_id4, ra.attr_name, ra.attr_desc, col_attr_val4
                                  FROM tbl_response tr, ref_attr ra, ref_section_attr rsa
                                 WHERE tr.form_id = f.form_id
                                 AND tr.col_attr_id4 = ra.attr_id
                                 AND tr.form_section_id = rsa.form_section_id
                                 AND rsa.form_section_id = rfs.form_section_id
                                UNION
                                SELECT ''TBL_RSP5'' src, tr.tbl_response_id, tr.col_attr_id5, ra.attr_name, ra.attr_desc, col_attr_val5
                                  FROM tbl_response tr, ref_attr ra, ref_section_attr rsa
                                 WHERE tr.form_id = f.form_id
                                 AND tr.col_attr_id5 = ra.attr_id
                                 AND tr.form_section_id = rsa.form_section_id
                                 AND rsa.form_section_id = rfs.form_section_id
                                UNION
                                SELECT ''TBL_RSP6'' src, tr.tbl_response_id, tr.col_attr_id6, ra.attr_name, ra.attr_desc, col_attr_val6
                                  FROM tbl_response tr, ref_attr ra, ref_section_attr rsa
                                 WHERE tr.form_id = f.form_id
                                 AND tr.col_attr_id6 = ra.attr_id
                                 AND tr.form_section_id = rsa.form_section_id
                                 AND rsa.form_section_id = rfs.form_section_id
                                UNION
                                SELECT ''TBL_RSP7'' src, tr.tbl_response_id, tr.col_attr_id7, ra.attr_name, ra.attr_desc, col_attr_val7
                                  FROM tbl_response tr, ref_attr ra, ref_section_attr rsa
                                 WHERE tr.form_id = f.form_id
                                 AND tr.col_attr_id7 = ra.attr_id
                                 AND tr.form_section_id = rsa.form_section_id
                                 AND rsa.form_section_id = rfs.form_section_id
                                UNION
                                SELECT ''TBL_RSP8'' src, tr.tbl_response_id, tr.col_attr_id8, ra.attr_name, ra.attr_desc, col_attr_val8
                                  FROM tbl_response tr, ref_attr ra, ref_section_attr rsa
                                 WHERE tr.form_id = f.form_id
                                 AND tr.col_attr_id8 = ra.attr_id
                                 AND tr.form_section_id = rsa.form_section_id
                                 AND rsa.form_section_id = rfs.form_section_id
                                UNION
                                SELECT ''TBL_RSP9'' src, tr.tbl_response_id, tr.col_attr_id9, ra.attr_name, ra.attr_desc, col_attr_val9
                                  FROM tbl_response tr, ref_attr ra, ref_section_attr rsa
                                 WHERE tr.form_id = f.form_id
                                 AND tr.col_attr_id9 = ra.attr_id
                                 AND tr.form_section_id = rsa.form_section_id
                                 AND rsa.form_section_id = rfs.form_section_id
                                UNION
                                SELECT ''TBL_RSP10'' src, tr.tbl_response_id, tr.col_attr_id10, ra.attr_name, ra.attr_desc, col_attr_val10
                                  FROM tbl_response tr, ref_attr ra, ref_section_attr rsa
                                 WHERE tr.form_id = f.form_id
                                 AND tr.col_attr_id10 = ra.attr_id
                                 AND tr.form_section_id = rsa.form_section_id
                                 AND rsa.form_section_id = rfs.form_section_id
                           attribute
                    FROM ref_section rs, ref_form_section rfs
                   WHERE rs.section_id = rfs.section_id
                   AND   rfs.form_type_id = f.form_type_id
                  ORDER BY rs.section_id, rfs.form_section_id)
             section
      FROM ref_form_type rft, form f
    WHERE rft.form_type_id = f.form_type_id
    AND f.form_id = ' || p_form_id; --2371370'';
    begin
      return dbms_xmlgen.getxml(str);
    end gen_xmlstr;
    Invocation:
    select gen_xmlstr(2371370)
    from dual;
    Below is the execution plan. Can this be better?
    Execution Plan
    Plan hash value: 2652539008
    | Id  | Operation                        | Name                 | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                 |                      |     1 |    75 |     3   (0)| 00:00:01 |
    |   1 |  SORT UNIQUE                     |                      |    11 |  1024 |    40  (88)| 00:00:01 |
    |   2 |   UNION-ALL                      |                      |       |       |            |          |
    |   3 |    NESTED LOOPS                  |                      |       |       |            |          |
    |   4 |     NESTED LOOPS                 |                      |     1 |    91 |     5   (0)| 00:00:01 |
    |   5 |      NESTED LOOPS                |                      |     1 |    82 |     3   (0)| 00:00:01 |
    |*  6 |       TABLE ACCESS BY INDEX ROWID| FRM_RESPONSE         |     1 |    25 |     2   (0)| 00:00:01 |
    |*  7 |        INDEX RANGE SCAN          | FK3_FRM_RESPONSE     |    20 |       |     1   (0)| 00:00:01 |
    |   8 |       TABLE ACCESS BY INDEX ROWID| REF_ATTR             |     1 |    57 |     1   (0)| 00:00:01 |
    |*  9 |        INDEX UNIQUE SCAN         | PK_REF_ATTR          |     1 |       |     0   (0)| 00:00:01 |
    |* 10 |      INDEX RANGE SCAN            | FK2_REF_SECTION_ATTR |     2 |       |     1   (0)| 00:00:01 |
    |* 11 |     TABLE ACCESS BY INDEX ROWID  | REF_SECTION_ATTR     |     1 |     9 |     2   (0)| 00:00:01
    |  12 |    NESTED LOOPS                  |                      |       |       |            |          |
    |  13 |     NESTED LOOPS                 |                      |     1 |   105 |     2   (0)| 00:00:01 |
    |  14 |      NESTED LOOPS                |                      |     1 |    48 |     2   (0)| 00:00:01 |
    |* 15 |       INDEX RANGE SCAN           | FK1_REF_SECTION_ATTR |     9 |    36 |     1   (0)| 00:00:01 |
    |* 16 |       TABLE ACCESS BY INDEX ROWID| TBL_RESPONSE         |     1 |    44 |     1   (0)| 00:00:01 |
    |* 17 |        INDEX RANGE SCAN          | FK1_TBL_RESPONSE     |     1 |       |     0   (0)| 00:00:01 |
    |* 18 |      INDEX UNIQUE SCAN           | PK_REF_ATTR          |     1 |       |     0   (0)| 00:00:01 |
    |  19 |     TABLE ACCESS BY INDEX ROWID  | REF_ATTR             |     1 |    57 |     0   (0)| 00:00:01 |
    |  20 |    NESTED LOOPS                  |                      |       |       |            |          |
    |  21 |     NESTED LOOPS                 |                      |     1 |   100 |     2   (0)| 00:00:01 |
    |  22 |      NESTED LOOPS                |                      |     1 |    43 |     2   (0)| 00:00:01 |
    |* 23 |       INDEX RANGE SCAN           | FK1_REF_SECTION_ATTR |     9 |    36 |     1   (0)| 00:00:01 |
    |* 24 |       TABLE ACCESS BY INDEX ROWID| TBL_RESPONSE         |     1 |    39 |     1   (0)| 00:00:01 |
    |* 25 |        INDEX RANGE SCAN          | FK1_TBL_RESPONSE     |     1 |       |     0   (0)| 00:00:01 |
    |* 26 |      INDEX UNIQUE SCAN           | PK_REF_ATTR          |     1 |       |     0   (0)| 00:00:01 |
    |  27 |     TABLE ACCESS BY INDEX ROWID  | REF_ATTR             |     1 |    57 |     0   (0)| 00:00:01 |
    |  28 |    NESTED LOOPS                  |                      |       |       |            |          |
    |  29 |     NESTED LOOPS                 |                      |     1 |    86 |     3   (0)| 00:00:01 |
    |  30 |      NESTED LOOPS                |                      |     1 |    29 |     2   (0)| 00:00:01 |
    |* 31 |       INDEX RANGE SCAN           | FK1_REF_SECTION_ATTR |     9 |    36 |     1   (0)| 00:00:01 |
    |* 32 |       TABLE ACCESS BY INDEX ROWID| TBL_RESPONSE         |     1 |    25 |     1   (0)| 00:00:01 |
    |* 33 |        INDEX RANGE SCAN          | FK1_TBL_RESPONSE     |     1 |       |     0   (0)| 00:00:01 |
    |* 34 |      INDEX UNIQUE SCAN           | PK_REF_ATTR          |     1 |       |     0   (0)| 00:00:01 |
    |  35 |     TABLE ACCESS BY INDEX ROWID  | REF_ATTR             |     1 |    57 |     1   (0)| 00:00:01 |
    |  36 |    NESTED LOOPS                  |                      |       |       |            |          |
    |  37 |     NESTED LOOPS                 |                      |     1 |    93 |     2   (0)| 00:00:01 |
    |  38 |      NESTED LOOPS                |                      |     1 |    36 |     2   (0)| 00:00:01 |
    |* 39 |       INDEX RANGE SCAN           | FK1_REF_SECTION_ATTR |     9 |    36 |     1   (0)| 00:00:01 |
    |* 40 |       TABLE ACCESS BY INDEX ROWID| TBL_RESPONSE         |     1 |    32 |     1   (0)| 00:00:01 |
    |* 41 |        INDEX RANGE SCAN          | FK1_TBL_RESPONSE     |     1 |       |     0   (0)| 00:00:01 |
    |* 42 |      INDEX UNIQUE SCAN           | PK_REF_ATTR          |     1 |       |     0   (0)| 00:00:01 |
    |  43 |     TABLE ACCESS BY INDEX ROWID  | REF_ATTR             |     1 |    57 |     0   (0)| 00:00:01 |
    |  44 |    NESTED LOOPS                  |                      |       |       |            |          |
    |  45 |     NESTED LOOPS                 |                      |     1 |    93 |     2   (0)| 00:00:01 |
    |  46 |      NESTED LOOPS                |                      |     1 |    36 |     2   (0)| 00:00:01 |
    |* 47 |       INDEX RANGE SCAN           | FK1_REF_SECTION_ATTR |     9 |    36 |     1   (0)| 00:00:01 |
    |* 48 |       TABLE ACCESS BY INDEX ROWID| TBL_RESPONSE         |     1 |    32 |     1   (0)| 00:00:01 |
    |* 49 |        INDEX RANGE SCAN          | FK1_TBL_RESPONSE     |     1 |       |     0   (0)| 00:00:01 |
    |* 50 |      INDEX UNIQUE SCAN           | PK_REF_ATTR          |     1 |       |     0   (0)| 00:00:01 |
    |  51 |     TABLE ACCESS BY INDEX ROWID  | REF_ATTR             |     1 |    57 |     0   (0)| 00:00:01 |
    |  52 |    NESTED LOOPS                  |                      |       |       |            |          |
    |  53 |     NESTED LOOPS                 |                      |     1 |    90 |     2   (0)| 00:00:01 |
    |  54 |      NESTED LOOPS                |                      |     1 |    33 |     2   (0)| 00:00:01 |
    |* 55 |       INDEX RANGE SCAN           | FK1_REF_SECTION_ATTR |     9 |    36 |     1   (0)| 00:00:01 |
    |* 56 |       TABLE ACCESS BY INDEX ROWID| TBL_RESPONSE         |     1 |    29 |     1   (0)| 00:00:01 |
    |* 57 |        INDEX RANGE SCAN          | FK1_TBL_RESPONSE     |     1 |       |     0   (0)| 00:00:01 |
    |* 58 |      INDEX UNIQUE SCAN           | PK_REF_ATTR          |     1 |       |     0   (0)| 00:00:01 |
    |  59 |     TABLE ACCESS BY INDEX ROWID  | REF_ATTR             |     1 |    57 |     0   (0)| 00:00:01 |
    |  60 |    NESTED LOOPS                  |                      |       |       |            |          |
    |  61 |     NESTED LOOPS                 |                      |     1 |    95 |     2   (0)| 00:00:01 |
    |  62 |      NESTED LOOPS                |                      |     1 |    38 |     2   (0)| 00:00:01 |
    |* 63 |       INDEX RANGE SCAN           | FK1_REF_SECTION_ATTR |     9 |    36 |     1   (0)| 00:00:01 |
    |* 64 |       TABLE ACCESS BY INDEX ROWID| TBL_RESPONSE         |     1 |    34 |     1   (0)| 00:00:01 |
    |* 65 |        INDEX RANGE SCAN          | FK1_TBL_RESPONSE     |     1 |       |     0   (0)| 00:00:01 |
    |* 66 |      INDEX UNIQUE SCAN           | PK_REF_ATTR          |     1 |       |     0   (0)| 00:00:01 |
    |  67 |     TABLE ACCESS BY INDEX ROWID  | REF_ATTR             |     1 |    57 |     0   (0)| 00:00:01 |
    |  68 |    NESTED LOOPS                  |                      |       |       |            |          |
    |  69 |     NESTED LOOPS                 |                      |     1 |    90 |     2   (0)| 00:00:01 |
    |  70 |      NESTED LOOPS                |                      |     1 |    33 |     2   (0)| 00:00:01 |
    |* 71 |       INDEX RANGE SCAN           | FK1_REF_SECTION_ATTR |     9 |    36 |     1   (0)| 00:00:01 |
    |* 72 |       TABLE ACCESS BY INDEX ROWID| TBL_RESPONSE         |     1 |    29 |     1   (0)| 00:00:01 |
    |* 73 |        INDEX RANGE SCAN          | FK1_TBL_RESPONSE     |     1 |       |     0   (0)| 00:00:01 |
    |* 74 |      INDEX UNIQUE SCAN           | PK_REF_ATTR          |     1 |       |     0   (0)| 00:00:01 |
    |  75 |     TABLE ACCESS BY INDEX ROWID  | REF_ATTR             |     1 |    57 |     0   (0)| 00:00:01 |
    |  76 |    NESTED LOOPS                  |                      |       |       |            |          |
    |  77 |     NESTED LOOPS                 |                      |     1 |    90 |     2   (0)| 00:00:01 |
    |  78 |      NESTED LOOPS                |                      |     1 |    33 |     2   (0)| 00:00:01 |
    |* 79 |       INDEX RANGE SCAN           | FK1_REF_SECTION_ATTR |     9 |    36 |     1   (0)| 00:00:01 |
    |* 80 |       TABLE ACCESS BY INDEX ROWID| TBL_RESPONSE         |     1 |    29 |     1   (0)| 00:00:01 |
    |* 81 |        INDEX RANGE SCAN          | FK1_TBL_RESPONSE     |     1 |       |     0   (0)| 00:00:01 |
    |* 82 |      INDEX UNIQUE SCAN           | PK_REF_ATTR          |     1 |       |     0   (0)| 00:00:01 |
    |  83 |     TABLE ACCESS BY INDEX ROWID  | REF_ATTR             |     1 |    57 |     0   (0)| 00:00:01 |
    |  84 |    NESTED LOOPS                  |                      |       |       |            |          |
    |  85 |     NESTED LOOPS                 |                      |     1 |    91 |     2   (0)| 00:00:01 |
    |  86 |      NESTED LOOPS                |                      |     1 |    34 |     2   (0)| 00:00:01 |
    |* 87 |       INDEX RANGE SCAN           | FK1_REF_SECTION_ATTR |     9 |    36 |     1   (0)| 00:00:01 |
    |* 88 |       TABLE ACCESS BY INDEX ROWID| TBL_RESPONSE         |     1 |    30 |     1   (0)| 00:00:01 |
    |* 89 |        INDEX RANGE SCAN          | FK1_TBL_RESPONSE     |     1 |       |     0   (0)| 00:00:01 |
    |* 90 |      INDEX UNIQUE SCAN           | PK_REF_ATTR          |     1 |       |     0   (0)| 00:00:01 |
    |  91 |     TABLE ACCESS BY INDEX ROWID  | REF_ATTR             |     1 |    57 |     0   (0)| 00:00:01 |
    |  92 |  SORT ORDER BY                   |                      |    20 |  1040 |     7  (29)| 00:00:01 |
    |* 93 |   HASH JOIN                      |                      |    20 |  1040 |     6  (17)| 00:00:01 |
    |  94 |    TABLE ACCESS BY INDEX ROWID   | REF_FORM_SECTION     |    20 |   200 |     2   (0)| 00:00:01 |
    |* 95 |     INDEX RANGE SCAN             | FK1_FORM_SECTION     |    20 |       |     1   (0)| 00:00:01 |
    |  96 |    TABLE ACCESS FULL             | REF_SECTION          |   100 |  4200 |     3   (0)| 00:00:01 |
    |  97 |  NESTED LOOPS                    |                      |     1 |    75 |     3   (0)| 00:00:01 |
    |  98 |   TABLE ACCESS BY INDEX ROWID    | FORM                 |     1 |    59 |     2   (0)| 00:00:01 |
    |* 99 |    INDEX UNIQUE SCAN             | PK_FORM              |     1 |       |     1   (0)| 00:00:01 |
    | 100 |   TABLE ACCESS BY INDEX ROWID    | REF_FORM_TYPE        |     5 |    80 |     1   (0)| 00:00:01 |
    |*101 |    INDEX UNIQUE SCAN             | PK_REF_FORM_TYPE     |     1 |       |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       6 - filter("FR"."FORM_SECTION_ID"=:B1)
       7 - access("FR"."FORM_ID"=:B1)
       9 - access("FR"."ATTR_ID"="RA"."ATTR_ID")
      10 - access("FR"."ATTR_ID"="RSA"."ATTR_ID")
      11 - filter("RSA"."FORM_SECTION_ID"=:B1 AND "FR"."FORM_SECTION_ID"="RSA"."FORM_SECTION_ID")
      15 - access("RSA"."FORM_SECTION_ID"=:B1)
      16 - filter("TR"."COL_ATTR_ID1" IS NOT NULL AND "TR"."FORM_ID"=:B1)
      17 - access("TR"."FORM_SECTION_ID"=:B1)
           filter("TR"."FORM_SECTION_ID"="RSA"."FORM_SECTION_ID")
      18 - access("TR"."COL_ATTR_ID1"="RA"."ATTR_ID")
      23 - access("RSA"."FORM_SECTION_ID"=:B1)
      24 - filter("TR"."COL_ATTR_ID2" IS NOT NULL AND "TR"."FORM_ID"=:B1)
      25 - access("TR"."FORM_SECTION_ID"=:B1)
           filter("TR"."FORM_SECTION_ID"="RSA"."FORM_SECTION_ID")
      26 - access("TR"."COL_ATTR_ID2"="RA"."ATTR_ID")
      31 - access("RSA"."FORM_SECTION_ID"=:B1)
      32 - filter("TR"."FORM_ID"=:B1)
      33 - access("TR"."FORM_SECTION_ID"=:B1)
           filter("TR"."FORM_SECTION_ID"="RSA"."FORM_SECTION_ID")
      34 - access("RA"."ATTR_ID"=TO_NUMBER("TR"."COL_ATTR_ID3"))
      39 - access("RSA"."FORM_SECTION_ID"=:B1)
      40 - filter("TR"."COL_ATTR_ID4" IS NOT NULL AND "TR"."FORM_ID"=:B1)
      41 - access("TR"."FORM_SECTION_ID"=:B1)
           filter("TR"."FORM_SECTION_ID"="RSA"."FORM_SECTION_ID")
      42 - access("TR"."COL_ATTR_ID4"="RA"."ATTR_ID")
      47 - access("RSA"."FORM_SECTION_ID"=:B1)
      48 - filter("TR"."COL_ATTR_ID5" IS NOT NULL AND "TR"."FORM_ID"=:B1)
      49 - access("TR"."FORM_SECTION_ID"=:B1)
           filter("TR"."FORM_SECTION_ID"="RSA"."FORM_SECTION_ID")
      50 - access("TR"."COL_ATTR_ID5"="RA"."ATTR_ID")
      55 - access("RSA"."FORM_SECTION_ID"=:B1)
      56 - filter("TR"."COL_ATTR_ID6" IS NOT NULL AND "TR"."FORM_ID"=:B1)
      57 - access("TR"."FORM_SECTION_ID"=:B1)
           filter("TR"."FORM_SECTION_ID"="RSA"."FORM_SECTION_ID")
      58 - access("TR"."COL_ATTR_ID6"="RA"."ATTR_ID")
      63 - access("RSA"."FORM_SECTION_ID"=:B1)
      64 - filter("TR"."COL_ATTR_ID7" IS NOT NULL AND "TR"."FORM_ID"=:B1)
      65 - access("TR"."FORM_SECTION_ID"=:B1)
           filter("TR"."FORM_SECTION_ID"="RSA"."FORM_SECTION_ID")
      66 - access("TR"."COL_ATTR_ID7"="RA"."ATTR_ID")
      71 - access("RSA"."FORM_SECTION_ID"=:B1)
      72 - filter("TR"."COL_ATTR_ID8" IS NOT NULL AND "TR"."FORM_ID"=:B1)
      73 - access("TR"."FORM_SECTION_ID"=:B1)
           filter("TR"."FORM_SECTION_ID"="RSA"."FORM_SECTION_ID")
      74 - access("TR"."COL_ATTR_ID8"="RA"."ATTR_ID")
      79 - access("RSA"."FORM_SECTION_ID"=:B1)
      80 - filter("TR"."COL_ATTR_ID9" IS NOT NULL AND "TR"."FORM_ID"=:B1)
      81 - access("TR"."FORM_SECTION_ID"=:B1)
           filter("TR"."FORM_SECTION_ID"="RSA"."FORM_SECTION_ID")
      82 - access("TR"."COL_ATTR_ID9"="RA"."ATTR_ID")
      87 - access("RSA"."FORM_SECTION_ID"=:B1)
      88 - filter("TR"."COL_ATTR_ID10" IS NOT NULL AND "TR"."FORM_ID"=:B1)
      89 - access("TR"."FORM_SECTION_ID"=:B1)
           filter("TR"."FORM_SECTION_ID"="RSA"."FORM_SECTION_ID")
      90 - access("TR"."COL_ATTR_ID10"="RA"."ATTR_ID")
      93 - access("RS"."SECTION_ID"="RFS"."SECTION_ID")
      95 - access("RFS"."FORM_TYPE_ID"=:B1)
      99 - access("F"."FORM_ID"=2371370)
    101 - access("RFT"."FORM_TYPE_ID"="F"."FORM_TYPE_ID")
    What tools/techniques are available to generate the XSLT? (use XMLSpy etc?), how to create a such that it can be as simple as "select from v_xml_view;" and be able to replace * with column names?*
    ==============================
    I've also tried the *SQL-XML extensions* but am stuck with the UNION PART (help is requested on how to union columns within the XMLAgg).
    {code}
    select
    xmlelement ("System",
    xmlforest(rft.form_type_id as "FormTypeID", rft.system_name as "SystemName", rft.form_type as "FormType", f.form_id as "FormID"),
    xmlelement("Sections",
    (select xmlagg(xmlelement("Section",
    xmlforest(rs.section_id as "SectionID", rs.section_name as "SectionName"),
    xmlelement("Attributes",
    (select xmlagg(xmlelement("Attr",
    xmlforest (rsa.attr_id as "AttrID", ra.attr_name as "AttrName", ra.attr_desc as "Attr_desc", fr.attr_val as "AttrValue")
    ) -- "attr"
    ) --xmlagg attr
    from ref_section_attr rsa, ref_attr ra, frm_response fr
    where rsa.attr_id = ra.attr_id
    and rsa.form_section_id = rfs.form_section_id
    and fr.form_id = f.form_id
    and fr.form_section_id = rsa.form_section_id
    and fr.attr_id = rsa.attr_id
    ) --attributes select
    ) -- attributes
    ) -- section elements
    ) -- xmlagg
    from ref_section rs, ref_form_section rfs
    where rs.section_id = rfs.section_id
    and rfs.form_type_id = f.form_type_id
    ) -- select query
    ) -- sections
    ) -- system
    as str
    from ref_form_type rft, FORM f
    where rft.form_type_id = f.form_type_id
    and f.form_id = 2371420;
    {code}
    *and the output is like:
    (I don't know how to format this for easy viewing!)*
    {code}
    <System><FormTypeID>900</FormTypeID><SystemName>HAZMAT_ENROLLMENT</SystemName><FormType>ENR-HAZMAT</FormType><FormID>2371420</FormID><Sections><Section><SectionID>6750</SectionID><SectionName>Personal Information</SectionName><Attributes><Attr><AttrID>30001</AttrID><AttrName>ENROLLEE_FIRST_NAME</AttrName><Attr_desc>Enrollee&apos;s First Name</Attr_desc><AttrValue>Enroll</AttrValue></Attr><Attr><AttrID>30002</AttrID><AttrName>ENROLLEE_MIDDLE_INIT</AttrName><Attr_desc>Enrollee&apos;s Middle Initial</Attr_desc><AttrValue> </AttrValue></Attr><Attr><AttrID>30003</AttrID><AttrName>ENROLLEE_LAST_NAME</AttrName><Attr_desc>Enrollee&apos;s Last Name</Attr_desc><AttrValue>User11</AttrValue></Attr><Attr><AttrID>30004</AttrID><AttrName>ENROLLEE_WORK_PHONE</AttrName><Attr_desc>Enrollee&apos;s Work Phone Number</Attr_desc><AttrValue>(703) 222-4444</AttrValue></Attr><Attr><AttrID>30005</AttrID><AttrName>ENROLLEE_FAX</AttrName><Attr_desc>Enrollee Fax Number</Attr_desc><AttrValue> </AttrValue></Attr><Attr><AttrID>30006</AttrID><AttrName>ENROLLEE_EXT</AttrName><Attr_desc>Enrollee&apos;s Work Extension</Attr_desc><AttrValue> </AttrValue></Attr><Attr><AttrID>30007</AttrID><AttrName>ENROLLEE_EMAIL</AttrName><Attr_desc>Enrollee&apos;s Email</Attr_desc><AttrValue>[email protected]</AttrValue></Attr><Attr><AttrID>30023</AttrID><AttrName>POC_TYPE</AttrName><Attr_desc>Point of Contact Type</Attr_desc><AttrValue>Consultant</AttrValue></Attr><Attr><AttrID>30008</AttrID><AttrName>ENROLLEE_MAIL_ADDR_1</AttrName><Attr_desc>Enrollee&apos;s Mailing Address #1</Attr_desc><AttrValue>123 Main St</AttrValue></Attr><Attr><AttrID>30009</AttrID><AttrName>ENROLLEE_MAIL_ADDR_2</AttrName><Attr_desc>Enrollee&apos;s Mailing Address #2</Attr_desc><AttrValue> </AttrValue></Attr><Attr><AttrID>30010</AttrID><AttrName>ENROLLEE_CITY</AttrName><Attr_desc>Enrollee&apos;s City</Attr_desc><AttrValue>Herndon</AttrValue></Attr><Attr><AttrID>30011</AttrID><AttrName>ENROLLEE_STATE</AttrName><Attr_desc>Enrollee&apos;s State</Attr_desc><AttrValue>VA</AttrValue></Attr><Attr><AttrID>30012</AttrID><AttrName>ENROLLEE_ZIP</AttrName><Attr_desc>Enrollee&apos;s Zip</Attr_desc><AttrValue>28408</AttrValue></Attr><Attr><AttrID>30013</AttrID><AttrName>ENROLLEE_USER_NAME</AttrName><Attr_desc>Enrollee&apos;s User Name</Attr_desc><AttrValue>enrolluser11</AttrValue></Attr></Attributes></Section><Section><SectionID>6800</SectionID><SectionName>Company Information</SectionName><Attributes><Attr><AttrID>30014</AttrID><AttrName>DUN_BRADSTREET_NUM</AttrName><Attr_desc>Company&apos;s Dun and Bradstreet #</Attr_desc><AttrValue>198455201</AttrValue></Attr></Attributes></Section><Section><SectionID>6850</SectionID><SectionName>Points of Contact</SectionName><Attributes></Attributes></Section><Section><SectionID>6900</SectionID><SectionName>Enrollment Verification</SectionName><Attributes></Attributes></Section><Section><SectionID>6950</SectionID><SectionName>Enrollment Confirmation</SectionName><Attributes></Attributes></Section></Sections></System>
    {code}
    *The execution plan:*
    {code}
    Execution Plan
    Plan hash value: 2641045985
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    ------------

    Thanks for the data.
    I thought you would have included data from TBL_RESPONSE, as the interesting part is how to deal with this "special" design ;)
    So, to run some tests, I've generated the following data for FORM_SECTION_ID 5350 and 5360 :
    insert into tbl_response (FORM_ID, FORM_SECTION_ID, COL_ATTR_ID1, COL_ATTR_VAL1, COL_ATTR_ID2, COL_ATTR_VAL2, COL_ATTR_ID3, COL_ATTR_VAL3, COL_ATTR_ID4, COL_ATTR_VAL4, COL_ATTR_ID5, COL_ATTR_VAL5, COL_ATTR_ID6, COL_ATTR_VAL6, COL_ATTR_ID7, COL_ATTR_VAL7, COL_ATTR_ID8, COL_ATTR_VAL8, COL_ATTR_ID9, COL_ATTR_VAL9, COL_ATTR_ID10, COL_ATTR_VAL10)
    values (2371420, 5350, 30000, '05/03/2011', 30001, 'John', '30002', 'J', 30003, 'Doe', 30004, '(555) 123-1234', 30005, '(555) 123-1235', 30006, '1234567', 30007, '[email protected]', 30008, '10 Maple Street', 30009, '.');
    insert into tbl_response (FORM_ID, FORM_SECTION_ID, COL_ATTR_ID1, COL_ATTR_VAL1, COL_ATTR_ID2, COL_ATTR_VAL2, COL_ATTR_ID3, COL_ATTR_VAL3, COL_ATTR_ID4, COL_ATTR_VAL4, COL_ATTR_ID5, COL_ATTR_VAL5, COL_ATTR_ID6, COL_ATTR_VAL6, COL_ATTR_ID7, COL_ATTR_VAL7, COL_ATTR_ID8, COL_ATTR_VAL8, COL_ATTR_ID9, COL_ATTR_VAL9, COL_ATTR_ID10, COL_ATTR_VAL10)
    values (2371420, 5350, 30011, 'MA', 30012, '02668', '30013', 'jdoe', null, '', null, '', null, '', null, '', null, '', null, '', null, '');
    insert into tbl_response (FORM_ID, FORM_SECTION_ID, COL_ATTR_ID1, COL_ATTR_VAL1, COL_ATTR_ID2, COL_ATTR_VAL2, COL_ATTR_ID3, COL_ATTR_VAL3, COL_ATTR_ID4, COL_ATTR_VAL4, COL_ATTR_ID5, COL_ATTR_VAL5, COL_ATTR_ID6, COL_ATTR_VAL6, COL_ATTR_ID7, COL_ATTR_VAL7, COL_ATTR_ID8, COL_ATTR_VAL8, COL_ATTR_ID9, COL_ATTR_VAL9, COL_ATTR_ID10, COL_ATTR_VAL10)
    values (2371420, 5360, 30014, '123456789', 30015, 'My Company', '30016', '50 Main Street', 30017, '.', 30018, 'Marstons Mills', 30019, 'MA', 30020, '02648', 30021, '(555) 123-1236', null, '', null, '');And here's the query :
    WITH attr_unpivot AS (
      SELECT form_section_id
           , attr_val
      FROM (
        SELECT form_section_id
             , XMLForest(col_attr_id1 as "AttrID", col_attr_val1 as "AttrValue") as attr01
             , XMLForest(col_attr_id2 as "AttrID", col_attr_val2 as "AttrValue") as attr02
             , XMLForest(col_attr_id3 as "AttrID", col_attr_val3 as "AttrValue") as attr03
             , XMLForest(col_attr_id4 as "AttrID", col_attr_val4 as "AttrValue") as attr04
             , XMLForest(col_attr_id5 as "AttrID", col_attr_val5 as "AttrValue") as attr05
             , XMLForest(col_attr_id6 as "AttrID", col_attr_val6 as "AttrValue") as attr06
             , XMLForest(col_attr_id7 as "AttrID", col_attr_val7 as "AttrValue") as attr07
             , XMLForest(col_attr_id8 as "AttrID", col_attr_val8 as "AttrValue") as attr08
             , XMLForest(col_attr_id9 as "AttrID", col_attr_val9 as "AttrValue") as attr09
             , XMLForest(col_attr_id10 as "AttrID", col_attr_val10 as "AttrValue") as attr10
        FROM tbl_response
        WHERE form_id = 2371420
      UNPIVOT (
        attr_val FOR attr_pos IN (attr01,attr02,attr03,attr04,attr05,attr06,attr07,attr08,attr09,attr10)
      UNION ALL
      SELECT form_section_id
           , XMLForest(fr.attr_id as "AttrID", fr.attr_val as "AttrValue")
      FROM frm_response fr
      WHERE fr.form_id = 2371420
    SELECT XMLElement("System",
             XMLForest(
               rft.form_type_id as "FormTypeID"
             , rft.system_name as "SystemName"
             , rft.form_type as "FormType"
             , f.form_id as "FormID"
           , XMLElement("Sections",
                SELECT XMLAgg(
                         XMLElement("Section",
                           XMLForest(
                             rs.section_id as "SectionID"
                           , rs.section_name as "SectionName"
                         , XMLElement("Attributes",
                              SELECT XMLAgg(
                                       XMLElement("Attr",
                                         XMLForest(
                                           ra.attr_desc as "AttrDesc"
                                         , ra.attr_name as "AttrName"
                                       , v.attr_val
                              FROM attr_unpivot v
                                   JOIN ref_section_attr rsa ON rsa.attr_id = extractValue(v.attr_val,'AttrID')
                                                            AND rsa.form_section_id = v.form_section_id
                                   JOIN ref_attr ra ON ra.attr_id = rsa.attr_id
                              WHERE rsa.form_section_id = rfs.form_section_id
                FROM ref_section rs
                     JOIN ref_form_section rfs ON rs.section_id = rfs.section_id
                WHERE rfs.form_type_id = f.form_type_id
           ) as xmldoc
    FROM ref_form_type rft
         JOIN form f ON rft.form_type_id = f.form_type_id
    WHERE f.form_id = 2371420
    ;The WITH clause builds a normalized result set out of TBL_RESPONSE and FRM_RESPONSE.
    That result set is then joined in the main query for each section of the form.
    The resulting XML document looks like :
    <System>
      <FormTypeID>900</FormTypeID>
      <SystemName>ENROLLMENT</SystemName>
      <FormType>ENR</FormType>
      <FormID>2371420</FormID>
      <Sections>
        <Section>
          <SectionID>6750</SectionID>
          <SectionName>Personal Information</SectionName>
          <Attributes>
            <Attr>
              <AttrDesc>Enrollment Date</AttrDesc>
              <AttrName>ENROLLMENT_DATE</AttrName>
              <AttrID>30000</AttrID>
              <AttrValue>05/03/2011</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Enrollee&apos;s First Name</AttrDesc>
              <AttrName>ENROLLEE_FIRST_NAME</AttrName>
              <AttrID>30001</AttrID>
              <AttrValue>John</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Enrollee&apos;s Middle Initial</AttrDesc>
              <AttrName>ENROLLEE_MIDDLE_INIT</AttrName>
              <AttrID>30002</AttrID>
              <AttrValue>J</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Enrollee&apos;s Last Name</AttrDesc>
              <AttrName>ENROLLEE_LAST_NAME</AttrName>
              <AttrID>30003</AttrID>
              <AttrValue>Doe</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Enrollee&apos;s Work Phone Number</AttrDesc>
              <AttrName>ENROLLEE_WORK_PHONE</AttrName>
              <AttrID>30004</AttrID>
              <AttrValue>(555) 123-1234</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Enrollee Fax Number</AttrDesc>
              <AttrName>ENROLLEE_FAX</AttrName>
              <AttrID>30005</AttrID>
              <AttrValue>(555) 123-1235</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Enrollee&apos;s Work Extension</AttrDesc>
              <AttrName>ENROLLEE_EXT</AttrName>
              <AttrID>30006</AttrID>
              <AttrValue>1234567</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Enrollee&apos;s Email</AttrDesc>
              <AttrName>ENROLLEE_EMAIL</AttrName>
              <AttrID>30007</AttrID>
              <AttrValue>[email protected]</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Enrollee&apos;s Mailing Address #1</AttrDesc>
              <AttrName>ENROLLEE_MAIL_ADDR_1</AttrName>
              <AttrID>30008</AttrID>
              <AttrValue>10 Maple Street</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Enrollee&apos;s Mailing Address #2</AttrDesc>
              <AttrName>ENROLLEE_MAIL_ADDR_2</AttrName>
              <AttrID>30009</AttrID>
              <AttrValue>.</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Enrollee&apos;s State</AttrDesc>
              <AttrName>ENROLLEE_STATE</AttrName>
              <AttrID>30011</AttrID>
              <AttrValue>MA</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Enrollee&apos;s Zip</AttrDesc>
              <AttrName>ENROLLEE_ZIP</AttrName>
              <AttrID>30012</AttrID>
              <AttrValue>02668</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Enrollee&apos;s User Name</AttrDesc>
              <AttrName>ENROLLEE_USER_NAME</AttrName>
              <AttrID>30013</AttrID>
              <AttrValue>jdoe</AttrValue>
            </Attr>
          </Attributes>
        </Section>
        <Section>
          <SectionID>6800</SectionID>
          <SectionName>Company Information</SectionName>
          <Attributes>
            <Attr>
              <AttrDesc>Company&apos;s DB #</AttrDesc>
              <AttrName>DBNUM</AttrName>
              <AttrID>30014</AttrID>
              <AttrValue>123456789</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Company Name</AttrDesc>
              <AttrID>30015</AttrID>
              <AttrValue>My Company</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Company Adress #1</AttrDesc>
              <AttrID>30016</AttrID>
              <AttrValue>50 Main Street</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Company Adress #2</AttrDesc>
              <AttrID>30017</AttrID>
              <AttrValue>.</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Company City</AttrDesc>
              <AttrID>30018</AttrID>
              <AttrValue>Marstons Mills</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Company State</AttrDesc>
              <AttrID>30019</AttrID>
              <AttrValue>MA</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Company Zip</AttrDesc>
              <AttrID>30020</AttrID>
              <AttrValue>02648</AttrValue>
            </Attr>
            <Attr>
              <AttrDesc>Company Phone</AttrDesc>
              <AttrID>30021</AttrID>
              <AttrValue>(555) 123-1236</AttrValue>
            </Attr>
          </Attributes>
        </Section>
        <Section>
          <SectionID>6850</SectionID>
          <SectionName>Points of Contact</SectionName>
          <Attributes/>
        </Section>
        <Section>
          <SectionID>6900</SectionID>
          <SectionName>Enrollment Verification</SectionName>
          <Attributes/>
        </Section>
        <Section>
          <SectionID>6950</SectionID>
          <SectionName>Enrollment Confirmation</SectionName>
          <Attributes/>
        </Section>
      </Sections>
    </System>

  • Which is better for education iPad or Macbook air?

    I am a grade 8 student and I walk around quite a bit in school and I would like to know which one is better for me?
    Which is better for school, and no I can not get the discount.
    Macbook Air or
    iPad
    If macbook Air which size and specs would you reccomend?
    And if iPad which storage option, white or black do you reccomend?
    And should I buy the iPad 2 or the new one.

    Great question.
    Word processing for iOS is fantastic, but not as good for citations and things as on the macbook air, though footnotes will be preserved.
    The new textbook options on ipad are compelling. You should find out if any of your school textbooks are on there by searching the itunes store. If so, ipad is your choice.
    They are different categories of products. the macbook air is an excellent computer.
    But I guess I feel this way -- why don't you buy a desktop for the home. and an ipad for school? If you feel you can get all of your notetaking, paper drafts etc. done on ipad, then you can use mountain lion (coming out this summer) to keep it all in sync when you go home.
    I do have to warn you that I tried taking my ipad to work. If you use google docs at all, you may find some limitations sometimes. If you stick within the icloud universe, (pages, keynote, and numbers), you may be mostly happy.

  • Which is better to use spotlight or finder

    I have been a Mac user for six years. Still, I am unsure how to find things most easily on my computer. I was searching for a folder I knew I had, using its exact name in Finder, and I could not locate it. I used it in Spotlight and found it right away. I've not used Spotlight too much, but should I use that instead of Finder?

    No rule on which is better to use, I suppose it is matter of preferences.
    You can certainly expand or restrict what Spotlight searches (indexes) for you via Spotlight's preferences.
    Here is a good free app that IMHO does a good job, EasyFind, at finding contents along with file names quite well.
    https://itunes.apple.com/us/app/easyfind/id411673888
    from this group
    http://www.devontechnologies.com/download/products.html

  • Which is better in terms of performance

    Dear All,
    which is better..
    to use FOR ALL ENTRIES      or
    to build a range and use  WHERE IN RANGE_TABLE     .. Does this have data limitation problem.
    is there a better method?
    Thanks,
    Raghavendra
    Moderator message - Please search before asking - post locked
    Edited by: Rob Burbank on Jul 7, 2009 10:53 AM

    I want to know which is betterThere's not enough information for anyone here to be able to tell you.
    Obviously the first one "looks" faster, but without knowing the tables, structure, data, indexes, platform etc. etc. etc. we won't have a clue.

  • Which is better? JDO or Java Persistance API?

    Hi folks
    I'm trying to build an app on Google's cloud service.
    Looking into this ( [http://code.google.com/appengine/docs/java/overview.html|http://code.google.com/appengine/docs/java/overview.html]), it tells me that for java projects there are 2 possibilities for persistance - JDO , and Java Persistance. Does anyone have any advice on which is better and/or easier? Also, if anyone has a small example they could post, that would be very useful too.
    this isn't exactly a JDBC question, and maybe this should be posted somewhere else? If so please tell me where I should be asking this question.
    Thanks!
    -Tom

    I personally find Java Persistence to be easy to use and it works just fine.
    I can't say if you would agree. You'll just have to judge that for yourself, which means: put some effort into trying it out. I'd start by not requesting small examples in a forum, but by actually looking for them yourself using your search engine of choice.

  • Xerces or JDOM which is better?

    hi all
    i would like to ask for some opinions.
    Xerces and JDOM which is better?
    thanks!

    This dude is right. JDOM6 is the bomb.
    here is a little present:
    import java.io.*;
    import java.io.File;
    import java.util.List;
    import java.util.Iterator;
    import java.io.FileInputStream;
    import java.io.InputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import org.jdom.Document;
    import org.jdom.Element;
    import org.jdom.JDOMException;
    import org.jdom.adapters.*;
    import org.jdom.adapters.CrimsonDOMAdapter;
    import org.jdom.input.DOMBuilder;
    import org.jdom.output.XMLOutputter;
    public class xmltest
    // Global value so it can be ref'd by the tree-adapter
    public static Document document;
    public static DOMBuilder builder;
    public static String product_name, description, price;
    public static Double checkPrice;
    public static void readDoc()throws IOException, JDOMException
    builder = new DOMBuilder();
    try {
    FileInputStream in = new FileInputStream(new File("settings.xml"));
    document = builder.build(in);
    in.close();
    } catch (IOException ioe) {
    ioe.printStackTrace();
    public static void listProducts()throws IOException, JDOMException
    readDoc();
    Element root = document.getRootElement();
    List products = root.getChildren();
    Iterator productsIterator = products.iterator();
    System.out.println("Currently " + products.size() + " products.");
    while(productsIterator.hasNext()){
    Element productElement = (Element)productsIterator.next();
    List product = productElement.getChildren();
    System.out.println(productElement.getTextTrim());
    Iterator productIterator = product.iterator();
    while(productIterator.hasNext()){
    Element attElement = (Element)productIterator.next();
    System.out.println(attElement.getName() + " : " + attElement.getText());
    public static void removeProduct(String productName)throws IOException, JDOMException
    readDoc();
    Element root = document.getRootElement();
    List products = root.getChildren();
    Iterator productsIterator = products.iterator();
    root.removeChildren();
    while(productsIterator.hasNext()){
    Element tempElement = (Element)productsIterator.next();
    if(!tempElement.getTextTrim().equals(productName)){
    root.addContent(tempElement);
    document.setRootElement(root);
    saveChanges();
    public static void addProduct(String product_name, String description, String price)throws IOException, JDOMException
    readDoc();
    Element product = new Element("product");
    Element root = document.getRootElement();
    product.addContent(product_name);
    product.addContent(new Element("description").addContent(description));
    product.addContent(new Element("price").addContent(price).addAttribute("currency", "US"));
    root.addContent(product);
    saveChanges();
    public static void saveChanges(){
    try {
    XMLOutputter outputter = new XMLOutputter();
    FileWriter writer = new FileWriter("settings.xml");
    outputter.output(document, writer);
    writer.close();
    } catch (java.io.IOException e) {
    e.printStackTrace();
    public static void main(String argv[])throws IOException, JDOMException
    int selection;
    for(;;){
    System.out.println("1. Add a product\n2. Remove a product\n3. View products\n4. exit program");
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    try{
    selection = Integer.parseInt(in.readLine());
    switch(selection){
    case 1:
    System.out.println("Enter product name.");
    product_name = in.readLine();
    System.out.println("Enter product description.");
    description = in.readLine();
    System.out.println("Enter product price.");
    price = in.readLine();
    try{
    checkPrice = new Double(price);
    addProduct(product_name, description, price);
    }catch(Exception e){
    System.out.println("The product's price must be a numeric value.");
    break;
    case 2:
    System.out.println("Enter product name to remove.");
    product_name = in.readLine();
    removeProduct(product_name);
    break;
    case 3:
    listProducts();
    break;
    case 4:
    System.exit(1);
    break;
    default:
    System.out.println("The number you have typed is incompatible with the menu.");
    break;
    }catch(Exception e){
    System.out.println("Please type in a number that maches the menu.");
    enjoy....

  • Which is better to use: BEx query or Web Application as an iView in portal?

    Hi gurus!
    Are there any experienced opinions, which is better - publish a BEx query in portal or publish a BEx Web Application in portal? Is it easier to alter the layout attributes etc. if I create a BEx Web Application first before publishing?
    What is the way of fixing for example filter item height if I publish BEx query in portal - is there a Web Application that it uses anyhow which I can fix? Or can I use in that case iView -properties in portal?
    Thankful for advice
    Sari

    ok, means i can use jsp:useBean tag for all my
    classes that are not actually bean. so it will be
    instantiated at run time and provide efficiency .No. Jsp:useBean is used for java bean components.
    >
    but when should i use import statement in my jsp and
    it happen at translation time so will it create any
    type of burden for my code if i import multiple
    classes.For non-java beans, you need to import the classes, period.
    It's not a burden, it's a necessity.

  • Which is better for performance Azure SQL Database or SQL Server in Azure VM?

    Hi,
    We are building an ASP.NET app that will be running on Microsoft Cloud which I think is the new name for Windows Azure. We're expecting this app to have many simultaneous users and want to make sure that we provide excellent performance to end users.
    Here are our main concerns/desires:
    Performance is paramount. Fast response times are very very important
    We want to have as little to do with platform maintenance as possible e.g. managing OS or SQL Server updates, etc.
    We are trying to use "out-of-the-box" standard features.
    With that said, which option would give us the best possible database performance: a SQL Server instance running in a VM on Azure or SQL Server Database as a fully managed service?
    Thanks, Sam

    hello,
    SQL Database using shared resources on the Microsft data centre. Microsoft balance the resource usage of SQL Database so that no one application continuously dominates any resource.You can try the 
    Premium Preview
    for Windows Azure SQL Database which offers better performance by guaranteeing a fixed amount of dedicated resources for a database.
    If you using SQL Server instance running in a VM, you control the operating system and database configuration. And the
    performance of the database depends on many factors such as the size of a virtual machine, and the configuration of the data disks.
    Reference:
    Choosing between SQL Server in Windows Azure VM & Windows Azure SQL Database
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here. 
    Fanny Liu
    TechNet Community Support

  • Which is better??????

    which is better?Dam really confused which speaker to buy??
    i currently have a creative m2600.but am not getting enough performance or that feel while watching movies like avatar,step up 3 etc......so am planning to buy a 5.1.......not planning but i have decided to buy a 5.1....so..
    which is better? the 6160 or 6060 or 6100.
    which of these will provide me relly great exprience while playing games and most importantly while whatching hd movies and while listening to music.......
    and other than this what i have to ask is...what is this "db" in speakers. i mean while looking at a speaker specs we can see it..like 65db,85db,75db..etc........
    and when i compared specs of the three speakers i mentioned above i saw that the 6160 has low "db"........why is that?

    The specs is just a guide, you won't be able to tell the slight difference in db using just your ears. Besides, it is just a comparison between the level of a music to the level of background noise, it does not necessary mean which speaker sounds better. If possible, please make a trip to your local electronics store and try out the speakers system yourself.

  • Which is better, Photoshop or Corel?

    Which is better, Photoshop or Corel? I am finding the best one to use for my website [link removed]. Let me know your opinion. Tks all.

    Thank you! I am trying to find the best one for the site [Link removed].
    I used to use Corel before, but now, I am trying to use Photoshop.
    Tk you anyway
    [Removed link]
    Message was edited by: sinious

  • Which is better software for brochures and PDF forms ? Photoshop or InDesign ?

    Which is better software for brochures and PDF forms ? Photoshop or InDesign ? and why ?

    If you are going to be making a lot of brochures, with photos, you probably want both. Photoshop to edit the photos, and InDesign to assemble and layout images with text.

  • Which is better an android or apple

    Which is better getting an android smart phone or an Apple I Phone?

    As the poster Horses 547 said its a matter of personal preference. However I own and use both. Printing via air print is smooth and easy on an iphone. Printing on a android phone is iffy and tedious and you will have to find an app to print since there is no native app to do so. I purchased http://www.printhand.com which costs around $12 from the app store. but it is in my opinion the best printing app out there for android. I use it on my android tablet as well and its great. This company is the maker of the print app on iphones.
    The iphone is a little harder to put your own ringtone on the device. However very easy from the Itunes you put on your computer and hook into.
    Another thing an iphone does is if you use their cloud service or pay for a song it is available on all your ios devices. Iphone, ipad, or ipod or up to five computers registered through itunes on those computers.
    Google play music also can sync with all your android devices.
    Iphone don't have external Micro SD card slots, so the storage on the phone is all you have.
    Iphones use imessage which does not count against your text allotment  to another iphone or ipad user. it send regular text to non iphone users.
    Another thing is Face Time but I found a better program called oovoo at http://www.oovoo.com or in the Google Play Store for free.
    Iphones are paper thin but I have an android that has a larger view area and is also paper thin and light. Depending on the android phone it may have a removable battery, whereas iphones are sealed as are some new androids. I have found the sound for music better on my iphone, and videos are crystal clear. Again on some better androids the music and video is comparable .
    There is really not many differences but it up to the user.
    One last good thing is iphones are updated via Apple, no long waits for OS updates like is done with Android devices, and android devices on Verizon.

  • Which is better for doing animation? Flash 4, 5, MX, CS, or others?

    Which is better for doing animation? Flash 4, 5, MX, CS, or
    others?
    I am used to using brush function more conveniently in Flash
    4 than the other versions I ve tried. However, Flash 4 doesn't have
    pen tool.
    Free News Reader
    http://put.hk
    http://put.hk/reader/forums.macromedia.com/macromedia.flash.html

    1Evan2Wing3 wrote:
    > Which is better for doing animation? Flash 4, 5, MX, CS,
    or others?
    >
    > I am used to using brush function more conveniently in
    Flash 4 than the other versions I ve tried. However, Flash 4
    doesn't have pen tool.
    all pretty identical tho I would go with cs, just because I
    like the GUI much
    more than other versions...
    Best Regards
    Urami
    "Never play Leap-Frog with a Unicorn."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Which is better for bulk message scenario in sap xi RFC or Proxy

    which is better for bulk message scenario in ( RFC or Proxy ) ?
    Edited by: prabhatxi on Aug 6, 2010 4:44 PM

    Proxy will alwaays be better option in this case, as it is adapter less framework, and communication happens directly with XI central integration engine. So it is always fast communication and gives good performance.
    But still you should consider other factors, you may consider using RFC as well, as sometime we go for RFC/IDOC as this are the standard interfaces already available rather than creating structure...
    May be you can share more info on what type/volume data are you planning to send via XI?
    Hope this cleart your doubt..
    Divyesh

Maybe you are looking for

  • Illustrator won't run: "unable to set maximum number of files to be opened"

    I have an intel macbook pro (core duo with 2GB ram) and a copy of purchased adobe creative suite 2. Other applications in the suite like photoshop, acrobat, etc can run on my mac without any problem. But when I try to run illustrator, it just shows a

  • Support messages not getting displayed in Messages Tab - Solar01/02

    Hi, I am having an issue in displaying the support messages under the message tab of Solar01 and Solar02. If I try to create a new message, the notification pops up and also gets saved. But the message does not get displayed under the tab. I can find

  • Excel 2011 version 14.4.8 running on an iMac gets "out of memory" messages.

    HELP!!!   Excel 2011 running on an iMac with OS 10.10.2 and 16GB Ram gets "out of memory" messages.  When I monitor processes with "Activity Monitor", I am using less than half of my RAM.  The Excel workbook has many sheets and also some macros.  The

  • Address Book (on Mac) and Contacts (on iPod don't bhave the same way...

    Hi all. In Address Book (AB), I've flagged some contacts as "Company"; these are business contacts and AB displays them based on the company name which is OK. It doesn't display the person's name in the list, which is OK. If I do a search on the pers

  • IPod Touch no longer works!

    HI, I've got it for 2 yrs, not using that much, and it stopped working! The screen only shows light, and sometimes stripes. In store they told me that either the processor is gone or the graphic card. I'm really disappointed. I should understand that