|Lesson 3||Partitioning Object Tables|
|Objective||Define how to Partition an Object Table. |
Partitioning Object Tables
Oracle has the ability to partition object tables.
Just like partitioning relational tables, you must define a column or list of columns in the object table that defines the division points for each partition. The column has to be a standard Oracle data type, such as NUMBER or VARCHAR2.
The following Slide Show illustrates how to partition an object table.
Partitioned Object Table
Let us look at another example where you use a subtype attribute for partitioning. In this case, you must base your partitioning on a subtype column rather than a column in the table's object type. The syntax is only slightly different: you must identify the table column and the subtype column in the
PARTITION BY RANGE clause.
CREATE TABLE PARTITIONED_CUSTOMER
TABLESPACE USERS PCTFREE 20
PARTITION BY RANGE (FULL_ADDRESS.CITY)
(PARTITION NAME_A_F VALUES LESS THAN ('G'),
PARTITION NAME_G_P VALUES LESS THAN ('Q'),
PARTITION NAME_Q_Z VALUES LESS THAN
This example uses the object types found in the Course Project and shows how to specify the CITY subtype column in the
PARTITION BY RANGE clause. The next lesson covers how to partition a table with LOBs.
Create Partitioned Table Object