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
Parameter and Keyword Description: select_item: This select_item is a value returned by the SELECT statement, and then assigned to the equivalent variable or field in the

%FOUND Subsequent to a cursor or cursor variable is opened but before the first fetch, the %FOUND yields NULL. Afterward, it yields TRUE when the last fetch returned a row, or

Tautologies: Above given table allows us to read the truth of the connectives in the next manner. Just expect we are looking at row three. It means this says that, if there P

Subprograms The PL/SQL has two types of subprograms known as the procedures and functions that can take parameters and be invoked. As the following example represents, a subp

DELETE Statement The DELETE statement eliminates whole rows of data from the specified table or view. Syntax:

PL SQL Code Review HEADER ELEMENTS File Name Clear, meaningful and descriptive about main objective of the file. Multiple words are joined using underscores which adh

Example of COALESCE operator Example: Give the total of marks for each exam (simplified solution) SELECT CourseId, COALESCE ((SELECT SUM (Mark) FROM EXAM_MARK AS EM

Primary Key - SQL A PRIMARY KEY specification carries an implicit NOT NULL constraint on each column of the specified key. When more than one key constraint is required, the k

We are seeking a freelance consultant that is familiar with Appgen applications. We require exporting all our data into a format appropriate for importing into SAP Business One. Pl

JOIN and AND in SQL In this Section is all about one operator, JOIN. SQL's closest counterpart, NATURAL JOIN, has already been covered. Here we look at several other "join" op