Prev | Current Page 57 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"


There are, however, a few disadvantages to using an IOT. Some tables, such as tables for
logging events, may not need a primary key, or any keys for that matter; an IOT must have a
primary key. Also, IOTs cannot be a member of a cluster. Finally, an IOT might not be the best
solution for a table if there are a large number of columns in the table and many of the columns
are frequently accessed when table rows are retrieved.
Object Tables
Since Oracle8, the Oracle Database has supported many object-oriented features in the database.
User-defined types, along with any defined methods for these object types, can make an
implementation of an object-oriented (OO) development project in Oracle seamless.
Object tables have rows that are themselves objects, or instantiations of type definitions.
Rows in an object table can be referenced by object ID (OID), in contrast to a primary key in a
relational, or regular, table; however, object tables can still have both primary and unique keys,
just as relational tables do.
12 Oracle Database 11g DBA Handbook
Let??™s say, for example, that you are creating a Human Resources (HR) system from scratch, so
you have the flexibility to design the database from an entirely OO point of view. The first step is
to define an employee object, or type, by creating the type:
create type PERS_TYP as object
(Last_Name varchar2(45),
First_Name varchar2(30),
Middle_Initial char(1),
Surname varchar2(10),
SSN varchar2(15));
In this particular case, you??™re not creating any methods with the PERS_TYP object, but by
default Oracle creates a constructor method for the type that has the same name as the type itself
(in this case, PERS_TYP).


Pages:
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
drukarki fiskalne kraków willa karmazyn międzyzdroje www.books61.hobbitstory.com terapia magnetyczna Informacje o hostingu