Professional Documents
Culture Documents
Oracle Database Administration: Session 2
Oracle Database Administration: Session 2
Session 2
Harvard University
The Database
Harvard University
The Database
Harvard University
The Instance
Harvard University
The Instance
Harvard University
The Instance
Harvard University
Database Structures
Three Types
– Internal to the Database
– Internal to the Memory (SGA and Processes)
– External to the Database
Harvard University
Internal Database Structures
Tables
– Tables are the storage mechanism for data inside the
oracle database. There are made up of columns.
– Each column has a datatype and a length
Indexes
– It is a partial copy of the data in a table
– They are used to quickly find data in the database
– An index is created when a primary key is created.
Harvard University
Views
– A method of looking at “some” of the data in a
table or in groups of tables
– Views are masks over a table or group of tables
– Views have no indexes
– There can be used to enforce security
Harvard University
Procedures
– Blocks of PL/SQL statements, called by
applications
– They do not return a value to the calling program
Functions
– Like a procedure, but can return a value to the
calling program.
Harvard University
Packages
– These hold procedures and functions in logical
groups
– A package can have PUBLIC and PRIVATE
elements
– Public, would be procedures for a USERS usage
– Private may be called by other procedures in the
package
Harvard University
Triggers
– Procedures that execute when a specific event
occurs
– Used to augment referential integrity, enforce
additional integrity
– Statement triggers
– Row triggers
Harvard University
Sequences
– Sequential lists of unique numbers
– Used as primary Keys
Synonyms
– Synonyms are pointers to tables, views, procedures
functions.
– To fully qualify an object we need the machine hostname,
the instance name, the objects owner and the object’s
name
– Synonyms help to simplify the interface for the user
Harvard University
Users
– Users are not physical structures in database.
– All objects are owned by a user
– All users are associated to a specific default
tablespace
– Users can be ‘granted’ access to the objects of
other users and ‘granted’ the privilege to execute
a specific function or procedure
Harvard University
Schemas
– They are related to users.
– A set of tables and other database objects are
created as a schema and are owned by a user
Database Links
– Database Links are used to reference data
outside the database
– Database links can be public or private
Rollback Segments (Undo Segments)
Harvard University
Memory Structures
Harvard University
Harvard University
PMON SMON
Data Block
Shared Pool Redo Log Buffers
Buffers
Dictionary
Library Cache
Cache
3 4
2
Datafiles
Redo Log Files Archived Redo
Log Files
Harvard University
System Global Area
Harvard University
System Global Area
Harvard University
System Global Area
Harvard University
System Global Area
Harvard University
System Global Area
Harvard University
System Global Area
Harvard University
SGA PMON SMON
Data Block
Shared Pool Redo Log Buffers
Buffers
Dictionary
Library Cache
Cache
3 4
2
Datafiles
Redo Log Files Archived Redo
Log Files
Harvard University
Process Architecture
A process is a mechanism in an operating system
that can run a series of steps.
A process has its own private memory area
An Oracle database server has
– User processes
– Oracle processes
Harvard University
Background Processes
Harvard University
Background Processes
Harvard University
Background Processes
Harvard University
Background Processes
Harvard University
Oracle Instance
Memory structures
Database
Datafiles, Control files, etc
Harvard University
The Physical World
Harvard University
System
Harvard University
System
Harvard University
The OFA Standard
/u 0 1 /u 0 2 /u 0 3 /u 0 4 /u 0 5
/a p p /a p p / o r a d a ta / o r a d a ta
Harvard University
Oracle Directory Structure
/u 0 1 /a p p /o r a c le ($ O R A C L E _ B A S E )
a d m in p ro d u c t
Harvard University
Files
Harvard University
Files
Harvard University
Files
Harvard University
Datafiles and Tablespaces
Harvard University
Oracle’s “Logical” World
Harvard University
A tablespace can belong to only one
database
Harvard University
Undo segments
Harvard University
Tablespace Examples
– System holds all objects owned by the sys
user
– SYSAUX is an auxiliary tablespace to the
SYSTEM tablespace
– Rollback (RBS) (undo) is used to store the
rollback segments
– Temp (Temporary) is used for sort functions.
Harvard University
Tablespace Examples
Harvard University
Reading
Harvard University