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
Managing Cursors The PL/SQL uses 2 types of cursors: implicit and explicit. The PL/SQL declares a cursor implicitly for all the SQL data manipulation statements, including th

%ISOPEN The %ISOPEN yields TRUE if its cursor or cursor variable is open; or else, the %ISOPEN yields FALSE. In the illustration, you use the %ISOPEN to select an action:

Using Aggregation on Nested Tables Example is the most direct translation of its counterpart in the theory book that can be obtained in SQL but it is so over-elaborate that no

DBMS: The answer to this question is of course given in of the theory book. This book is concerned with SQL DBMSs and SQL databases in particular. Soon we will be looking a

Keys in SQL SQL support for keys in the following respects: SQL does not require at least one key for every base table. If no key is explicitly declared, then KEY {ALL B

THEO R Y OF PANSPERMIA - Arrhenius (1908) postulated the cosmic panspermia theory that claims that organisms existed throughout the universe, and their spores, etc., could

Usefulness of Data Type In SQL, as in most computer languages, a type can be used for constraining the values that are permitted to be used for some purpose. In particular, i

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

Anatomy of a Command Figure, showing a simple SQL command, is almost identical to its counterpart in the theory book. The only difference arises from the fact that SQL uses a

Semidifference via EXCEPT and JOIN - SQL SELECT * FROM (SELECT StudentId FROM IS_CALLED WHERE Name = 'Devinder' EXCEPT DISTINCT CORRESPONDING SELECT StudentId