introduction to oracle rdbms
TRANSCRIPT
-
8/11/2019 Introduction to Oracle RDBMS
1/24
Introduction to Oracle RDBMS
Presented by
Ashok KapurHawkeye Technology, Inc.
-
8/11/2019 Introduction to Oracle RDBMS
2/24
Whats a Relational Database?
Data is represented as Entities andRelationships
EntitiesAttributes
Relationships
One-to-One One-to-Many
Many-to-many
-
8/11/2019 Introduction to Oracle RDBMS
3/24
Logical Design
-
8/11/2019 Introduction to Oracle RDBMS
4/24
Logical Design Example
dept_no
name
Departnemt
emp_no
name
address
soc_sec_no (AK)
hire_dt
salary
hourly_ratedept_no (FK) (IE)
Employee
proj_no (FK)
emp_no (FK)
emp_project
proj_no
name (AK)
Project
dept_emp
proj_projemp
emp_emporoj
-
8/11/2019 Introduction to Oracle RDBMS
5/24
Physical Design
-
8/11/2019 Introduction to Oracle RDBMS
6/24
Database Objects
Tables Rows and Columns
Constraints
PK: Primary Keys UK: Unique Keys/Alternate Keys
FK: Foreign Keys
CK: check Constraints
Triggers Auto execution of code based on Table action (Insert,
Update, Delete)
-
8/11/2019 Introduction to Oracle RDBMS
7/24
Database Objects (contd.)
Indexes Unique
Non-unique
Views Logical Views of data
Object Tables
Object Type Stored Procedures/Functions
Server side code
-
8/11/2019 Introduction to Oracle RDBMS
8/24
Database Object Placement
Tablespaces System
Rollback
Temporary
Application data
Redo Logs Data Files
Physical placement of tablespaces
-
8/11/2019 Introduction to Oracle RDBMS
9/24
Object Creation and DataManipulation
-
8/11/2019 Introduction to Oracle RDBMS
10/24
Data Manipulation
DDL Data Definition Language CREATE Table/Index/Procedure/Function/Trigger
ALTER Table/Index
DML Data Manipulation Language INSERT,UPDATE,DELETE
SELECT
SELECT
FROM
WHERE
ORDER BY
-
8/11/2019 Introduction to Oracle RDBMS
11/24
Transaction Control
Rollback Segments Logs uncommitted changes, in case they
need to be undone
Redo Logs Logs data block changes, in case of
database recovery
Commit
Rollback
-
8/11/2019 Introduction to Oracle RDBMS
12/24
Database Access/Security
System Privileges Create session, create table, alter table, select
any table,
Object Privileges Select, Insert, Update, Delete, Alter,
Can group privs into roles
Connect, resource, DBA, Highest access level: internal or sys
Lowest access level: no privs
-
8/11/2019 Introduction to Oracle RDBMS
13/24
Oracle Configuration
-
8/11/2019 Introduction to Oracle RDBMS
14/24
Physical Configuration
Env variables: ORACLE_BASE
ORACLE_HOME
ORACLE_SID PATH: $ORACLE_HOME/bin
LD_LIBRARY_PATH: $ORACLE_HOME/lib
Initialization parameters
$ORACLE_HOME/dbs
-
8/11/2019 Introduction to Oracle RDBMS
15/24
Physical Configuration Admin directory structure
$ORACLE_BASE/admin//
create, pfile, bdump, cdump, udump
alert_.log /u*/oradata//
data files: xx.dbf
control fi les: *.ctl redo logs: *.log
archive logs: arch*.log
-
8/11/2019 Introduction to Oracle RDBMS
16/24
Client/Server Communication
-
8/11/2019 Introduction to Oracle RDBMS
17/24
Client/Server
Communication
Server: Listener.ora
Listener process
Client:
Sqlnet.ora
Tnsnames.ora
Oracle Names
-
8/11/2019 Introduction to Oracle RDBMS
18/24
Data Transfer
Request
Sql*Net
Transport
Layer
(TCP/IP)
Request
Sql*Net
Transport
Layer
(TCP/IP)
CLIENT SERVER
-
8/11/2019 Introduction to Oracle RDBMS
19/24
-
8/11/2019 Introduction to Oracle RDBMS
20/24
Memory Use
Shared Memory Data cache
Sql stmt Cache
Data Dictionary Cache
Private Memory
Heap
Sort Area
-
8/11/2019 Introduction to Oracle RDBMS
21/24
Oracle Processes
-
8/11/2019 Introduction to Oracle RDBMS
22/24
Background Processes Pmon (process monitor)
Smon (system monitor)
Dbwr (database writer)
Ckpt (checkpoint) Lgwr (log writer)
Reco (recovery)
Pxx (parallel query)
Snp (snapshot/job)
Arch (archiver)
-
8/11/2019 Introduction to Oracle RDBMS
23/24
Other Processes
Listener Listens for connections and spawns server
processes
Server Processes
Receive client requests, process requests
and serve results One per connection (unless MTS)
-
8/11/2019 Introduction to Oracle RDBMS
24/24
Questions?