Posts

Showing posts from June, 2013

Oracle Database

What is Object in Oracle? = This concept is almost analogue to Java Object. 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.When you create a variable of an object type, you create an instance of the type and the result is an object. An object has the attributes and methods defined for its type. Because an object instance is a concrete thing, you can assign values to its attributes and call its methods. Defining an object type does not allocate any storage. Let us see example to learn how to create and use Object in Oracle. First, define an Object Type, i.e data type: Example: CREATE TYPE person_typ AS OBJECT ( idno NUMBER, first_name VARCHAR2(20), last_name VARCHAR2(25), email VARCHAR2(25), phone VARCHAR2(20), MAP MEMBER FUNCTION get_idno RETURN NUMBER, CREATE TYPE BODY person_typ AS MAP MEMBER FUNCTION get_id...