Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: oracle8 can support list or set type?
You use data abstraction when you specify the datatype of a variable. The
datatype stipulates a set of values and a set of operations appropriate for
those values. For instance, a variable of type POSITIVE can hold only
positive integers, and can only be added, subtracted, multiplied, and so on.
To use the variable, you need not know how PL/SQL stores integers or
implements arithmetic operations; you simply accept the programming
interface.
Object types are a generalization of the built-in datatypes found in most programming languages. PL/SQL provides a variety of built-in scalar and composite datatypes, each of which is associated with a set of predefined operations. A scalar type (such as CHAR) has no internal components. A composite type (such as RECORD) has internal components that can be manipulated individually. Like the RECORD type, an object type is a composite type. However, its operations are user-defined, not predefined.
Currently, you cannot define object types within PL/SQL. They must be CREATEd and stored in an Oracle database, where they can be shared by many programs. A program that uses object types is called a client program. It can declare and manipulate an object without knowing how the object type represents data or implements operations. This allows you to write the program and object type separately, and to change the implementation of the object type without affecting the program. Thus, object types support both procedural and data abstraction. Received on Wed Nov 25 1998 - 06:49:41 CST