Explain types of tables in oracle

In Oracle, tables are the basic storage units. There are several types of database tables. Different types of tables have different characteristics.

Heap Organized Table:

The default table type in Oracle is heap table. If you use “create table” clause normally, you create a standard database table. Exp:

create table A
(
x char
);

Object Table

This type of table is created based on an object type and not collection of columns. It is usually used in special cases. The logic depends on object-oriented programming. “create table ” statement for object tables is:

create table test of x_type;

create or replace type atype
as object
(
a varchar2(30),
b date
)

Create table p of atype;

Index Organized Tables

Index Organized Tables have their primary key and non-key column data stored within the same B-Tree structure.

The data is stored within the primary key index.

Use:

IOTs make accessing data via the primary key quicker as the key and the data reside in the same structure.
Since there is no need to read an index, the table data is read in a separate structure.
Less duplication of the key columns in an index and table mean low storage requirements.

Hash clustered tables

Hash clusters provide a good facility for storage and retrieval.

In the case of a heap table, the rows are not sorted in a user-controlled manner.

Oracle hash cluster tables can improve random row access speed by foour times as the hash can get the row location far faster than index access.

Multiple table hash clusters store logically-related rows on a single data block due to which you can access a whole unit of data in a single physical I/O.

Nested tables

Nested table can be used to link the subordinate data items to the base table using the object ID (OID).

Oracle objects can be directly referenced by using pointers as opposed joining relational.

Objects in standard relational databases need to be reassembled every time it is used.

Index cluster tables

An index cluster uses an index to maintain row sequence.

A table cluster is a group of tables that share the same data blocks, since they share common columns and are often used together.

All rows for each table are stored in the same data blocks, When you create cluster tables are created.

The cluster key value is the value of the cluster key columns for a particular row.

Index cluster tables can be either multi-table or single-table

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值