0% found this document useful (0 votes)
15 views

Note 1

An Oracle database comprises at least one instance and data storage. The database stores data logically in tablespaces and physically in data files. The database management tracks storage with information in the SYSTEM tablespace. Oracle RAC allows multiple instances to attach to a central storage array for performance, scalability and redundancy.

Uploaded by

kuttu4466
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Note 1

An Oracle database comprises at least one instance and data storage. The database stores data logically in tablespaces and physically in data files. The database management tracks storage with information in the SYSTEM tablespace. Oracle RAC allows multiple instances to attach to a central storage array for performance, scalability and redundancy.

Uploaded by

kuttu4466
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Physical and logical structuring

An Oracle database comprises at least one instance, along with data storage. An instance
comprises a set of operating system processes and memory structures that interact with
the storage. Typical processes include PMON (the process monitor) and SMON (the
system monitor).

Users of Oracle databases refer to the server-side memory-structure as the SGA (System
Global Area). The SGA typically holds cache information such as data-buffers, SQL
commands and user information. In addition to storage, the database consists of online
redo logs (which hold transactional history). Processes can in turn archive the online redo
logs into archive logs (offline redo logs), which provide the basis (if necessary) for data
recovery and for some forms of data replication.

The Oracle RDBMS stores data logically in the form of tablespaces and physically in the
form of data files. Tablespaces can contain various types of segments, for example, Data
Segments, Index Segments etc. Segments in turn comprise one or more extents. Extents
comprise groups of contiguous data blocks. Data blocks form the basic units of data
storage. At the physical level, data-files comprise one or more data blocks, where the
blocksize can vary between data-files.

Oracle database management keeps track of its data storage with the help of information
stored in the SYSTEM tablespace. The SYSTEM tablespace contains the data dictionary —
and often (by default) indexes and clusters. (A data dictionary consists of a special
collection of tables that contains information about all user-objects in the database). Since
version 8i, the Oracle RDBMS also supports "locally managed" tablespaces which can
store space management information in bitmaps in their own headers rather than in the
SYSTEM tablespace (as happens with the default "dictionary-managed" tablespaces).

If the Oracle database administrator has instituted Oracle RAC (Real Application
Clusters), then multiple instances, usually on different servers, attach to a central storage
array. This scenario offers numerous advantages, most importantly performance,
scalability and redundancy. However, support becomes more complex, and many sites do
not use RAC. In version 10g, grid computing has introduced shared resources where an
instance can use (for example) CPU resources from another node (computer) in the grid.

The Oracle DBMS can store and execute stored procedures and functions within itself.
PL/SQL (Oracle Corporation's proprietary procedural extension to SQL), or the object-
oriented language Java can invoke such code objects and/or provide the programming
structures for writing them.

Schemas

Oracle database conventions refer to defined groups of ownership (generally associated


with a "username") as schemas.
Most Oracle database installations traditionally come with a default schema called SCOTT.
After the installation process has set up the sample tables, the user can log into the
database with the username scott and the password tiger. (The name of the SCOTT
schema originated with Bruce Scott, one of the first employees at Oracle (then Software
Development Laboratories), who had a cat named Tiger.)

Other default schemas include:

 SYS (essential core database structures and utilities)


 SYSTEM (additional core database structures and utilities, and privileged account)
 OUTLN (utilized to store metadata for stored outlines for query optimizer plan
stability.
 BI, IX, HR, OE, PM, and SH (expanded sample schemas containing more data and
structures than the older SCOTT schema)

Tablespaces

Default tablespaces include:

 SYSTEM (essential core database structures and utilities)


 SYSAUX (extra/extended data to supplement the SYSTEM schema)
 TEMP (temporary tablespace)
 UNDOTBS1 (undo tablespace)
 USERS (default users tablespace created by the Database Configuration Assistant -
but replaceable by the DBA)
 SYSTEM

Memory architecture

System Global Area

Each Oracle instance uses a "System Global Area" or "SGA" — a "shared memory area"
— to store its data and control information.

Each Oracle instance allocates itself an SGA when it starts and de-allocates it at shut-
down time. The information in the SGA consists of the following elements, each of
which has a fixed size, established at instance startup:

 The database buffer cache: this stores the most recently used data blocks. These
blocks can contain modified data not yet written to disk (sometimes known as
dirty blocks), unmodified blocks, or blocks written to disk since modification
(sometimes known as clean blocks). Because the buffer cache keeps blocks based
on a most-recently-used algorithm, the most active buffers stay in memory to
reduce I/O and to improve performance.
 The redo log buffer: this stores redo entries — a log of changes made to the
database. The instance writes redo log buffers to the redo log as quickly and
efficiently as possible. The redo log aids in instance recovery in the event of a
system failure.

 The shared pool: this area of the SGA stores shared-memory structures such as
shared SQL areas in the library cache and internal information in the data
dictionary. An insufficient amount of memory allocated to the shared pool can
cause performance degradation. The shared pool consists of the library cache and
the data-dictionary cache.

Library cache

The library cache stores shared SQL, caching the parse tree and the execution plan for
every unique SQL statement.

If multiple applications issue the same SQL statement, each application can access the
shared SQL area: this reduces the amount of memory needed and reduces the processing-
time used for parsing and execution planning.

Data-dictionary cache

The data dictionary comprises a set of tables and views that map the structure of the
database.

Oracle stores information here about the logical and physical structure of the database.
The data dictionary contains information such as the following:

 User-information, such as user-privileges

 Integrity constraints defined for tables in the database

 Names and data-types of all columns in database tables

 Information on space allocated and used for schema objects

The Oracle instance frequently accesses the data dictionary in order to parse SQL
statements. The operation of Oracle depends on ready access to the data dictionary:
performance bottlenecks in the data dictionary affect all Oracle users. Because of this,
database administrators should make sure that the data-dictionary cache has sufficient
capacity to cache this data. Without enough memory for the data-dictionary cache, users
see a severe performance-degradation. Allocating sufficient memory to the shared pool
where the data-dictionary cache resides precludes these particular performance-problems.

Program Global Area


The Program Global Area or PGA memory area contains data and control information for
the Oracle server processes.

The size and content of the PGA depends on the Oracle server options installed. This area
consists of the following components:

 Stack space: the memory that holds the session's variables, arrays, and so on.

 Session information: unless using the multithreaded server, the instance stores its
session information in the PGA. (In a multithreaded server, the session
information goes in the SGA.)

 Private SQL area: an area in the PGA holding information such as bind-variables
and runtime buffers.

You might also like