In this section, we will review the many different types of tables in the Oracle database and
how they can satisfy most every data-storage need for an organization. You can find more details
on how to choose between these types of tables for a particular application, and how to manage
them, in Chapter 5 and Chapter 8.
Chapter 1: Getting Started with the Oracle Architecture 9
Relational Tables
A relational table is the most common type of table in a database. A relational table is heaporganized;
in other words, the rows in the table are stored in no particular order. In the create
table command, you can specify the clause organization heap to define a heap-organized table,
but because this is the default, the clause can be omitted.
Each row of a table contains one or more columns; each column has a datatype and a length.
As of Oracle version 8, a column may also contain a user-defined object type, a nested table, or a
VARRAY. In addition, a table can be defined as an object table. We will review object tables and
objects later in this section.
The built-in Oracle datatypes are presented in Table 1-1.
Oracle also supports ANSI-compatible datatypes; the mapping between the ANSI datatypes
and Oracle datatypes is provided in Table 1-2.
Oracle Built-in Datatype Description
VARCHAR2 (size) [BYTE | CHAR] A variable-length character string with a maximum length of 4000 bytes,
minimum of 1 byte. CHAR indicates that character semantics are used to
size the string; BYTE indicates that byte semantics are used.
Pages:
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64