Logical Database Structures

In addition to the physical files used by the database, Oracle maintains many types of logical structures. Some of the most important are summarized here:

Tablespaces

The basic storage allocation in an Oracle database is a tablespace. Each tablespace is composed of one or more physical (operating system) files. Every database is created with the SYSTEM tablespace. Other tablespaces are created by the DBA. Note, however, that if you allow the Oracle Installer to create a database automatically, it will create additional tablespaces (see Chapter 2).

Schemas

In Oracle, a schema is essentially the same as an account or a username. Each object in the database is owned by a schema. Every Oracle database is created with two initial schemas: SYS, which is used to store the data dictionary, and SYSTEM, which often stores some data dictionary extensions as well as critical tables for other tools. Other schemas are created by the DBA. Each schema can be granted quotas in any tablespace. There is no necessary relationship between a schema and a tablespace.

Segments

Each object that takes up space is created as one or more segments. Each segment can be in one and only one tablespace.

Extents

Each segment is composed of one or more extents. An extent is a contiguous allocation of space within a datafile of a tablespace. At the time a segment is created, you can specify the size of the initial and next extents, as well as the minimum and maximum number of extents.

Rollback segments

Every time you update a table, Oracle writes the old value into the rollback segment, which allows other users to maintain a consistent read on the table. It also allows Oracle to restore the contents of the table in the event that you do not commit the change.

Temporary segments

Temporary segments are used by Oracle during table and index creation and for sorting, as well as for temporary storage required for other operations, such as hash joins.

Tables

All data in a database is stored in a table. Data includes not only the user data, but also the contents of the data dictionary.

Indexes

Indexes are used both to facilitate the quick retrieval of data from the table and to enforce the uniqueness of column values. Indexes are stored in separate segments from the table data, except for Oracle8 index-organized tables, which are actually indexes that contain all the data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset