Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: [PL/SQL] Objects

Re: [PL/SQL] Objects

From: Richard Kuhler <noone_at_nowhere.com>
Date: Tue, 12 Aug 2003 19:01:09 GMT
Message-ID: <VPa_a.18865$5e.1018137@twister.socal.rr.com>


gszalach wrote:
> Hi,
>
> I consider to use object types in my database. I would like to know
> what advantages and disadvantages of using objects instead of using
> some more columns are. My object would be a group of three fields
> without any methods.

If you have no intention of using methods (encapsulation) then you probably won't be using inheritance or polymorphism either (I guess you still could but the benefits would seem very limited). As others have stated, those are the main advantages.

On the downside, you should expect a performance hit because of some additional overhead the object relational model introduces (do a simple benchmark on your system to get a better idea of how much). If you start nesting object types then you should expect to have some more complicated SQL than you would have with a pure relational model (getting at nested data can often be a pain compared to dealing with separate relational tables). As others have stated, be prepared for limited or buggy 3rd party tool support in some cases.

Don't get me wrong, I have built a system based on an object relational model. The driving factor there was that the application was Java and JPublisher was used to automatically build the Java classes needed to transport the data between the database and Java. Also, with the XMLTYPE in 9i, you can easily convert XML to and from an object type.

My opinion is that object types are very useful for programming constructs but usually not worth it for defining your schema.

Richard Kuhler Received on Tue Aug 12 2003 - 14:01:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US