Sie sind auf Seite 1von 27

Introduction

Introduction to
to Oracle
Oracle

Oracle
Oracle History
History
1979
1979Oracle
OracleRelease
Release22
1986
1986client/server
client/serverrelational
relationaldatabase
database
1989
1989Oracle
Oracle66
1997
1997Oracle
Oracle88(object
(objectrelational)
relational)
1999
1999Oracle
Oracle8i8i(Java
(JavaVirtual
VirtualMachine)
Machine)
2000
2000Oracle
OracleApplication
ApplicationServer
Server
2001
2001Oracle
Oracle9i9idatabase
databaseserver
server
Oracle
Oracle8i8i(8.1.7)
(8.1.7)August
August2000
2000
Oracle
Oracle9i9iRelease
Release11(9.0.1)
(9.0.1)June
June2001
2001
Oracle
Oracle9i9iRelease
Release22(9.2.0)
(9.2.0)May
May2002
2002
Oracle
Oracle10g
10gRelease
Release11(10.1.0)
(10.1.0)January
January2004
2004
Oracle
Oracle10g
10gRelease
Release22(10.2.0)
(10.2.0)September
September2005
2005
Oracle
Oracle11g
11gRelease
Release11(11.1.0.6)
(11.1.0.6)July
July2007
2007

Oracle
Oracle Family
Family
Personal
Personal OracleOracle- for
for single
single users.
users. Used
Used to
to
develop
develop systems
systems
Oracle
Oracle Standard
Standard EditionEdition- (Entry
(Entry level
level
Workgroup
Workgroup server)
server)
Oracle
Oracle Enterprise
Enterprise editionedition- Extended
Extended
functionality
functionality
Oracle
Oracle LiteLite- (Oracle
(Oracle mobile)
mobile) single
single users
users
using
using wireless
wireless devices.
devices.

Some
Some Developer
Developer Tools
Tools

Oracle
Oracle Forms
Forms Developer
Developer
Oracle
Oracle Reports
Reports Developer
Developer
Oracle
Oracle Jdeveloper
Jdeveloper
Oracle
Oracle Designer
Designer

Database
Database Structure
Structure
Logical
Logical structure
structure -- maps
maps the
the data
data to
to the
the
Physical
Physical structure.
structure.
Physical
Physical structure
structure -part
-part of
of the
the operating
operating
systems
systems file
file structure.
structure.
Memory
Memory structure
structure -- where
where all
all the
the
processing
processing takes
takes place.
place.

The
The Logical
Logical structures
structures
control
control how
how the
the data
data must
must be
be stored
stored in
in the
the
database.
database.
five
five Logical
Logical structures:
structures:
tablespaces
tablespaces
segments
segments
extents
extents
data
data blocks
blocks
schema
schema objects
objects

Physical
Physical structures
structures

Parameter
Parameter files
files
Password
Password files
files
Datafiles
Datafiles
Redo
Redo log
log files
files
Control
Control files
files

Memory
Memory structures
structures

System
System Global
Global Area
Area (SGA)
(SGA)
Program
Program Global
Global Area
Area (PGA)
(PGA)
The
The Oracle
Oracle database
database uses
uses these
these memory
memory
areas
areas to
to store
store information
information before
before they
they are
are
made
made permanent
permanent in
in the
the database.
database.

TableSpaces
TableSpaces
A
Adatabase
database isis divided
divided into
into logical
logical storage
storage
units
units called
called Tablespaces.
Tablespaces.
logical
logical construct
construct for
for arranging
arranging different
different
types
types of
of data
data
An
An Oracle
Oracle database
database must
must have
have at
at least
least aa
system
system tablespace.
tablespace.
ItIt isis recommended
recommended to
to have
have different
different
tablespaces
tablespaces for
for user
user and
and system
system data.
data.

Tablespaces
Tablespaces
aa logical
logical structure
structure
Data1
Data1_01.dbf

The DATA1
Tablespace =
One datafile

Data2
Data2_01.dbf

Data2_02.dbf

The DATA2
Tablespace =
Two datafiles

Create
Create Tablespace
Tablespace
CREATE
CREATETABLESPACE
TABLESPACE test
test
DATAFILE
DATAFILE '\oraserv\ORADATA\a.dbf'
'\oraserv\ORADATA\a.dbf'
SIZE
SIZE 10M
10M
AUTOEXTEND
AUTOEXTEND ON
ON
NEXT
NEXT10M
10M MAXSIZE
MAXSIZE 100M;
100M;
CREATE
CREATETABLE
TABLE cust(id
cust(id int,name
int,name varchar2(20))
varchar2(20))
TABLESPACE
TABLESPACE test;
test;

77 Logical
Logical Tablespaces
Tablespaces

SYSTEM
SYSTEM
DATA
DATA
INDEX
INDEX
USERS
USERS
ROLLBACK
ROLLBACK
TEMP
TEMP
TOOLS
TOOLS

Schemas
Schemas and
and Schema
Schema Objects
Objects
Collection
Collectionof
ofdatabase
database objects
objects
Tables
Tables
Views
Views
Sequences
Sequences
Synonyms
Synonyms
Indexes
Indexes
Procedures
Procedures
Functions
Functions
Packages
Packages
Triggers
Triggers

