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
Initializing Objects: Till you initialize an object by calling the constructor for its object type, the object is automatically null. That is, the object itself is null, not me

What Is a Record  ? A record is a group of related data items that stored in the fields, each with its own name and datatype. Assume that you have different data about an em

Cursor FOR Loops In most cases that need an explicit cursor, you can simplify the coding by using a cursor FOR loop rather of the OPEN, FETCH, and CLOSE statements. A cursor FO

Mutual Recursion The Subprograms are mutually recursive if they directly or indirectly call each other. In the illustration below, the Boolean functions odd & even, that dete

Special cases of projection This section describes the identity projection, r {ALL BUT}, and the projection on no attributes, r { }, which yields TABLE_DUM when r is empty, ot

Relational Operators The relational operators permit you to compare randomly complex expressions. The list below provides the meaning of each operator:

INSERT Command in SQL Loosely speaking, INSERT takes the rows of a given source table and adds them to the specified target table, retaining all the existing rows in the targ

Avoiding Collection Exceptions   In many cases, if you reference a nonexistent collection element, then PL/SQL raises a predefined exception. Consider the illustration shown b

Project Description: I want to rebuild it and add better content to it It will include up to 5 forms The data will be saved on SQL server and the data access layer could b

Using a Join on 2 tables, select all columns and all rows from the tables without the use of a Cartesian product. Query: SELECT * FROM EMPLOYEE1 JOIN CONTRACT ON EMPLOYEE