Information Technology Reference
In-Depth Information
object-oriented database methods are one in, one out (i.e., one input, one output).
To convert a relational database program into object-oriented methods, we must
therefore break down the relational database into modules such that each module
accesses only one object. The program logic of a relational database program can be
converted into program logic of messages among objects.
The translation steps can be as follows:
5.9.1
The Relational Database
Relation Supplier ( supplier-id , supplier-name, address)
Relation Part ( part-id , part-name)
Relation Item ( supplier-id , part-id , unit-price)
Step 1. Schema translation from relational into object-oriented as described in
Chap. 3.
Step 2. Data conversion from relational into an object-oriented database as de-
scribed in Chap. 4.
Step 3. Break down the logic of each relational database program into message
logic such that each message invokes an object by translating each module into an
object's method and translating the other program logic into message processing
logic among objects.
For example, the example of the following embedded-SQL program can be trans-
lated into the following object-oriented methods using UniSQL ( 1992 ) as a sample :
Step 1. Relational tables SUPPLIER, PART, and ITEM are translated into the
following objects:
create supplier create part
(supplier_id string, (part_id string,
supplier_name string, part_name string));
address string));
create unit_price
(unit_price integer,
supplied_by supplier,
supplemented_by part));
Step 2. Data on relational tables SUPPILER, PART, and UNIT_PRICE are unload-
ed and uploaded into data of object student under an object-oriented DBMS.
Step 3.1. The relational database programs to select and insert items are trans-
lated into messages that access object ITEM in different methods using UniSQL, an
object-oriented database.
Search WWH ::




Custom Search