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.


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
Updating by replacement Syntax: UPDATE ENROLMENT SET Name = 'Ann' WHERE StudentId = SID ('S1'); Note the use of SET, as already noted in connection with direct a

Complete the following steps to create a procedure to calculate the tax on an order. The BB_TAX table contains the states that require taxes to be submitted for Internet sales. If

Updating Objects: To change the attributes of objects in an object table, you can use the UPDATE statement, as the illustration below shows: BEGIN UPDATE persons p SET p

ALTER TABLE bb_basketitem ADD CONSTRAINT bitems_qty_ck CHECK (quantity BEGIN INSERT INTO bb_basketitem VALUES (88,8,10.8,21,16,2,3); END; Brewbean’s wants to add a check

Forward Declarations The PL/SQL needs that you declare an identifier before using it. And hence, you should declare a subprogram before calling it. For illustration, the decla

CLOSE Statement The CLOSE statement allows the resources held by a cursor variable or open cursor to be reused. No more rows can be fetched from the cursor variable or closed

LAWS / RULES - Dollo's Law                     :           Living organisms do exhibit evolutionary irreversibility or evolution is irreversible. Williston's Law

Example of GROUPBY Operator Example: How many students sat each exam, using GROUP BY, NATURAL LEFT JOIN, and COALESCE SELECT CourseId, COALESCE (n, 0) AS n FROM COURS

Creating and Destroying Base Tables: Example shows an SQL command to create the base table counterpart of the ENROLMENT variable Example  Creating a base table. CREATE T

THEORY OF SPONTANEOUS GENERATION - ABIOGENESIS OR AUTOGENESIS - According to this theory, the existing living communities have originated from non-living organic matter with