Implementation of OOPS in Oracle

2019-08-01 15:58发布

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

标签: oracle oop
3条回答
SAY GOODBYE
2楼-- · 2019-08-01 16:15

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.

查看更多
Fickle 薄情
3楼-- · 2019-08-01 16:16

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.

查看更多
我欲成王,谁敢阻挡
4楼-- · 2019-08-01 16:18

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).

查看更多
登录 后发表回答