Oracle Database 12c Architecture
Oracle Database 12c Architecture
Oracle Database 12c Architecture
RDBMS
• Relational database
management system
(RDBMS)
• Most Common
• Different RDBMS have
different architecture
• Basic storage of data in
RDBMS is a table.
Relations are
implemented in tables,
where data is stored in
rows and columns.
Oracle Database 12c Objects
Object Type Description
Table Basic form of data storage. A table has columns and stores rows of
data.
View A stored query. No data-storage space is occupied for view data.
Index An optional structure that is useful for fetching data faster.
Materialized view Used to summarize and store data. They are similar to views but take
up storage space to store data
Index-organized Stores the table data along with the index, instead of storing table and
table index separately
Cluster A group of tables sharing a common column. The cluster stores the
rows of the tables together with the common columns stored once.
Constraint A stored rule to enforce data integrity.
Sequence A sequence provides a mechanism for the continuous
generation of numbers.
Synonym Alias for a database schema object
Oracle Database 12c Objects
Object Type Description
Trigger A PL/SQL program unit that is executed
when an event occurs.
Stored function A PL/SQL programs that can be used to create user-defined functions
to return a value.
Stored procedure A PL/SQL programs to define a business process
Package A collection of procedures, functions, and other program constructs.
Use SQL to create database objects and to interact with application data
Interacting with Oracle Database 12c
• SQL is the language used to interact with
Oracle Database 12c. common tools for DBA
to administer Oracle Database 12c :
– SQL*Plus command-line interface utility
– SQL Developer : a GUI tool to explore and
manage the database using predefined menu
actions and SQL statements
– Oracle Enterprise Manager Database Express 12c,
a GUI tool for database administration
– Oracle Grid Control
Interacting with Oracle Database 12c
• SQL*Plus is the primary tool for an Oracle DBA
to administer the database using SQL
commands.
• You can run SQL statements, you must connect
to Oracle Database 12c.
• Start SQL*Plus from a Windows command
prompt using SQLPLUS.EXE
$ORACLE_HOME/bin/sqlplus executable on the
Unix/Linux platform.
• connecting to SQL*Plus from a Linux workstation
-
SQL*Plus
• SQL*Plus is the
primary tool for an
Oracle DBA to
administer the
database using
SQLcommands.
• For Developer
Provides powerful editors for working with SQL, PL/SQL, Stored Java Procedures, and XML. Run
queries, generate execution plans, export data to the desired format (XML, Excel, HTML, PDF,
etc.), execute, debug, test, and document your database programs, and much more with SQL
Developer.
• For DBA
Provided database administrators a set of interfaces for their most critical tasks :
– Recovery Manager (RMAN)
– Oracle Auditing
– User and Role management
– Storage management
– Resource Manager
– Diagnostic Pack features
Import Models
Data Type
Domains
ERD DFD
Logical Multidimensional
Reporting
Database Design
• The main difference is that users are the entities that perform work, and
schemas are the collections of objects on which users perform work.
Oracle Database Storage Structures
• RDBMS is the independence of logical data structures such as
tables, views, and indexes from physical storage structures.
• physical and logical structures are separate, you can manage
physical storage of data without affecting access to logical
structures.
– EX : renaming a database file does not rename the tables
stored in it.
Physical Storage Structures
• An Oracle database is a set of files that store Oracle data in persistent disk storage.
• A data file is a physical file on disk that was created by Oracle DB and contains data structures such as tables and
indexes.
• A temp file is a data file that belongs to a temporary tablespace.
• DB writes data to these files in an Oracle proprietary.
• Control files
• A root file that tracks the physical components of the database. information required to recover DB including
checkpoints (SCN) .
• Online redo log files
– Set of files containing records of changes made to data.
• A database instance is a set of memory structures that manage database files.
Logical Storage Structures
• Oracle Database allocates logical space
for all data in database.
• Logical units of database space allocation
are data blocks, extents, segments, and
tablespaces.
• At a physical level, the data is stored in
data files on disk.
• The data in the data files is stored in
operating system blocks.
• Figure 12-1 is an entity-relationship
Relationships of
diagram for physical and logical storage. logical storage
The objects and
physical
• crow's foot notation represents a one-to- storage
many relationship..
Logical Storage Hierarchy
• At the finest level of granularity, Oracle DB stores data in data blocks.
• One Logical data block corresponds to a specific number of bytes of physical disk space, for example, 2 KB.
• Data blocks are the smallest units of storage that Oracle Database can use or allocate.
• An extent is a set of logically contiguous data blocks allocated for storing a specific type of information Ex :the 24
KB extent has 12 data blocks, while the 72 KB extent has 36 data blocks.
• A segment is a set of extents allocated for a specific database object, such as a table. Ex : Data for the employees
table is stored in its own data segment, whereas each index for employees is stored in its own index segment.
• Every database object that consumes storage consists of a single segment.
• Each segment belongs to one and only one tablespace. Thus, all extents for a segment are stored in the same
tablespace.
• Within a tablespace, a segment can include extents from multiple data files
Overview of Data Files
• Each tablespace consists of one
or more data files .
• The data for a database is
collectively stored in the data
files .
• A segment can span one or
more data files, but it cannot
span multiple tablespaces.
• A database must have the
SYSTEM and SYSAUX
tablespaces.
• SYSTEM tablespace contains
the data dictionary, a set of
tables that contains database
metadata.
• Database also has an undo
tablespace and a temporary
tablespace (TEMP).
Data Files Structure
• The data file header contains metadata about the data file such as its size and checkpoint SCN.
• Each header contains an absolute file number, which uniquely identifies the data file within the
database, and a relative file number, which uniquely identifies a data file within a tablespace.
• When Oracle Database first creates a data file, the allocated disk space is formatted but contains
no user data. However, the database reserves the space to hold the data for future segments of
the associated tablespace.
• As the data grows in a tablespace, Oracle Database uses the free space in the data files to allocate
extents for segment .
Online Redo Log Switches
• log writer is the background
process responsible for writing
transaction information from redo
log buffer (in the SGA) to the Reuse of Online
Redo Log Files
online redo log files (on disk).
• Log writer flushes the contents of
the redo log buffer when any of
thefollowing are true:
– A COMMIT is issued. Multiple Copies of
(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=tcp)))
Connections and Sessions
• A database connection is a physical communication pathway between
a client process and a database instance.
• A database session is a logical entity in the database instance memory
that represents the state of a current user login to a database.
• session lasts from the time the user is authenticated by the database
until the time the user disconnects or exits the database application.
• A single connection can have 0, 1, or more sessions established on it.
• The sessions are independent: a commit in one session does not affect
transactions in other sessions.
Oracle Database 12c Architecture
Oracle Database 12c Architecture:
Major background processes