The name PL/SQL implies that it is a procedural language. But from 9i onwards PL/SQL started support for objects. The focus of procedural paradigm is on data structures like procedures, functions. On the other hand Object Oriented Programming (OOP) revolves around modeling the real world entities in the form of objects. Objects consist of attributes that describe the object and methods that describe the behavior of the object. Method is a design level terminology that is implemented through procedures and functions.
The implementation of OOP in PL/SQL is almost similar to other languages; of course syntax and terminology differs a bit. All the tenets of OOP like abstraction, encapsulation, inheritance and polymorphism lie there. In Java, VB.Net, C++ and other OOP languages there is a concept of grouping objects in the form of classes. The similar concept in PL/SQL is termed as Object Type. There are two types of objects in PL/SQL. Transient objects are those who get initiated with the start of the program and abolished with the termination of the program. Permanent objects are those that are stored in the database. As you know Oracle database supports objects from its version 8. In database object types are treated like any other schema objects and can be accessed and manipulated like the others.
No comments:
Post a Comment