The database contents, executed SQL formats, SQL operation definition file, and formats after transformation used in the examples are as follows:
- Database contents
- Database reference name: DB_SERVER1
- Schema name: DBA
- Table name: Order_Table
- Table configuration:
Order_number (INTEGER) |
Customer_code (CHAR) |
Product_code (CHAR) |
Number_of_orders (INTEGER) |
1 |
AA001 |
0001 |
5 |
2 |
AB002 |
0001 |
1 |
3 |
AA001 |
0102 |
3 |
4 |
XA005 |
0103 |
1 |
5 |
AA001 |
0105 |
1 |
- Executed SQL format
OPERATION1:SELECT * FROM DBA.Order_table WHERE val1 val2 val3
|
- SQL operation definition file
<?xml version="1.0" encoding="UTF-8" ?>
<DBadapter_SQL_OPERATION>
<DATABASE_DATA>
<DB_NAME>DB_SERVER1</DB_NAME>
<DB_TYPE>HIRDB</DB_TYPE>
</DATABASE_DATA>
<SQL_DATA>
<OPERATION1>
SELECT * FROM DBA.Order_table WHERE <val1 dba_inf="column"/>
<val2 dba_inf="preset"/>
<val3 dba_inf="data" data_type="CHAR"/>
</OPERATION1>
</SQL_DATA>
</DBadapter_SQL_OPERATION>
|
- For details about each item in the SQL operation definition file, see the descriptions related to the creation of an SQL operation definition file in 3.3.5 Defining Database Adapters in the Service Platform Reception and Adapter Definition Guide. For the formats of data that can be acquired by using the database adapter, see the descriptions related to response message format in 3.3.5 Defining Database Adapters in the Service Platform Reception and Adapter Definition Guide.
- XML schema of the post-transformation formats
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/DBA_Sample1"
xmlns:tns="http://www.example.org/DBA_Sample1"
elementFormDefault="qualified">
<complexType name="DBA_Sample1Type">
<sequence>
<element name="record" type="tns:RecordType"
maxOccurs="unbounded" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="RecordType">
<sequence>
<element name="Order_number" type="int" maxOccurs="unbounded" minOccurs="0"/>
<element name="Customer_code" type="string" maxOccurs="unbounded" minOccurs="0"/>
<element name=" Product_code" type="string" maxOccurs="unbounded" minOccurs="0"/>
<element name="Number_of_orders" type="int" maxOccurs="unbounded" minOccurs="0"/>
</sequence>
</complexType>
<element name="Order_table" type="tns:DBA_Sample1Type"/>
</schema>
|
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.