Prev | Current Page 275 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"

Although KAREN_SHELL did not yet define any methods on
the ADDRESS_TY datatype, Oracle automatically creates constructor methods that are used to access
the data. Any object (such as PERSON_TY) that uses the ADDRESS_TY datatype uses the constructor
method associated with ADDRESS_TY.
156 Oracle Database 11g DBA Handbook
You cannot create public types, but as you saw earlier in this section, you can create public
synonyms for your types. This helps to alleviate solution to the problem of datatype management;
one solution would be to create all types using a single schema name and creating the
appropriate synonyms. The users who reference the type do not have to know the owner of the
types to use them effectively.
Indexing Abstract Datatype Attributes
In the preceding example, the CON_K_CUSTOMERS table was created based on a PERSON_TY
datatype and an ADDRESS_TY datatype. As shown in the following listing, the CON_K_CUSTOMERS
table contains a scalar (non-object-oriented) column??”Customer_ID??”and a Person column that is
defined by the PERSON_TY abstract datatype:
create table GEORGE_CUSTOMERS
(Customer_ID NUMBER,
Person PERSON_TY);
From the datatype definitions shown in the previous section of this chapter, you can see
that PERSON_TY has one column??”Name??”followed by an Address column defined by the
ADDRESS_TY datatype.
When referencing columns within the abstract datatypes during queries, updates, and
deletes, specify the full path to the datatype attributes.


Pages:
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287
wycieczki do Norwegii skarpetki narciarskie męskie zarządzanie sprzedażą online loan for bad credit remont warszawa