Oracle Database Tables and Types

 Oracle Database Tables and Types

Tables are the basic fundamentals of databases. table which stores data in it. mainly 2 types of tables:
  1. Heap Organized
  2. Index Organized
 by default, all tables in Oracle are heap-organized tables. it means Oracle inserts a new row when it gets new data. a new row is inserted every time. Index organized means, everything goes to the correct place. insert may be costly but the selection is easy. 

Why Use Index Organized Tables

Accessing data via the primary key is quicker as the key and the data reside in the same structure. There is no need to read an index and then read the table data in a separate structure. 
The lack of duplication of the key columns in an index and table means the total storage requirements are reduced.

Creation Of Index Organized Tables

  To create an index-organized table you must:
  • Specify the primary key using a column or table constraint. 
  • Use the ORGANIZATION INDEX.


Disadvantage:

  1.  You must have a primary key on the table with a unique value. 
  2.  You cannot have any other indexes on the data. 
  3.  You cannot partition an index-organized table.

Post a Comment

0 Comments