DAM Lecture#7
DAM Lecture#7
Architecture
Lecture#7
What is Oracle Database
• Oracle Database, also known as Oracle DB or Oracle
Relational Database Management System (RDBMS), is a
system that stores, organizes, and retrieves data by type
while maintaining relationships between all the various
types of data.
• Essentially, Oracle Database manages data retention,
organizes it for easy retrieval, and provides multiple users
with access to extensive amounts of data.
Oracle Database Architecture
The oracle database architecture consists of:
Instances:
An instance (a database instance) combines memory and
operating system processes in a running installation.
Database:
A database is a collection of files that hold data (data files,
temporary files, redo log files, and control files).
Basic Figure
Conti…
A fundamental difference is that numerous instances may mount and
open a database through Real Application Clusters (RAC). In contrast,
an instance may mount and open only one database (one set of files)
at any time.
The core distinctions between a database instance and an entire
running database include:
• An instance is shared memory and a set of background processes. In
contrast, a database is a stored collection of data.
• An instance can only mount and open one database. In contrast, a
database may be mounted and opened by one or more instances.
A breakdown of Oracle instance
architecture
Every running Oracle database is associated with one or many Oracle instances.
Since an instance exists in memory and a database exists on disk, the two can
live without one another. Let’s take a deeper dive into the architecture of an
instance.
The three primary parts of an instance include:
• System Global Area (SGA): a group of shared memory structures (available to
all processes) that contain data and control information for one database
instance. SGAs are allocated when the instance starts up and released when it
shuts down.
• Program Global Area (PGA): a private memory area (available to specific
processes) allocated to each session when the session starts and released
when the session ends.
Conti…
• Background Processes: are responsible for managing memory
structures individually.
• They handle the reception and transmission of information,
commonly referred to as performing input/output, which includes
writing data to disk files.
• Additionally, these processes undertake general maintenance duties
and monitor other Oracle Database processes to enhance
communication and ensure reliable performance.
Basic Architecture Figure
System Global Area (SGA)
The system’s global area (SGA) is a memory area that starts with one or
more background processes when an instance is created.
The SGA is responsible for:
• Caching data blocks read from a disk.
• Managing internal data structures that are accessed by multiple
processes and threads simultaneously.
• Storing Structured Query Language (SQL) implementation plans.
• Buffering and writing redo data to the online redo log files.
Conti…
• The Oracle processes share the SGA, including server
processes and background processes running on a single
computer. How Oracle processes are associated with the SGA
varies according to the operating system used.
• A database instance includes multiple processes
(background processes, server processes, and process
memory). Even when server processes cease, the instance
will continue to function.
Program Global Area (PGA)
The program global area (PGA) is a memory area that retains
data and controls information for a server process.
The PGA is responsible for:
• Processing SQL statements and holding logon and other
session data.
• Dedicated to SQL “work areas.” Work areas are active
memory areas for sorts and other SQL operations.
Primary background processes
Oracle has a collection of processes that are called background
processes.
These processes are responsible for managing memory,
performing I/O operations, and other maintenance activities.
Following are some important background processes that are
required:
Conti…
• System Monitor Process (SMON): These processes are responsible for
performing system-level recovery and maintenance activities.
• Process Monitor Process (PMON): The task of these processes is to monitor
other background processes.
• Database Writer Process (DBWR): This process performs the task of writing
data blocks from the Database Buffer Cache (present in SGA) to physical data
files(Present in the Database system).
• Log Writer Process (LGWR): This process writes the Redo blocks from Redo
Log Buffer (present in SGA) to Redo Log Files(present in the Database system).
• CheckPoint (CKPT): This process maintains data files and control files with the
most recent checkpoint information.
A breakdown of Oracle
Database architecture
An Oracle Database is a compilation of data that stores and
retrieves related information.
The database has logical structures and physical structures.
Because the physical and logical structures are separate, the
physical hub of data can be managed without affecting the
access to logical storage structures.
Physical storage structures
The physical storage structures are simply files that store data. When you
execute a [create database] statement to create a new database, Oracle
creates three files:
• Data files
Data files contain real data (sales orders and customer data). The data
of logical database structures, such as tables and indexes, are physically
stored in the data files.
• Control files
Control files contain metadata describing the physical structure
(database name and locations of data files). Every database will have a
control file.
Conti