0% found this document useful (0 votes)
8 views15 pages

Oracle Introduction Overview Module1

The document provides an overview of Oracle Database, detailing its definition, features, architecture, and various editions. It explains the transition from flat file structures to relational databases, highlighting the advantages of Oracle Database as an RDBMS, including its ACID compliance and support for various operating systems. Additionally, it describes the physical and logical storage structures, database instances, and key background processes that maintain database operations.

Uploaded by

Owili Marvin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views15 pages

Oracle Introduction Overview Module1

The document provides an overview of Oracle Database, detailing its definition, features, architecture, and various editions. It explains the transition from flat file structures to relational databases, highlighting the advantages of Oracle Database as an RDBMS, including its ACID compliance and support for various operating systems. Additionally, it describes the physical and logical storage structures, database instances, and key background processes that maintain database operations.

Uploaded by

Owili Marvin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Module One

Database Implementation:
Oracle Platform
Overview of:
 Oracle Database
 Oracle Architecture

1
1.0 What Is Oracle Database
What is a database? A database is an organized collection of structured data stored
electronically in a computer system. When the computer was first invented, it was
mainly used for scientific researches to perform calculations quickly.
Since the computer was adopted more and more, the requirements were also
increased to require the computer to store a larger volume of data for fast retrieval.
Before the database system was invented, the flat file structure was commonly
used to store data. For example, here is the comma-separated value (CSV) file that
stores employee information:
first name, last name, phone
John, Doe, (408)-245-2345
Jane, Doe, (503)-234-2355
...
The CSV file has three columns which are known as fields and rows which are known
as records. When the number of rows in the flat file is increased e.g., million rows, it
becomes unmanageable. For example:

Each employee may have one or more contacts, you can create a contact entity and
relate the employee entity to the contacts entity through a relationship called one-
to-many.

By the way, we often refer to the entities as tables, records as rows, and fields as
columns.

2
The relational model is better than the flat file model because it removes the
duplicate data e.g. if you put employee and contact information on the same file.
The employee, who has more than one contact, will appear in multiple rows.
The Relational Database Management System, or RDBMS in short, manages
relational data. Oracle Database is an RDBMS with the largest market share.
Besides the Oracle Database, there are other RDBMS products available. Here are
some notable ones:
 Db2 from IBM.
 SQL Server from Microsoft.
 MySQL – the most popular open-source database, also from Oracle.
 PostgreSQL – the most advanced open source database.
What is MySQL?
MySQL is an open-source, cross-platform relational database management system
used for web database, e-commerce, data warehousing and logging applications. It
stores data using tables and maintains integrity.
S.NO. Oracle MySQL

Oracle is a relational and database management MySQl is a relational database management


system generally used for handling enterprise system used for web database, e-commerce,
1. grid computing, and hybrid database workloads. data warehousing and logging applications.

2. Oracle is commercial. MySQL is Open Source.

AIX, Linux, HP-UX, OS X, Windows, and


z/OS are the Server working frameworks for FreeBSD, OS X, Linux, Solaris, Windows are
3. Oracle. the Server working frameworks for MySQL.

It is used for both small-scale and big-scale


4. It is used for very extensive interaction. businesses.

5. It supports SQL. It also sustains SQL.

6. It does not sustain the null value. MySQL sustains the null value.

It can function with both dynamic and static


7. systems. It can function only with static systems.

8. Oracle supports XML. MY SQL does not support XML.

It supports both SQL and PL/SQL as a


9. language. It supports only SQL as a language.

10. It sustains data partitioning. It does not support data partitioning.

1.1 Oracle Database features


3
Oracle Database allows you to quickly and safely store and retrieve data. Here are
the integration benefits of the Oracle Database:
 Oracle Database is cross-platform. It can run on various hardware across
operating systems including Windows Server, UNIX, and various distributions
of GNU/Linux.
 Oracle Database has its networking stack that allows application from a
different platform to communicate with the Oracle Database smoothly. For
example, applications running on Windows can connect to the Oracle
Database running on UNIX.
 ACID-compliant – Oracle is ACID-compliant Database that helps maintain data
integrity and reliability.
ACID Properties: The essential characteristic of transaction processing
systems:
o Atomicity: All changes that a transaction makes to a database are
made permanent, or else are nullified.
o Consistency: A successful transaction transforms a database from a
previous valid state to a new valid state.
o Isolation: Changes that a transaction makes to a database are not
visible to other operations until the transaction completes its work.
o Durability: Changes that a transaction makes to a database survive
future system or media failures.
 Commitment to open technologies – Oracle is one of the first Database that
