Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Object Table
"Jiraiya Sama" <jiraiya_at_yahoo.com> wrote
> i am learning the object-relational sql in oracle and i have some questions
> about that.
<snipped>
Personally, I'm not fully sold on OO-relation tables. The two methods are IMO in conflict at times. Besides, relational db theory is mature, known, and darn well implemented in Oracle when it comes to the actual storing & retrieval of data.
What I do like though is implementing the tables as relation and then create a UDT as a PL/SQL class for that table.
Very basic exmaple. In PL/SQL this:
INSERT INTO foo blah blah
becomes this:
declare
f TFoo;
begin
f := NEW TFoo( blah blah );
f.Save;
end;
Why I like it - it allows a lot more flexibility on the developer side to use all the good OO stuff via a UDT OO Class to your tables. Add pipeline function tables to the mix (what I consider one of the friggen kewlest features in Oracle) and things suddenly are easier and make a lot more sense.
It also allows for the creation of more complex classes, where a single UDT class in PL/SQL describes a complex relationship of multiple tables with member methods that implements the required business processing logic.
And when it comes to SQL performance issues, I have only a single place to look at - the member methods of the UDT class. Not having to troll through PL/SQL package after PL/SQL package looking for and fixing bad SQL and worse logic.
-- BillyReceived on Wed Aug 27 2003 - 08:15:36 CDT
![]() |
![]() |