Lu6.Conv - Dcdo.jql Vs SQL
Lu6.Conv - Dcdo.jql Vs SQL
In
this learning unit, you will learn the internal working of RDBMS Driver. You will also
have a brief introduction into how the JQL statements are translated to a SQL
statement.
The screenshot shows part of the XMLdriver.log file generated when the
CREATE.FILE command is executed. You can see the DICTONARY part of the
XMLORACLE file created, being translated into a SQL statement CREATE TABLE
D_TRG_TEST. This table D_TRG_TEST is created under T24DATA tablespace. This
table contains two fields namely RECID(VARCHAR 255) and XMLRECORD (type
XMLTYPE).
Note: Make sure the following variables are set, in order for these activities to be
recorded in the log.
JEDI_XMLDRIVER_DEBUG
JEDI_XMLDRIVER_DEBUG_DISPLAY
JEDI_XMLDRIVER_TRACE
A primary key has been created for the field RECID. Name of the primary key
constraint is PK_D_TRG_TEST. The index created for the primary key has been
placed under the T24INDEX tablespace. The name, path and the type of the file have
been updated to the STUBFILES table.
When the variable JEDI_XMDRIVER_TRACE is set, all the info will get logged like the
functions and procedures called, value of the variables assigned at different stages,
This screenshot displays the creation of a record under the TRG.TEST file. The
content “WELCOME TO T3DCDO TRAINING” has been entered and saved into the
record.
This part of XMLdriver.log file displayed above, shows the translation of WRITE onto
oracle table TRG_TEST. The record key is RECORD1<row id> , record content is
<c1>WELCOME TO T3DCDO<c1> , where rowid denotes the record name and c1 the
column on which the content is updated onto the table TRG_TEST
Let us check the log details of CLEAR.FILE at jshell, which eventually deletes
contents of file TRG_TEST at Oracle. This part of XMLdriver.log displayed above
shows the translation of CLEAR.FILE in SQL.
Let us check the log details of DELETE.FILE at jshell, which eventually DROPS the file
TRG_TEST at Oracle.
Entry for the above mentioned files are removed from the STUBFILES table.
The J4 SELECT statement has been converted to an Oracle SQL statement by the
driver.
Since this is a simple select this will lead to full table scan
RECID will be already indexed and this select will fetch only those records with ID
100724 from the database.
Note: NUMCAST is just a simple function that returns TO_NUMBER of its input
argument
The above query shows that the full table is selected at the
Oracle level and then the whole set of data is filtered at the
jbase level to met the selection criteria. This will affect the
performance.
After creating an index, there won’t be a full table scan and there will be an
improvement in performance.
ExtractValue() function takes two arguments. The first is the XML data, the second is
the XPath expression that you want to evaluate. The function returns the first text node
under each element that matches the XPath expression
Here the Xpath expression is /row/c9. (This is to fetch c9 element inside row element)
Note: NUMCAST is just a simple function that returns TO_NUMBER of its input
argument
ORACLE inspects the XML data contained in the “XMLRECORD" column, navigates
from the root “row" element to “c9“ element and check whether the value is JPY
However there is an alternative method to figure out the index created, if you know the
application . You can use this command mentioned below:
Select will be a simple select at the database level, meaning all the record ids will be
fetched from the database and then filtered at the jbase level to meet the selection
criteria.
As mentioned earlier, each of those tables will contain 2 columns namely, RECID
and XMLRECORD.
This screenshot above displays the views created for currently logged in Oracle user.
To obtain the field definition of the view created, execute the following Oracle SQL
statement DESC <VIEW_NAME>.
JEDI_XMLORACLE_BINARYXML=1
JEDI_XMLORACLE_NOCOMPRESS=1
SecureFile is new type of LOB data vs. BasicFile. Table has to be recreated if
migrating exist data from old LOB type. Default FALSE ( using SecureFile).
NOTE:
The driver by default creates table in a compressed format.
Question : Which of these are the commands to create a view in Oracle for T24
applications from jshell or T24.
Choice 1: TRANSBEGINING
Choice 2: BEGIN TRANSACTION
Choice 3: TRANSBEGIN
Choice 4: TRANSROLLFORWARD
Answer: True
--------------------------------------------------------------------------------------------------------------