我为表CUSTOMER&创建了一个集群。采购。我已经完成了所有必要的步骤。 那么如何分配集群并查看集群表呢?
这是一个群集
SQL> create cluster cust_pur_cluster (cust_id integer);
这是群集的索引
SQL> create index cust_pur_idx on cluster cust_pur_cluster;
这是PURCHASE表定义& Asign cluster
SQL> create table purchase(bill_no integer primary key,
2 bill_no integer,
3 cust_id integer,
4 prod_name varchar(10) not null,
5 quanity integer not null,
6 rate_per_unit number(6,2),
7 cluster cust_pur_cluster(cust_id);
这是CUSTOMER表定义& Asign cluster
SQL>create table customer(
2 cust_id integer,
3 cust_name varchar(10),
4 cust_address varchar(50))
5 cluster cust_pur_cluster(cust_id);
表数据
TABLE: CUSTOMER
cust_id cust_name cust_address
------------------------------------
1 Esmael Jima
2 Munira Gera
3 Jemila1 Addis
4 Ahmed Agaro
5 Amina Agaro
TABLE: PURCHASE
bill_no cust_id prod_name quantity rate_per_unit
-------------------------------------------------------------
1001 1 soap 5 $10
1002 3 Omo 2 $15
1003 1 Perfume 1 $52
1004 2 Socks 3 $7
1005 1 Tooth Brush 2 $5