Objects can include the ability to perform operations that are likely to be performed on that data.Thus, a purchase order object might include a method to calculate the cost of all the items purchased.By natively supporting object types in the database, Oracle Database enables application developers to directly access the data structures used by their applications.
Oracle object types are user-defined types that make it possible to model real-world entities, such as customers and purchase orders, as objects in the database.
New object types can be created from any built-in database types and any previously created object types, object references, and collection types.
After they are defined, object types can be used in SQL statements in most of the same places you use types such as table is a relational table with an object type as the data type of its contact column.
Objects that occupy columns of relational tables are called column objects. Object methods are functions or procedures that you can declare in an object type definition to implement behavior that you want objects of that type to perform.
SQL and various programmatic interfaces and languages, including PL/SQL, Java, Oracle Call Interface, Pro*C/C , OO4O, and C# have been enhanced with extensions to support Oracle objects.
The result is an object-relational model that offers the intuitiveness and economy of an object interface while preserving the high concurrency and throughput of a relational database. For example, you can specify an object type as the data type of a column in a relational table, and you can declare variables of an object type.In general, the object-type model is similar to the class mechanism found in C and Java.Like classes, the reusability of objects makes it possible to develop database applications faster and more efficiently.Application code can retrieve and manipulate these objects. You use the ( idno NUMBER, first_name VARCHAR2(20), last_name VARCHAR2(25), email VARCHAR2(25), phone VARCHAR2(20), MAP MEMBER FUNCTION get_idno RETURN NUMBER, MEMBER PROCEDURE display_details ( SELF IN OUT NOCOPY person_typ )); / CREATE TYPE BODY person_typ AS MAP MEMBER FUNCTION get_idno RETURN NUMBER IS BEGIN RETURN idno; END; MEMBER PROCEDURE display_details ( SELF IN OUT NOCOPY person_typ ) IS BEGIN -- use the PUT_LINE procedure of the DBMS_OUTPUT package to display details DBMS_OUTPUT.PUT_LINE(TO_CHAR(idno)