Transcript Seminar_12
Seminar 5: Demonstrating Object and
Nested Relational Databases using Oracle
Purpose
The purpose of this seminar is to present how
object-relational and nested-relational databases
can be implemented using Oracle 9i.
Examples
EPD: Employee-Project-Department (see
EPD.SQL printout)
Lines: Made up of Points
EPD is designed first as a relational table.
Then EPD is redesigned using Project-Department
(PD_Table) to be a nested-relation within Emp_PD
table.
EPD is again redesigned using EmployeeDepartment (ED_Table) to be a nested-relation
within Proj_ED table.
Lines are implemented using nested-relational
features where each line is made up of private
points (see NestedLines.SQL printout).
Then using object-relational features, lines are
redesigned whereby lines can be constructed
using public points i.e. points are shared among
lines (see ObjRelLines.SQL printout).
Queries output is provided (see printout of
Example Query Output file)
Seminar 5: Object-Relational Databases
Advanced Database Technologies (CG096)
1
Tasks
1.
EPD
Download the file EPD.SQL from BlackBoard into
your home directory (say H:\CG096)
Open it using a text editor and read it.
Login to Oracle.
On the SQL plus prompt type by:
@H:\CG096\EPD.SQL
2.
Watch out the relational and nested-relational
queries and try to understand how they relate to
each other.
Nested Relational Lines
Download the file NestedLines.SQL.
Open it using a text editor and read it.
Run it on the SQL prompt by:
@H:\CG096\NestedLines.SQL
3.
Try to understand the query and its result.
See how a method is invoked in the SQL query.
Object Relational Lines
Download the file ObjRelLines.SQL.
Open it using a text editor and read it.
Run it on the SQL prompt by:
@H:\CG096\ObjRelLines.SQL
Try to understand the query and it result.
Compare and Contrast the Nested Relational and
Object Relational implementation of Lines.
Seminar 5: Object-Relational Databases
Advanced Database Technologies (CG096)
2