33
1 CS511 Advanced Database Management Systems Lecture 4: DBMS Architecture Sept. 6 2006 ChengXiang Zhai Most slides are adapted from Kevin Chang’s lecture slides

oracle architecture

Embed Size (px)

DESCRIPTION

this is all about architecture of oracle database very beneficial for DBA

Citation preview

CS511 Advanced Database Management SystemsLecture 4:
DBMS Architecture
Most slides are adapted from Kevin Chang’s lecture slides
CS511 Advanced Database Management Systems
DBMS Mission Statement
But how to do it?
Data
Operations
Results
DBMS Architecture
Query Executor
Buffer Manager
Storage Manager
A Design Dilemma
Reuse as much as we can
Performance problem (inefficient)
Have its own buffer pool
Directly manage record structures with files

OS vs. DBMS
Proof:
There exists someone who can write popular textbooks in both OS and DBMS!
[Operating | Database] System Concepts
CS511 Advanced Database Management Systems
OS vs. DBMS Similarities??
What do they manage?
What do they provide?
OS vs. DBMS: Similarities
Purpose of an OS:
DBMS is in some sense an OS?
DBMS manages data
Both as API for application development!
CS511 Advanced Database Management Systems
Applications built upon DBMS
ERP: Enterprise Resource Planning
CRM: Customer Relationship Management
SCM: Supply Chain Management
Trilogy, i2, Oracle, IBM, ...
e-business software
scientific data
- Trilogy: like Tree-logy
process synchronization
deadlock handling
virtual memory
file system
authentication
OS vs. DBMS: Differences??
OS vs. DBMS: Differences
Data
Queries
Transactions
CS511 Advanced Database Management Systems
DBMS on top of OS: Relations vs. File system
Data object abstraction
extent: larger granularity allocation unit
sol1: managing raw disks by DBMS
sol2: simulate by managing free spaces in DBMS
Multiple trees (access methods)
block access: inodes
tuple access: DBMS indexes
- Sol2: DBMS asks OS for large-than-needed-now chunks, and manage space within DBMS
CS511 Advanced Database Management Systems
DBMS on top of OS: BM vs. VM
Query-aware replacement needed for performance
not always LRU
how about sort-merge join??
how about nested-loop join??
sort-merge– clustered sequential– want to keep most recent– so LRU good
nested-loop join– looping sequential– want to throw most recent– so MRU good
CS511 Advanced Database Management Systems
DBMS on top of OS: BM vs. VM
System-controlled replacement needed for correctness
not always LRU
BM correctness:
Want dirty blocks to be forced out to disk at commitment, for UNOD-only scheme
Want dirty blocks to remain in buffer before commitment, for REDO-only scheme
CS511 Advanced Database Management Systems
Not Really OS Problems: Deferred Update Semantics
Update emp.sal = 0.8*emp.sal if emp.sal > mgr.sal
empname sal manager
Smith 10k Brown
INGRES solution: deferred updates
buffer updates in intentions list for actual updates (also serve as redo log)
an example of “needing buffer knowledge in DBMS”, so perhaps not sensible to do BM totally in OS
Possible semantics:
Deferred updates to prevent chain reaction – INGRES solution
CS511 Advanced Database Management Systems
As the data model and application context change,
so does the DBMS architecture…
CS511 Advanced Database Management Systems
Post-Relational DB Projects
Buzz terms: object-oriented, extensible
after System R (relational), R* (distributed)
ultimately finding its way into IBM DB2 UDB
Exodus: U. Wisconsin
followed by Shore at Wisconsin, Predator at Cornell
CS511 Advanced Database Management Systems
POSTGRES: Post INGRES
Stonebraker, U.C. Berkeley
1986-1994: POSTGRES
Illustra acauqired by Informix
PostgreSQL (the SQL version)
RDBMS: the Relational Root
a database is a set of relations
relation of n attributes: a set of n-tuples
n-tuple: (v1, …, vn), where vi is in domain Si
CS511 Advanced Database Management Systems
Relational Model: Normal Forms
implicitly required in the relation model
definition:
? why?
? why?
Normalizing Relations: Example
Normalized relations: by decomposition
Books: title authors date
career {jones} 7/12/00
career 7 12 00
Relational Model Problems
“A relational DB is like a garage that forces you to take your car apart and store the pieces in little drawers.” (some researcher)
“Object” notion lost by decomposition
non-intuitive: object is decomposed into several relations
inefficient: a lot of online assembling by joins
Base types are too restrictive
integers and strings are very primitive
data “types” are typically application specific
Relational algebra is the only allowed operation
simple, declarative, but also restrictive
application = host language + embedded SQL
?? How to remedy these problems?
CS511 Advanced Database Management Systems
Quest for a Richer Model?
Object-oriented data model
ORDBMS vs. OODBMS
ORDBMS:
programming-based
Stonebraker’s Matrix
Simple Data Complex Data
Object Orientation Concepts
object identity (OID):
CS511 Advanced Database Management Systems
POSTGRES Data Model
POSTGRES data model:
inheritance (multiple parents)
POSTGRES Functions
Binary operators
PostQuel procedures
POSTGRES Storage System
We were guided by a missionary zeal to do something different…
No-overwrite system
log only needs to keep transaction state (commit/abort/going)
?? crash recovery-- how?
Advantages:
time travel is easy
- Flush of dirty data needed, since cannot “redo” (only have old pages as log). Otherwise, need “stable” memory.
CS511 Advanced Database Management Systems
Storage System: Problems
flushing differential data (why?) by commit time can be costly
unless “stable” main memory
reads have to stitch together current picture
And, yes, there are lots details unexplored or unexplained
- Flush of dirty data needed, since cannot “redo” (only have old pages as log). Otherwise, need “stable” memory.
CS511 Advanced Database Management Systems
Questing for the Right Models
Speaking about knowledge representation– The simple relational model is by far the only successful KR paradigm.
When the relational model came along, the network guys resisted and their companies went under. …
When the OO model came along, the relational guys absorb its best, and their companies prospered again!
-- Jeffery Ullman
- quote from a conversation with Jeff in a dinner 3/12/02 at DC
CS511 Advanced Database Management Systems
What You Should Know
What are some major limitations of services provided by an OS in supporting a DBMS?
In response to such limitations, what does a DBMS do?
As the data model and task environment change, the architecture will also need to change
CS511 Advanced Database Management Systems
Carry Away Messages
One usually doesn’t fit all!
An OS is designed to serve all kinds of applications, so it’s not optimal for supporting a DBMS
Other examples: a search engine is designed to serve all kinds of people, so it’s not optimal for a particular person (personalized search)
When a problem is recognized, there are often opportunities for breakthroughs in multiple areas
DBMS could take over OS functions
OS could provide more opportunities for customization
From “day 1”, high efficiency has been the primary challenge/concern in designing and implementing a DBMS; reliability may be the second major concern
In contrast, “accuracy of answers” is at least as important as efficiency for a Web search engine