Databases Reference
In-Depth Information
Figure 2-2. Index decision flowchart
Note Sometimes people confuse the terms indexes and keys . An index is the underlying physical object
created in the database. Oracle uses indexes to enforce primary key and unique key constraints. The key
(constraint) is the business rule being enforced.
Creating B-tree Index on Primary Key Columns
A primary key constraint guarantees that values in a column (or combination of columns) can be used to
always uniquely identify a record within a table. There can be only one primary key constraint per table.
A primary key constraint can't contain null values. You can think of a primary key constraint as a
combination of unique and not null constraints. There are several good reasons to create a primary key
index for each table.
This enforces the business requirement that the primary key columns must be
unique within a table. Yes, in some cases you may have a table (like a logging
table) where you don't need a primary key, but for most situations a primary key is
required for each table.
 
Search WWH ::




Custom Search