Parameter and keyword description - object types, PL-SQL Programming

Parameter and Keyword Description:


This identifies a user-defined type specifier that is used in the subsequent declarations of the objects.

AUTHID Clause:

This determines whether all the member methods execute with the rights of their definer (the default) or invoker, and whether their untrained references to schema objects are solved in the schema of the invoker or definer.


This identifies the object attribute. The name should be exclusive within the object type, however can be reuse in the other object types. You can't initialize an attribute in its declaration by using the assignment operator or DEFAULT clause. Also, you cannot force the NOT NULL constraint on an attribute.


This is any Oracle datatype excluding LONG, LONG RAW, NCLOB, NCHAR, NVARCHAR2, ROWID, the PL/SQL-specific types BINARY_INTEGER, BOOLEAN, PLS_INTEGER, RECORD, REF CURSOR, %TYPE, & %ROWTYPE, and types defined inside the PL/SQL package.


This keyword allows you to state a subprogram or call specification as a method in an object type specification. The method cannot have similar name as the object type or any of its attributes. The MEMBER methods are invoked on instances, which is as shown below:


Though, the STATIC methods are invoked on the object type, not its instances, as shown:


For each of the subprogram specification in an object type specification, there should be an equivalent subprogram body in the object type body. To match specifications and bodies, the compilers do a token-by-token comparison of their headers. Therefore, the headers should match word for word.

The MEMBER methods accept a built-in parameter named SELF that is an instance of the object type. Whether it is declared explicitly or implicitly, it is forever the first parameter passed to a MEMBER method. Though, the STATIC methods cannot accept or reference SELF.

In the method body, the SELF represents the object whose method was invoked. For illustration, the method transform declares SELF as an IN OUT parameter:


MEMBER FUNCTION transform (SELF IN OUT Complex) ...


This keyword indicate that a method orders objects by mapping them to the values of a scalar datatype like CHAR or REAL, that have a predefined order. The PL/SQL uses the ordering to compute Boolean expressions like x > y, and to do comparisons implied by the GROUP BY, DISTINCT, and ORDER BY clauses. A map method returns the relative place of an object in the ordering of all such objects.

An object type can hold only one map method that should be a parameter less function having the return type NUMBER, DATE, VARCHAR2, or an ANSI SQL type like INTEGER, CHARACTER, or REAL.


This keyword specifies that a method compares two objects. An object type can hold only one order method that should be a function which returns a numeric result.

Every order method takes merely two parameters: the built-in parameter SELF and the other object of the same type. When c1 and c2 are Customer objects, a comparison like c1 > c2 calls method match automatically. The method returns a zero, negative number, or a positive number signifying that the SELF is respectively equal to, less than, or greater than the other parameter. When either parameter passed to an order method is null, and the method returns a null.


This construct declares the interface to the member function or procedure. Its syntax is similar to that of function_spec or procedure_spec without the terminator.


This construct defines the underlying implementation of the member function or procedure. Its syntax is similar to that of function_body or procedure_body without the terminator.


This publishes a Java method or the external C function in the Oracle data dictionary. It publishes the practice by mapping its parameter types, name, and return type to their SQL counterparts. 

Posted Date: 10/8/2012 7:13:34 AM | Location : United States

Related Discussions:- Parameter and keyword description - object types, Assignment Help, Ask Question on Parameter and keyword description - object types, Get Answer, Expert's Help, Parameter and keyword description - object types Discussions

Write discussion on Parameter and keyword description - object types
Your posts are moderated
Related Questions
THEO R Y OF SPECIAL CREATION - Life originated on the earth due to natural events by the super natural power. The biblical story of creation of world within six days was p

Structure of an Object Type: Similar to package, an object type has 2 parts: the specification and the body. The specification is the interface to your applications; it declar

Example of Foreign Key Constraint Example: Alternative formulation for 6.3 as a foreign key constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Must_be_enrolled_to_take_exam

Project Description: This is stage 1 of a larger conversion project. We are converting a traditional Server/Client application written in Access 2007 into a web interface with S

PPD , CPA, Filesharing Site Project Description: This is very easy I need a PPD , CPA, Filesharing Site. [PPD] stands for (pay per download) example hotsharecash [Files

Procedures   The procedure is a subprogram which performs a specific action. You write procedures using the syntax as shown below: PROCEDURE name [(parameter[, parameter, .

UPDATE Statement   The UPDATE statement transforms the values of the specified columns in one or more rows in the table or view. Syntax:

I need SQL to infopath data connection Project Description: Want data retrieval connection from SQL to SharePoint infopath Skills required are Sharepoint, SQL

Effect of Anonymous Columns Now, recall that a VALUES expression denotes a table with undefined column names. If an initial value is to be specified when a base table is creat

Effects of NULL for Multiple Assignments - SQL If the row expression given as the source for a multiple assignment evaluates to NULL, then NULL is assigned to each target. If