tags:

views:

205

answers:

3

Hi all,

Can you give me some idea about implementation of OOPS in Oracle?

Thanks in advance.

+2  A: 

That is a very large subject for a forum question. See the Oracle Database Object-Relational Developer's Guide for 100s of pages on this topic.

Tony Andrews
+5  A: 

Oracle has supported objects since version 8.0 of the database (i.e. over a decade). However, it wasn't until 9iR2 that Oracle TYPE supported user-defined constructors and properly implemented polymorphism. In 11g they added support for a Java-esque SUPER() call. But Oracle still doesn't support private variables or private methods.

As a consequence, OO programming hasn't really taken off in the Oracle world. People use Types to define collections in PL/SQL, which are especially useful for bulk processing. Pipelined functions are also neat, and open up an interesting little toolset.

I have used Oracle's object oriented functionality, and if I'm honest there are not many scenarios where it makes sense to choose types over regular PL/SQL. However, there are some situations where it can be useful. I have blogged about this at some length. Find out more.

edit

As Tuinstoel commented I linked to the wrong article on Adrian's site. They correctly divined the article I meant to link to, and I have now changed the link accordingly.

APC
+1 nice blog, nice answer.
KLE
+1 as well - good job of distilling+linking for answer to complex topic
dpbradley
Maybe this is a better link http://www.oracle-developer.net/display.php?id=420 ? It is about pipelined functions, objects, polymorhism and inheritance.
tuinstoel
A: 

Here you have an example of using Oracle objects in combination with inheritance and polymorphism: link text . APC links to another page on this site, also about pipelined functions and objects but without inheritance and polymorphism.

And here is another one: link text

(Tom Kyte didn't like it but I post it anyway, I still feel a little sad that the discussion was in the end about commiting in PL/SQL instead of OO programming).

tuinstoel