Professional Documents
Culture Documents
Introduction to Database
History of RDBMS
Entity-Relationship Modeling
Database Language
Introduction to Database
File-Based Approach
Each program defines and manages its own data
Limitation
Duplication of data
Data dependence
Incompatibility of files
Database Approach
A shared collection of logically related data, designed
Advantages of DBMS
- Control of data redundancy - Economy of scale
- Data consistency
- Balance of conflicting requirements
- More information from the same amount of data
- Sharing of data
- Improved data accessibility and responsiveness
- Improved data integrity
- Increased productivity
- Improved security
- Improved maintenance through data
independence
- Enforcement of standards
- Increased concurrency
- Improved backup and recovery services
Disadvantages of DBMS
- Complexity, Size, Cost of DBMSs, Additional H/W costs
- Cost of conversion, Performance, Higher impact of a failure
Conceptual Level
The community view of the database
Internal Level
The physical representation of the database on the computer
Functions of a DBMS
1. Data storage, retrieval, and update
2. A user-accessible catalog
3. Transaction support
4. Concurrency control services
5. Recovery services
6. Authorization services
7. Support for data communication
8. Integrity services
9. Services to promote data independence
10. Utility services
Components of a DBMS
Programmers
Users
DBA
Application
Programs
Queries
Database
Schema
DML
preprocessor
Query
processor
DDL
compiler
Program
object code
Database
manager
Dictionary
manager
Access
methods
File
manager
System
buffers
Database and
system catalog
DBMS
Command
processor
Query
optimizer
Transaction
manager
Scheduler
Buffer
manager
Recovery
manager
Data
Manager
History of RDBMS
History of DBMS
1960s - Apollo moon-landing project, GUAM
mid 1960s - IMS by IBM (hierarchical DBMS)
mid 1960s - IDS by GE (network DBMS)
1965 - CODASYL(Conference on Data SYStems
Language)
1967 -DBTG(Data Base Task Group)
1970 - E.F.Codd of the IBM Research Lab.
Late 1970s - System R project at IBM
1980s - commercial relational DBMS(DB2, Oracle,
Informix..)
Now - OODBMS, ORDBMS
Terminology
Relation : a relation is a table with columns and rows
Attribute : an attribute is a named column of a relation
Domain : a domain is the set of allowable values for
attributes it contrains
Cardinality : the cardinality of a relation is the number
of tuples it contains
Relational database : a collection of normalized
relation
Properties of Relations
The relation has a name that is distinct from all other
relation names
Each cell of the relation contains exactly on atomic
value
Each attribute has a distinct name
The values of an attribute are all from the same domain
The order of attributes has no significance
Each tuple is distinct; there are no duplicate tuples
The order of tuples has no significance, theoretically
Structural rules
Rule 1 : Information representation
Integrity rules
Rule 3 : Systematic treatment of null values
Entity-Relationship Modeling
Attributes
A property of an entity or a relationship type
Relationship Types
A meaningful association among entity types
Normalization
A technique for producing a set of relations with desirable
Database Language
SQL
1974 - SEQUEL by D.Chamberlin (IBM)
1975 - SQUARE by Boyce (System R project)
1976 - SEQUEL/2 (SQL) by Chamberlin and Boyce)
late 1970 - SQL(Oracle), QUEL(Ingres)
1982 - Relational Database Language(RDL) : ANSI
1987 - ISO standard
1989 - Integrity Enhancement Feature (ISO)
1992 - SQL2(SQL92) : ISO
DML
SELECT
INSERT
UPDATE
DELETE
DDL
CREATE(DROP) SCHEMA
CREATE(ALTER, DROP) DOMAIN
CREATE(ALTER, DROP) TABLE
CREATE(DROP) VIEW
CREATE(DROP) INDEX
Advanced SQL
View
Integrity Enhancement Feature
Primary key
Unique
Foreign key
Access Control
Embedded SQL
Host Language Variables
Application Programming Interface
Dynamic SQL
SMON
D000
RECO
S000
Redo Log
Buffer
SGA
Shared SQL Area
P000
TL-812
4,000,000 KByte
Server
1,200,000 KByte
DBW0
CKPT
Data File
Raw Device
USER
2,100 KByte
LGWR
ARCH
Archive Log Mode(50M)
Dictionary
Cache
Shared
SQL Area
PL/SQL Procedures
and Package
Control Structures
for examples;
Locks
Library
Cache handles
and so on ...
Control Structures
for example:
Character Set
Conversion
Memory
Network Security
Attributes
and so on ..
Reusable
Runtime
Memory
Library Cache
Dictionary Cache
SHARED_POOL_SIZE
SGA
Shared Pool
Shared SQL
Area
LOG_BUFFER
change vector #1
redo record
change vector #1
change vector #1
Oracle Processes
SNPn
SMON
PMON
Pnnn
RECO
SGA
Database Buffer Cache
Snnn
Redo Log
Buffer
Offline
Storage
Device
Dedicated
Server
Process
DBWR
Dnnn
LCK0
User
Process
LGWR
ARCH
CKPT
Control
Files
Users
Data
Files
Redo Log
Files
Background Process
DBWR
(Database Writer)
LGWR
(Log Writer)
- A commit confirmation is not issued until the tx has been recorded in the rego
log file
Contd
PMON
(Process Monitor)
SMON
(System Monitor)
Contd
CKPT (Check
Point)
(Archiver)
Server/User Process
User Processes
- A user process is used when a user runs an application program
- Runs the tool/application and is considered the client
- Passes SQL to the server process and receives the results
Server Processes
- A server process must place the data in the database buffer cache
- Parce and execute SQL statements
- Read data blocks from disk into the shred database buffers of the SGA
- Return the results of SQL statements to the user process
Parse : check syntax, security access, object resolution, optimization
Execute : applies the parse tree to the data, perform a physical read and
change
Fetch : Passes data to the user (only SELECT)
Oracle Files
Datafile
Control Files
Parameter File
Archive File
Trace File
Storage Architecture
Segment
96K
Extent
Extent
24K
72K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
Database Blocks
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
2K
Database
System Tablespace
DATA1.ORA
DATA2.ORA
USER Tablespace
DATA3.ORA
Contd
Table
INDEX
INDEX
Table
INDEX
INDEX
INDEX
INDEX
INDEX
INDEX
INDEX
INDEX
Table
Database Files
Objects
Block
Header
Table Dictionary
Row Dictionary
Free Space
Row Data
using when New Row
Insert or Update
(pctfree, pctused)
Table or Index Data
PCTFREE / PCTUSED
PCTFREE
PCTFREE
PCTUSED
PCTUSED
PCTUSED = 40
PCTFREE = 20
Extent
A set
Extent
Extent
Each
( Rollback segment : 2)
ALTER TABLE
Segment
a set of one or more extents that contains all the data for a specific type of logical storage
structure within a tablespace
Data Segment
- A collection of extents that holds all of the data for a table or a cluster
Index Segment
- A collection of extents that holds all of the index data for search optimization on large tables
and clusters
Rollback Segment
- A collection of extents that holds rollback data for rollback, read-consistency, or recovery
Temporary segment
- A collection of extents that holds data belonging to temporary tables created during a sort
operation
Bootstrap segment
- An extent that contains dictionary definitions for dictionary tables to be loaded when the
database is opened.
OLTP
Parallel DML
Parallel Index Scans
Star Query Optimization
Partitioning
Parallel Backup/Recovery
Incremental Backup
Point-in-time Recovery
Advanced Queuing
XA rewrite
Memory reduction
Serially reusable memory
New OCI Interface
Improve Function Performance
Objects
Network Computing
OLTP
Summary management
Analytic function
Hash and Composite
Paritioning
Resource Management
Transportable tablespace
Functional index, virtual
column
Application Development
Security
Availability
Security
Packaged Application
Development Platform
Business Intelligence
Manageability
Windows2000 Integration
NETWORK
Server b
Client
Application
Server/Server
Client/Server
Server A
SQL*Net
What
is SQL*Net?
is TNS?
File
- TNSNAME.ORA ( Client )
- TNSNAV.ORA ( Client )
- SQLNET.ORA ( Client, Server )
- LISTENER.ORA ( Server )
SQL*Net Configuration
TNSNAME.ORA
info =
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=tcp)
(HOST=brinfoa01)
(PORT=1521)
)
)
(CONNECT_DATA=
(SID=BRBINFO1)
)
)
SQLNET.ORA
# SQLNET.EXPIRE_TIME = 0
SQLNET.AUTHENTICATION_S
ERVICES=(none, beq)
LISTENER.ORA
LISTENER=
(ADDRESS_LIST=
(ADDRESS=
(PROTOCOL=tcp)
(HOST=brinfoa01)
(PORT=1521)
)
)
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=BRBINFO1)
(ORACLE_HOME=/oracle7/oracle7)
(ENVS='EPC_DISABLED=TRUE')
)
)
STARTUP_WAIT_TIME_LISTENER=0
CONNECT_TIMEOUT_LISTENER=0
LOG_DIRECTORY_LISTENER=/oracle7/oracle7/network/log
LOG_FILE_LISTENER=listener
TRACE_LEVEL_LISTENER=OFF
Net8
Networking Challenge
Net8 Focus
1. Scalability : Connection Pooling, Multiplexing(Connection Manager)
2. Manageability : Configuration-free installation option,
Centralized client administration, Automated client configuration
3. Security : Oracle Security Server