Object types - syntax, PL-SQL Programming

Object Types

An object type is a user-defined complex datatype which encapsulates the data structure along with the functions and procedures required to manipulate the data. The variables which form the data structure are known as the attributes. The procedures and functions which characterize the behavior of the object type are known as the methods.

Presently, you cannot define object types within the PL/SQL. They should be CREATED and stored in an Oracle database, where they can be shared by various programs.

When you define an object type (in the SQL*Plus for illustration) using the CREATE TYPE statement, you can create an abstract template for various real-world object. The templates specify only those attributes and behaviors the object will require in the application atmosphere.

The data structure formed by the set of attributes is public. Though, well-behaved programs do not manipulate it directly. Rather than, they use the set of methods provided. In that way, the data is kept in an appropriate state. At the run time, when the data structure is filled with values, you have formed an instance of an object type. You can create as numerous instances (typically known as objects) as you require.

Syntax:

1415_object types.png

 

1767_object types1.png

Posted Date: 10/8/2012 7:11:58 AM | Location : United States







Related Discussions:- Object types - syntax, Assignment Help, Ask Question on Object types - syntax, Get Answer, Expert's Help, Object types - syntax Discussions

Write discussion on Object types - syntax
Your posts are moderated
Related Questions
Stored Subprograms Normally, tools (like Oracle Forms) which incorporate the PL/SQL engine can store subprograms locally for later, strictly local execution. Though, to become

Implicit Rollbacks Before execute the INSERT, UPDATE, or DELETE statement, the Oracle marks an implicit savepoint . When the statement fails, the Oracle rolls back to the save

Attributes: Just similar to variable, an attribute is declared with a name and datatype. The name should be exclusive within the object type. The datatype can be any Oracle ty

Semidifference and NOT - SQL In this section first describe the relational difference operator, named MINUS. Example here shows SQL's closest counterpart of that operator.

Parameter & Keyword Description: function_name: The user-defined function is identifying by that keyword. parameter_name: This identifies the formal parameter that

Pass the nulls to a dynamic SQL: Passing Nulls: Assume that you want to pass the nulls to a dynamic SQL statement. For illustration, you may write the EXECUTE IMMEDIATE

BIOCHE M ICA L ORIGIN OF LIFE - It is generally agreed by astronomers, geologists and biologists that the earth is approximately 4500-5000 million years old. It is an

Using LOCK TABLE You use the LOCK TABLE statement to lock the whole database tables in the specified lock mode so that you can share or deny the access to them. For illustrati

Cause of Indeterminacy in SQL One root cause of indeterminacy in SQL lies in its implementation of comparison for equality. For certain system-defined types it is possible for

Pl/sql Conditional Control: IF statements Frequently, it is necessary to take the alternative actions depending on the circumstances. The IF statement execute a series of statem