Data
Data Blocks
Blocks
The
The smallest
smallest unit
unit of
of Input/Output
Input/Output used
used by
by
Oracle
Oracle database.
database.
The
The size
size of
of data
data block
block for
for any
any database
database isis
fixed
fixed at
at the
the time
time of
of creation
creation of
of the
the database;
database;
Some
Some values
values of
of the
the data
data block
block size
size are
are 2KB,
2KB,
8KB,
8KB, 16KB,
16KB, and
and 32KB.
32KB.
Oracle
Oracle recommends
recommends aa size
size of
of 8KB
8KB

Extents
Extents

The
The next
next level
level of
of data
data storage.
storage.
One
One extent
extent consists
consists of
of aa specific
specific number
number of
of
data
data blocks
blocks
One
One or
or more
more extents
extents in
in turn
turn make
make up
up aa
segment.
segment.
When
When the
the existing
existing space
space in
in aa segment
segment isis
completely
completely used,
used, Oracle
Oracle allocates
allocates aa new
new
extent
extent for
for the
the segment.
segment.

Segment
Segment

A
Asegment
segment consists
consists of
of aa set
set of
of extents
extents
Each
Each tables
tablesdata
data isis stored
stored in
in its
its own
own single
single
segment.
segment.
Each
Each indexs
indexsdata
data isis stored
stored in
in aa single
single segment.
segment.
More
More extents
extents are
are automatically
automatically allocated
allocated by
by
Oracle
Oracle to
to aa segment
segment ififits
its existing
existing extents
extents become
become
full.
full.
The
The different
different types
types of
of segments
segments are
are the
the data
data
segments,
segments, index
index segments,rollback
segments,rollback segments,
segments,and
and
temporary
temporary segments.
segments.

Physical
Physical Database
Database Structure
Structure
Password
Passwordfile
file --which
whichcontain
containthe
thepassword
password
information
informationfor
forall
allusers.
users.
Parameter
Parameterfile
file --which
whichcontains
containsall
allthe
theimportant
important
information
informationnecessary
necessaryto
tostart
startaadatabase.
database.
Datafiles
Datafiles--which
whichcontain
containthe
theapplication
applicationdata
databeing
being
stored,
stored,as
aswell
wellas
asany
anydata
datanecessary
necessaryto
tostore
storeuser-IDs,
user-IDs,
passwords,
passwords,and
andprivileges.
privileges.
Redo
Redolog
logfiles
files --which
whichstore
storeall
allthe
thetransactions
transactionsmade
made
to
tothe
thedatabase.
database.These
Thesefiles
filesare
arealso
alsocalled
calledtransaction
transaction
log
logfiles.
files.
Control
Controlfiles
files--which
whichstore
storeinformation
informationspecifying
specifyingthe
the
structure
structureof
ofthe
thedatabase,such
database,suchas
asthe
thename
nameand
andtime
timeof
of
creation
creationof
ofthe
thedatabase
databaseand
andthe
thename
nameand
andlocation
locationof
of
the
thedatafiles.
datafiles.

Control files
Id
e

if y
t
n
Ide

nt
i fy

Record changes to

Data files
The Physical files that make up a database

Redo Log
Files

Control
Control Files
Files
Contain
Contain aa list
list of
of all
all other
other files
files in
in the
the
database
database
Key
Key information
information such
such as
as
Name
Name of
of the
the database
database
Date
Date created
created
Current
Current state
state
Backups
Backups performed
performed
Time
Time period
period covered
covered by
by redo
redo files
files

Redo
Redo Log
Log Files
Files
Store
Store aa recording
recording of
of changes
changes made
made to
to the
the
database
database as
as aa result
result of
of transactions
transactions and
and
internal
internal Oracle
Oracle Activities
Activities
When
When Oracle
Oracle fills
fills one
one redo
redo log,
log, itit
automatically
automatically fills
fills aa second.
second.
Used
Used for
for database
database recovery
recovery

Security
Security Mechanisms
Mechanisms

Database
Database users
users and
and schemas
schemas
Privileges
Privileges
Roles
Roles
Storage
Storage settings
settings and
and quotas
quotas
Resource
Resource limits
limits
Auditing
Auditing

Data
Data Access:
Access: SQL
SQL

Data
Data definition
definition language
language (DDL)
(DDL) statements
statements
Data
Data manipulation
manipulation language
language (DML)
(DML)
statements
statements
Transaction
Transaction control
control statements
statements
Session
Session control
control statements
statements
System
System control
control statements
statements
Embedded
Embedded SQL
SQLstatements
statements

Transactions
Transactions
A
Atransaction
transaction isis aa logical
logical unit
unit of
of work
work that
that
comprises
comprises one
one or
or more
more SQL
SQL statement
statement
executed
executed by
by aa single
single user.
user.According
According to
to the
the
ANSI/ISO
ANSI/ISO SQL
SQLstandard,
standard, with
with which
which
Oracle
Oracle isis compatible,
compatible, aa transaction
transaction begins
begins
with
with the
the users
users first
first executable
executable SQL
SQL
statement.
statement. A
Atransaction
transaction ends
ends when
when itit isis
explicitly
explicitly committed
committed or
or rolled
rolled back.
back.

Transaction
Transaction Example
Example

Das könnte Ihnen auch gefallen