09.12.2012 Views

Advanced Queuing - Oracle

Advanced Queuing - Oracle

Advanced Queuing - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

General Features of <strong>Advanced</strong> <strong>Queuing</strong><br />

items orderitemlist_vartyp,<br />

ccnumber varchar2(20),<br />

order_date date);<br />

create or replace type customer_typ_sh as object (<br />

custno number,<br />

name varchar2(100),<br />

street varchar2(100),<br />

city varchar2(30),<br />

state varchar2(2),<br />

zip number);<br />

create or replace type book_typ_sh as object (<br />

title varchar2(100),<br />

authors varchar2(100),<br />

ISBN varchar2(20),<br />

price number);<br />

create or replace type orderitem_typ_sh as object (<br />

quantity number,<br />

item book_typ,<br />

subtotal number);<br />

create or replace type orderitemlist_vartyp_sh as varray (20) of<br />

orderitem_typ_sh;<br />

The Overseas Shipping application uses a sys.XMLType attribute.<br />

Creating Transformations<br />

You can create transformations in the following ways:<br />

Create a single PL/SQL function that returns an object of the target type or the<br />

<br />

constructor of the target type.<br />

This representation is preferable for simple transformations or transformations<br />

that are not easily broken down into independent transformations for each<br />

attribute.<br />

execute dbms_transform.create_transformation(<br />

schema => 'OE', name => 'OE2WS',<br />

from_schema => 'OE', from_type => 'order_typ',<br />

to_schema => 'WS', to_type => 'order_typ_sh',<br />

transformation(<br />

'WS.order_typ_sh(source.user_data.orderno,<br />

source.user_data.status,<br />

8-8 <strong>Oracle</strong>9i Application Developer’s Guide - <strong>Advanced</strong> <strong>Queuing</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!