O'Reilly logo

Oracle PL/SQL Programming, 4th Edition by Bill Pribyl, Steven Feuerstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 25. Object-Oriented Aspects of PL/SQL

PL/SQL has always been a language that supports traditional procedural programming styles such as structured design and functional decomposition. Using PL/SQL packages, it is also possible to take an object-based approach, applying principles such as abstraction and encapsulation to the business of manipulating relational tables. Later versions of Oracle have introduced direct support for object-oriented programming (OOP), providing a rich and complex type system, complete with support for type hierarchies and "substitutability."

In the interest of summarizing this book-sized topic into a modest number of pages, this chapter presents a few choice code samples to demonstrate the most significant aspects of object programming with PL/SQL. These cover the following areas:

  • Creating and using object types

  • Inheritance and substitutability

  • Type evolution

  • Pointer (REF)-based retrieval

  • Object views

Among the things you will not find in this chapter are:

  • Comprehensive syntax diagrams for SQL statements dealing with object types

  • Database administration topics such as importing and exporting object data

  • Low-level considerations such as physical data storage on disk

I'd like to introduce the topic with a brief history.

Introduction to Oracle's Object Features

First released in 1997 as an add-on to the Oracle8 Database (the so-called "object-relational database"), the Objects Option allowed developers to extend Oracle's built-in datatypes to include abstract ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required