supported GNU/Linux in the late 1990s before GNU/Linux become a
commerce product. It has been supporting this open platform since then.
 Flashback Technology: This advantage comes with the recent Oracle version.
It allows us to recover those data that are incorrectly deleted or lost by
human errors like accidental deletion of valuable data, deleting the wrong
data, or dropping the table.
Oracle Database has several structural features that make it popular:
 Logical data structure – Oracle uses the logical data structure to store data so
that you can interact with the database without knowing where the data is
stored physically.
 Partitioning – is a high-performance feature that allows you to divide a large
table into different pieces and store each piece across storage devices.
 Memory caching – the memory caching architecture allows you to scale up a
very large database that still can perform at a high speed.
 Data Dictionary is a set of internal tables and views that support administer
Oracle Database more effectively.
 Backup and recovery – ensure the integrity of the data in case of system
failure. Oracle includes a powerful tool called Recovery Manager (RMAN) –
allows DBA to perform cold, hot, and incremental database backups and
point-in-time recoveries.
 Clustering – Oracle Real Application Clusters (RAC) – Oracle enables high
availability that enables the system is up and running without interruption of
services in case one or more server in a cluster fails.
1.2 Oracle Database Editions
Oracle provides three main editions of Oracle Databases as follows:

4
1) Enterprise Edition (EE) is the common and expensive edition of the Oracle
Database. It has the following characteristics:
 No maximum number of CPUs
 No limits on memory or database size
 Include premium features that are not available in other editions.
2) Standard Edition (SE) is a limited edition of the Enterprise Edition that has the
following characteristics:
 Limited to four or fewer CPUs
 No limit on memory or database size
 Include many features, but not as many as EE
3) Expression Edition (XE) is a free-to-use version of the Oracle Database that is
available on both Windows and GNU/Linux platforms. These are the features of
Oracle Database XE 18c:
 Limited to 2 CPUs
 Can use the maximum of 2GB of RAM, and has 12GB of user data.
 Very limited features
1.3 Oracle Database Architecture
The focus is on the Oracle Database architecture and its components. The Oracle
Database architecture consists of two major components- Oracle database and
Oracle instance.
Database and Instance
An Oracle Database consists of a database and at least one instance.
An instance, or database instance, is the combination
of memory and processes that are a part of a running installation and a database
is a set of files that store data.
The following picture illustrates the Oracle Database server architecture.

Sometimes, a database instance is referred to as an entire running database.


However, it is important to understand the distinctions between the two.
Steps to Access Oracle Database

5
 First, you can start a database instance without having it access any
database files. This is how you create a database, starting an instance first
and creating the database from within the instance.
 Second, an instance can access only one database at a time. When you start
an instance, the next step is to mount that instance to a database. An
instance can mount only one database at a single point in time.
 Third, multiple database instances can access the same database. In a
clustering environment, many instances on several servers can access a
central database to enable high availability and scalability.
 Finally, a database can exist without an instance. However, it would be
unusable because it is just a set of files.
1.3.1 Oracle Database
One of the essential tasks of the Oracle Database is to store data. The following
section briefly describes the physical and logical storage structure of an Oracle
Database.
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 the
following files; the three physical file structures that comprise an Oracle database
are:
 Data files/Database files — a file that contains the database information,
including both system and application data. Data files contain real data, e.g.,
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: A small administrative file that is used by the Oracle database.
Every database has a control file that contains metadata. The metadata
describes the physical structure of the database including the database name
and the locations of data files.
 Online redo log files: every database has an online redo log that consists of
two or more online redo log files. An online redo log is made up of redo
entries that record all changes made to the data.
Besides these files, an Oracle database includes other important files such as
parameter files, network files, backup files, and archived redo log files for backup
and recovery. The arrangement of data files is given below.

6
Logical Storage Structures
Oracle Database uses a logical storage structure for fine-grained control of disk
space usage. The following are logical storage structures in an Oracle Database:
 Data blocks: a data block corresponds to a number of bytes on the disk.
Oracle stores data in data blocks. Data blocks are also referred to as logical
blocks, Oracle blocks, or pages.
 Extents: An extent is a specific number of logically contiguous data blocks
