preface_4.htm |
In ORDBMS, Object-Relational Database Management System, the user defined objects extended an huge advantage over it's predecessor relational type of DBMS. |
Object Types: |
|
Oracle Type objects
|
![]() |
CREATE TYPE ref: Oracle Data-Stream
statements_8001.htm Use the CREATE TYPE statement to create the specification of an object type, a SQL object type, a named varying array (varray), a nested table type, or an incomplete object type. You can create object types
with the CREATE TYPE and the CREATE TYPE BODY statements. The CREATE
TYPE statement specifies the name of the object type, its attributes,
methods, and other properties. The CREATE TYPE BODY statement contains
the code for the methods that implement the type.
Map OR Order: to compare two objects You don't need to use MAP for procedures. If you create an object type for which the type specification declares only attributes but no methods, then you need not specify a type body. In Oracle MAP or ORDER protocol is used to compare the values of two objects during IN or OUT operation. MAP returns the relative position of an instance and compare the scalar data , you can only implement MAP or ORDER, the requirements of these two are optional and not REQUIRED.
Oracle has two protocols of passing data as OUT and IN OUT parameters in a PL/SQL code block. Using NOCOPY in the attributes, signals the compiler that no temporary buffer has to be allocated, and no forward or backward data operation was intended. (ref:2) In a method we often use SELF qualifier, meaning that this method intends to pass a reference to object.
|
http://docs.oracle.com/cd/B12037_01/appdev.101/b10800/dciobjtypes.htm |
Oracle introduced "REF CURSOR" with version 7.3 to allow all the recordsets to be returned to the caller from stored procedures and function. Oracle 9i provided an enhancement, to use inbuilt "SYS_REFFCURSOR"; |
object comparisonMAP MEMBER FUNCTION DataStreamToInt return integer is c integer := id; begin return c; end; |