O'Reilly logo

Oracle Database 11g: Building Oracle XML DB Applications by Jinyu Wang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Querying Oracle Database with Web Services

To learn XML DB Web Services, let’s build an application that manages stock trading data.

First, we create the following tables to store the stock trading transactions and client information (create_tables.sql):

CREATE TABLE stock_trans_tbl(

     client id     NUMBER,

     stock id     VARCHAR2(20),

     trans type     VARCHAR2(10),

     shares     NUMBER,

     stock_price     NUMBER);

CREATE TABLE client_tbl(

     client_id     NUMBER,

     username     VARCHAR2(20),

     client_pwd     RAW(16));

Next, we add the following client data (insert_data.sql):

INSERT INTO client_tbl VALUES(1,’jsmith’,

utl_raw.cast_to_raw(‘jsmith’||’good’));

To protect the client password, we use the database utl_raw.cast_to_raw() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required