20.5 Not All Views with Objects Are Object Views

Chapter 20
Object Views
 

With the Oracle objects option installed, there are other interesting possibilities for views which do not necessarily qualify as "object views." For example, you can create a view that has an object as a column:

CREATE TABLE requisition (    req_no INTEGER,    image_id NUMBER ); CREATE VIEW requisition_v AS    SELECT r.req_no, VALUE(i) image      FROM requisition r,           images_v i     WHERE r.image_id = i.image_id;

The requisition view now has two columns: one for the req_no, of type INTEGER; and one for the image, of type Image_t.

You can combine many object features into an object view. For instance, you can define an object view that includes a column that contains a collection of objects. Just because the possibilities seem endless, though, there is no excuse to get carried away; objects should be restricted to "natural" representations of data; they shouldn't serve merely as the basis of intellectual calisthenics for the programmer.


20.4 Differences Between Object Views and Object Tables20.6 Schema Evolution

Copyright (c) 2000 O'Reilly & Associates. All rights reserved.



Oracle PL/SQL Programming
Oracle PL/SQL Programming: Covers Versions Through Oracle Database 11g Release 2 (Animal Guide)
ISBN: 0596514468
EAN: 2147483647
Year: 2004
Pages: 234
Authors: Steven Feuerstein, Bill Pribyl
BUY ON AMAZON

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net