used to store a particular type of information.
 Segments: a segment is a set of extents allocated for storing database
objects, e.g., a table or an index.
 Tablespaces: a database is divided into logical storage units
called tablespaces. A tablespace is a logical container for a segment. Each
tablespace consists of at least one data file.
The following picture illustrates segments, extents, and data blocks within a
tablespace:

7
And the next figure shows the relationship between logical and physical storage
structures:

Database Instance
A Database Instance is an interface between client applications (users) and the
database. An Oracle instance consists of three main parts: System Global Area
(SGA), Program Global Area (PGA), and background processes.

8
The SGA is a shared memory structure allocated when the instance started up and
is released when it is shut down. The SGA is a group of shared memory structures
that contain data and control information for one database instance.
Aside from the SGA, which is available to all processes, PGA is a private memory
area allocated to each session when the session starts and released when the
session ends.
1.3.2 Background Processes
In an Oracle database, "background processes" are automated tasks that run in the
background to maintain data consistency, manage disk operations, and handle
critical database functions, including processes like: Database Writer (DBWn), Log
Writer (LGWR), Checkpoint (CKPT), System Monitor (SMON), Process Monitor
(PMON), Archiver (ARCn), and Recoverer (RECO).
Major Oracle Database’s background processes
The following are the major background processes of an Oracle instance:
 PMON is the process monitor that regulates all other processes. PMON cleans
up abnormally connected database connections and automatically registers a
database instance with the listener process. PMON is a process that must be
alive in an Oracle database.
o The PMON (Process Monitory) background process performs 'cleanup
duties' when a user process fails with an error condition. PMON cleans
up the cache, releases locks, and other miscellaneous tasks.

 SMON is the system monitor process that performs system-level clean-up


operations. It has two primary responsibilities including automatic instance
recovery in the event of a failed instance, e.g., power failure and cleaning up
of temporary files.
 DBWn is the database writer. Oracle performs every operation in memory
instead of the disk because processing in memory is faster and more efficient
than on disk. The DBWn process reads data from the disk and writes it back

9
to the disk. An Oracle instance has many database writers DBW0, DBW1,
DBW2, and so on.
 CKPT is the checkpoint process. In Oracle, data that is on disk is called a
block and the data in memory is called buffer. When a block is written to the
buffer and changed, the buffer becomes dirty, and it needs to be written
down on the disk. The CKPT process updates the control and data file headers
with checkpoint information and signals writing of dirty buffers to disk. Note
that Oracle 12c allows both full and incremental checkpoints.

 LGWR is the log writer process which is the key to the recoverability
architecture. Every change that occurs in the database is written out to a file
called redo log for recovery purposes. These changes are written and logged
by the LGWR process. The LGWR process first writes the changes to memory
and then disk as redo logs which then can be used for recovery.
 ARCn is the archiver process that copies the content of redo logs to archive
redo log files. The archiver process can have multiple processes such as
ARC0, ARC1, and ARC3, which allow the archiver to write to various
destinations such as D: drive, E drive, or other storage.
 MMON is the manageability monitoring process that gathers performance
metrics.
 MMAN is the memory manager that automatically manages memory in an
Oracle database.
 LREG is the listener registration process that registers information on the
database instance and dispatcher processes with the Oracle Net Listener.
Now, you should have a good overview of the Oracle Database architecture and its
components.
Oracle parameter files
An Oracle parameter file contains all of the configuration parameters for an Oracle

10
instance. These parameters can be set to different values to tailor the Oracle
instance to the system's operating configuration as well as to the needs of the
individual application or applications contained in the Oracle database. The
parameter file specifications affect both memory and process settings of the
associated Oracle instance.
 Data files associated with oracle table spaces include:
o System data files — these contain the contents of the system table
space. The system table space consists of the data dictionary, and the
names and locations of all the tablespaces, tables, indexes, triggers,
procedures, and clusters for the database.

o Application data files and default data files are physical database
structures. These files hold user data that is accessed by clients in the
course of normal database operation. The difference between default
and application data files is that the default table space/data file
combinations used when an explicit specification is not made.

o Temporary files — these contain temporary data that is used by


queries and sorts. Regardless of their name, temporary data files are
actually permanent files created to provide a transient work area for
Oracle to sort and join tables and to execute complex SQL.

o Oracle rollback files — these contain information related to the rolling


