Unit 3
Unit 3
Oracle Server:
• Is a database management system that provides an open,
comprehensive, integrated approach to information
management.
• Consists of an Oracle Instance and an Oracle database
Oracle in Industry
Database Instance:
• Instance –After the complete installation of Oracle 10g, when you start
the Oracle database , then you have what is referred to as an“Oracle
10g Database Instance”. It is the actual execution of DBMS software
that manages data in the databases tablespace.
Properties Of Database Instance
SGA
• Database Buffer Cache stores data values which are written later to the
data files by the database writer (DBWn).
• Redo Log Buffer stores a copy of the changed data from user
transaction. This data is periodically written to the Redo Log Files by the
Log Writer (LGWR).
• Large Pool is a work area given for backup and recovery operations.
• Java Pool stores the machine-language and execution plans for Java
commands used in application programs and database operations.
PGA Memory Areas
• Each server process has a PGA allocated that is a private area for each
server. This is the work area for each application. The application code,
along with copies of the data, is located here.
• There are various background processes that support and monitor the
server processes. These background processes also handle the data
management and keep the database running smooth and efficiently.
Processes
• Checkpoint (CKPT) :
-responsible for signaling DBWn and LGWR to write the contents of the
Database Buffer Cache and the Redo Log Cache to the data files and
Redo Log files respectively.
• Archiver (ARCn) :
-reads the Redo Log files after they are filled & copies it to a corresponding
Archive Log File.
• Recoverer (RECO) :
-detect and correct errors as a result of communications problems in a
distributed database environment.
File Structure- Three Basic Oracle Files
Parameter File
1
Control Files
id
en
tif
es i es
ifi
ent
id
Provides changes to
2 3
Data Files Redo Log Files
Parameter File – the init.ora file
• Purpose:
- specifies the configuration information about the database instance.
• Purpose:
-contain the actual data stored in the database.
-contains user data stored in tables + includes indexes, data dictionary.
• Characteristics:
1. Data files are composed of Oracle blocks, which are in turn composed
of operating system blocks
2. Oracle block sizes range from 2 Kb to 32 Kb – average size is 8 Kb
3. Data files belong to only one database and to only one tablespace
within that database
4. Data files are the lowest level of granularity between an Oracle
database and the operating system
5. Have a .dbf suffix
Redo Log Files
• Purpose:
- store changes made to the database as a result of transaction and internal
Oracle activities.
• Characteristics:
1. Every Oracle 10g database must have at least two redo log groups
2. Oracle 10g keeps track of the Redo Log file by using a redo log sequence
number, this number is recorded inside the file as they are used
3. Have a .log suffix
Data Structures
Database
Instance
Tablespaces
Tablespaces
Segments
Extents
Extents
Data
Blocks Data
Extents Blocks
Extents
Data
Blocks Data
Data Blocks
Blocks
TABLESPACE SEGMENT EXTENTS and DATA BLOCKS
• Tablespace is used to store related database objects. One tablespace is used to store
all of the system tables; another tablespace may be created for all indexes or a
tablespace may be created to store all of the tables for a specific application. The idea
is to store data that has something in common or has similar characteristics. The
database server stores the data in each tablespace in data files with .dbf extensions.
• Segments are used to organize tablespace data within a tablespace. A segment stores
an individual database object like a table or index.
• Extents are contiguous units of storage, usually disk space, within a segment. Oracle
uses extents for performance reasons by storing data that needs to be retrieved in a
single disk I/O. An extent is made up of multiple data blocks
• Data Blocks are the smallest unit of Oracle database storage. Oracle 10g stores 8,192
bytes (8K) in one data block. A data block contains header, directory and row data:
1.Block Header - operating system block address
2.Table Directory - identifies the database table for which the following data belongs
3.Row Directory - identifies the database rows for which the data belongs
4.Row Data - stores the actual row values