Explain types of tables in oracle
2012-07-02 22:41
281 查看
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
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
相关文章推荐
- java call oracle procudure setBoolean问题PLS-00306: wrong number or types of arguments in call to
- How to reduce number of records on CTXSYS.DR$WAITING,CTXSYS.DR$PENDING tables in Oracle EBS?
- SQL Server 游标运用:查看一个数据库所有表大小信息(Sizes of All Tables in a Database)
- Oracle 11G数据库报错 :ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
- In Oracle 11g, how to change the order of the results of a sql without “order by”?(转)
- Oracle实例错误——listener does not currently know of SID given in connect descriptor
- Oracle - ORA-12505, TNS:listener does not currently know of SID given in connect descriptor 解决
- 184 You are in the process of creating a Virtual Private Catalog (VPC) in your Oracle Database 11g d
- An Example of Pre-Query and Post-Query Triggers in Oracle Forms With Using Display_Item to Highlight Dynamically
- two or more data types in declaration of `函数名'的报错
- In-depth analysis of Oracle memory
- Oracle - ORA-12505, TNS:listener does not currently know of SID given in connect descriptor 解决
- Number of Types in the .NET Framework(转)
- Creating and Using Temporary Tables in Oracle
- Win A Free Copy of Packt’s Managing Multimedia and Unstructured Data in the Oracle Database e-book
- Sizes of All Tables in All Database
- error: two or more data types in declaration of 'main'
- Oracle中"listener does not currently know of SID given in connect descriptor"
- Oracle内置数据类型(Built-in Data Types)
- navicat 连接 oracle 的时出现:ORA-12505, TNS:listener does not currently know of SID given in connect descr