Object Tables Assignment Help

Assignment Help: >> Object Oriented Programming concepts - Object Tables

Object Tables And OID (ROW OBJECTS):

An object table is a special category of table which holds objects and gives a relational view of the attributes of that objects. In an object table, every row is a row object. Every row within the object table has an OID - an Object Identifier value - assigned through Oracle when the row is created. The OID is an identifier for a row object. The Other objects within the database can reference the rows of an object table.

 

Example

CREATE OR REPLACE TYPE dep_type AS OBJECT (

depno NUMBER,

dname VARCHAR2(20), loc VARCHAR2(20)

);

This is an easiest object type. To create a table out of this object type, the subsequent syntax must be used.

Syntax:

CREATE TABLE <tablename> OF <typename>;

The example which is given below shows this better.

To create an object table of the DEP_TYPE datatype,

CREATE TABLE deptab OF dep_type;

Oracle permits you to view this table in two ways:

  • A single column table in that every entry is a dep_type object.
  • A multi-column table in that every of the attributes of the object type dep_type, namely dname, depno,and loc occupies a column.
Inserting Records to Object Tables Selecting Records
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd