Postgres Plus Advanced Server Oracle Compatibility Developer's Guide :

Previous PageTable Of ContentsNext Page

Postgres Plus Advanced Server Oracle Compatibility Developer's Guide


8 Object Types and Objects

This chapter discusses how object-oriented programming techniques can be exploited in SPL. Object-oriented programming as seen in programming languages such as Java and C++ centers on the concept of objects. An object is a representation of a real-world entity such as a person, place, or thing. The generic description or definition of a particular object such as a person for example, is called an object type. Specific people such as “Joe” or “Sally” are said to be objects of object type, person, or equivalently, instances of the object type, person, or simply, person objects.

Note: The terms “database objects” and “objects” that have been used in this document up to this point should not be confused with an object and object type as used in this chapter. The prior usage of these terms is in a general sense to mean the entities that can be created in a database such as tables, views, indexes, users, etc. Within the context of this chapter, object and object type refer to specific data structures and code that are well-defined by the SPL programming language.

As was stated at the beginning of this chapter, an object type is a description or definition of something. This definition of an object type is characterized by two components:

    ● Attributes – fields that describe particular characteristics of an object instance. For a person object, examples might be name, address, gender, date of birth, height, weight, eye color, occupation, etc.

    ● Methods – programs that perform some type of function or operation on, or related to an object. For a person object, examples might be calculating the person’s age, displaying the person’s attributes, changing the values assigned to the person’s attributes, etc.

The remainder of this chapter delves into the creation and usage of object types and objects in SPL.

Note: Implementation of SPL object types and objects is following a phased approach. As of this release, support of methods along with certain other features of most object-oriented programming languages have not yet been implemented. This chapter documents only those features that have currently been implemented.

Previous PageTable Of ContentsNext Page