Prev | Current Page 58 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"

To create an object table as a collection of PERS_TYP objects, you can
use the familiar create table syntax, as follows:
create table pers of pers_typ;
To add an instance of an object to the object table, you can specify the constructor method in
the insert command:
insert into pers
values(pers_typ('Graber','Martha','E','Ms.','123-45-6789'));
As of Oracle Database 10g, you do not need the constructor if the table consists of instances
of a single object; here is the simplified syntax:
insert into pers values('Graber','Martha','E','Ms.','123-45-6789');
References to instances of the PERS_TYP object can be stored in other tables as REF objects,
and you can retrieve data from the PERS table without a direct reference to the PERS table itself.
More examples of how you can use objects to implement an object-oriented design project
can be found in Chapter 5.
External Tables
External tables were introduced in Oracle9i. In a nutshell, external tables allow a user to access
a data source, such as a text file, as if it were a table in the database. The metadata for the table
is stored within the Oracle data dictionary, but the contents of the table are stored externally.
The definition for an external table contains two parts. The first and most familiar part is the
definition of the table from the database user??™s point of view. This definition looks like any typical
definition that you??™d see in a create table statement.


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