back of uncommitted data during error processing.
 Redo log files that record changes made to data. Every Oracle database has
at least one set of two or more redo log files. These files record changes
made to data and are used in recovery circumstances to prevent lost or
damaged data.

 The config.ora file is associated with the Oracle client, not the server. It
specifies certain defaults, file and directory names for the client portion of the
Oracle environment.
1.4 Oracle memory structures (in detail)
Oracle utilizes specific memory structures to perform DBMS-related tasks. These
memory structures are contained in the main memory (RAM) of the computer
running the Oracle instance.
The basic memory structures for an Oracle instance are the SGA (System Global
Area), PGA (Program Global Area), and Oracle Sort Area.

11
The SGA is a group of shared memory structures allocated by the Oracle instance to
contain data and control information. The SGA is automatically allocated when the
instance is started and deallocated when the instance is shut down. If more than
one user is connected to a multiple-process database, the information in the SGA is
shared among the different users.

The SGA contains the following components:


Database buffer cache — a staging area for database reads and writes, this
cache holds the most recently used data blocks.

Redo log buffer — a staging area for redo log entries, similar to the database
buffer cache.

Shared pool — an area of memory set aside for the parsing and processing of SQL
statements (shared SQL area), staging of Data Dictionary reads and writes (Data
Dictionary cache), and, if the Oracle configuration is multithreaded, binding
information and run-time buffers (private SQL area).
The PGA contains the following:
The PGA is a memory structure containing information for both user and
background processes. Each process has its own PGA. The contents of the PGA vary
depending on the type of process (user or background) and Oracle configuration
(multithreaded server or conventional server).
Every time a user process requests a sort to be performed a special memory
structure is allocated called an Oracle sort area. The sort area exists in the memory
of the user process that is requesting the sort. User processes typically perform
sorting when query result sets are ordered or grouped.

1.5 Oracle processes


Oracle processes are the true workhorses of the Oracle instance. Each process is
composed of a series of tasks. Also, each process has its own internal memory

12
allocated to it (the PGA). This memory allocation allows the process to perform the
internal processing required to carry out its designated function.
Oracle has two general types of processes: user processes and Oracle
processes.
 A user process is created to execute the program code of an application
program.
 An Oracle process is called by another process to perform certain, specific
functions on behalf of the invoking process.
Oracle processes can be further broken down into server processes and background
processes:
 Server processes are created to interact between the user processes and the
Oracle instance. The server process communicates with the user process and
acts as a 'relay' between the user process and SGA information.

 Background processes perform designated functions that would otherwise


have to be performed by each user process that interacts with the Oracle
instance. This specialization of functions is much more efficient that if each
user process was required to perform a variety of tasks. Oracle uses the
following background processes:
1.6 Oracle configurations
Oracle Database Server Configurations: There are many configuration options
available for the Oracle Server such as single instance, Multi Single-Instance
Database, and Oracle RAC (Real Application Cluster).
1. Single Instance Database:
In this configuration, we have the server machine and inside the server machine, we
have a database instance and the database. The relation is one to one. I have one
oracle database and one database instance. That means the Server machine
consists of a single database and a single instance. See diagram below;

2. Multi Single-Instance Database on Same Server:


The server machine consists of many single instance databases with single
instances. For example, I have a server machine with two instances and two
databases. Also, the relationship between them is one-to-one. But here I have two
databases on the same server. See diagram.

13
Why use multiple single-instance databases on one server?
 Isolation: Separating data and access controls between different
applications or departments can be achieved by having distinct databases on
the same server.
 Cost Efficiency: Instead of buying separate servers for each database, you
can leverage the capacity of a single server to host multiple smaller
databases.
 Centralized Management: Managing multiple databases on one server can
be easier than managing them across different machines.
Considerations when using this approach:
 Performance Impact: Heavy load on one database can potentially
affect the performance of other databases on the same server due to
shared hardware resources.
 Configuration Management: Each database instance needs to be
configured properly with appropriate memory allocation, network settings,
and security policies.
 Backup and Recovery: Backup and recovery strategies need to be
designed to handle multiple databases on a single server.

3. Oracle RAC (Real Application Cluster):


In this configuration, there is a single database and many instances accessing the
database. This configuration provides high availability, high scalability, and high
performance. In this case, the database is hosted on one server and the instances
accessing the database are from a different server. For a better understanding, see
diagram below.

14
15

You might also like