|In ORDBMS, Object-Relational Database Management System, the user defined objects extended an huge advantage over it's predecessor relational type of DBMS.|
|Oracle Type objects
|CREATE TYPE ref: Oracle Data-Stream
In Oracle RDBMS, the statement "CREATE TYPE" is used to create a SQL-Object-Type (both in Oracle and PostgreSQL), a named varying array (varray) of Oracle, 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.
Accessing with php
|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";|
MAP MEMBER FUNCTION DataStreamToInt return integer is c integer := id; begin return c; end;