Sie sind auf Seite 1von 5

DBMS DBMS

DBMS Database Management Systems Corporate databases often extent to


Oracle, Sybase, Access, MySQL, SAP, BAAN hundreds of Gb.
Originally Terrabytes of data provide a good history
Large, expensive systems Retailers use this to plan and determine market
trends.
Storage has got smaller and cheaper
Became practical to have a DBMS on a PC As object-oriented Db become a reality,
storage requirements grow.
One hour of video takes 1Gb
February 05 DBMS Architecture 1 February 05 DBMS Architecture 2

DBMS DBMS
Will be extending to petabytes (1000 terabytes or Parallel computing
1000 1000 gigabtyes) True parallel computing allows for quicker
This type of storage requires tertiary storage and access to large amounts of data.
parallel computing. Read many queries at the same time
Tertiary Storage
However,
Multiple disks, larger disks
May also need to break the queries into
Require longer access times (maybe up to several
seconds) subqueries to make efficient use of all resources
CDs stacked and selected by a robot arm

February 05 DBMS Architecture 3 February 05 DBMS Architecture 4

DBMS Architecture DBMS Architecture


Fundamental characteristic When the data is shared,
Allows many different uses for the same data Different applications access different parts of the data
Stock control stock files
Data not tied or controlled by any single
Order processing parts of stock, customers and invoice files,
application and also orders files.
Shared among many users and applications
The subset of the database is referred to as a View
Achieved by removing responsibility for Set up by the DBA
creating and maintaining the stored data to the DBMS supports multiple views of the same data sets
DBMS which acts as a controlling layer
between the applications and the data.

February 05 DBMS Architecture 5 February 05 DBMS Architecture 6

1
DBMS Architecture DBMS Architecture
The data stored may be used by many Security from unwarrented intrusion
applications at the same time concurrency. Should be able to restore data in event of a
DBMS must provide and control concurrent breakdown.
access.
Data integrity is maintained
If not controlled, the data may be corrupted
DB establishes the format of the data and all
Two applications update at the same time.
applications have to use this format.
Security and integrity of the DB should also Originally, files could have same data with
be maintained different formats.
February 05 DBMS Architecture 7 February 05 DBMS Architecture 8

DBMS Architecture DBMS Architecture


Parts of the system Transaction Manager
Area for data storage Responsible fo rthe integrity of the system
Contains the data and the metadata. Must assure that queries do not interfere with each
Will also contain indexes to speed up searching other and that the system will not lose data in the
(more on these later) event of a failure.
Storage Manager Interacts with the query manager to determine
potential conflicts in data being manipulated.
Requests information from the data storage and
Interacts with the storage manager to keep log files
modifies the information when requested to by the
of all transactions.
levels above it.
February 05 DBMS Architecture 9 February 05 DBMS Architecture 10

DBMS Architecture Schema Queries Modifications


Modifications
Query Processor
Handles queries, modification requests for data
Query Processor
and metadata
Transaction
Finds the best way to carry out a requested
Manager
operation and issues commands to the storage Storage Manager
manager to carry them out.
Diagram to show these components
Data
Metadata
February 05 DBMS Architecture 11 February 05 DBMS Architecture 12

2
DBMS Architecture Storage Manager
Three types of input In simple systems, this will be the file system of
Query the underlying OS.
Questions about data from a generic query interface (SQL In larger systems, the DBMS controls storage on
command line) the disk directly.
Questions from application program interfaces
Broken into two parts buffer manager, file
Modifications manager
To change the data, requests from the same possible sources
File manager manages location of files on disks and
Schema Modifications obtains the blocks required on request.
Usually from authorised personnel to change the schema or to Buffer manager manages main memory, receiving the
create a new database blocks and bringing pages in and out of memory.
February 05 DBMS Architecture 13 February 05 DBMS Architecture 14

Query Manager Transaction Manager


Translates the english queries into an efficient Transactions are elementary units of work on the
sequence of requests to return the data. database
Example: two tables One of the guarantees of a DBMS is to never lose
Customers customer names, PPS and address data.
Accounts account number, balance and PPS of owner. TM maintains a log of all operations carried out.
Query find all accounts owned by X Frequently, many transactions execute
Have to search first for the PPS number of X and then concurrently
find all of the accounts with that PPS number Proper execution requires ACID properties
Number of disk access will depend on the existence of Atomicity, Consistency, Isolation, Durability
an index.
February 05 DBMS Architecture 15 February 05 DBMS Architecture 16

Transaction Manager Transaction Manager


Atomicity either all of the transaction is Isolation when two or more transactions
executed or none of it is. run concurrently, the effects must be
Consistency a consistent state is one in isolated from each other.
which the data meets any expectations we Should not see effects caused by the two
may have. transactions running concurrently that would
not occur if they ran in series.
The expected state may be temporarily violated,
but must be restored after all transactions are Durability effect of a completed
complete transaction should not be lost.
February 05 DBMS Architecture 17 February 05 DBMS Architecture 18

3
Enforcing ACID Enforcing ACID
Common techniques include Locking, Logging
Logging and Transaction Commitment. Transactions initiated, changes caused by
Locking transactions, end of each transaction
Generally, the item that the transaction is All recorded by the transaction manager
accessing is locked to some degree. Always written to non volatile storage (will
When locked, access is restricted to avoid survive power failure)
overwriting
Important in assuring durability
Two transactions try to access the same record
for update will cause a conflict.
February 05 DBMS Architecture 19 February 05 DBMS Architecture 20

Enforcing ACID Enforcing ACID


Transaction Commitment Transaction Commitment
Usually the log is written before the data is Normally done in a tentative way
committed to the database. Changes are computed, but not actually made.
When the transaction is ready to complete, the First copied to a log, and then database is
changes are in the log. changed.
The log is then copied to disk and then the chages
are made in the database. If system fails between two steps
Can still be recovered
In the event of failure between the steps, the
changes can still be committed. Failure before completion
Can be redone safely
February 05 DBMS Architecture 21 February 05 DBMS Architecture 22

Client Server Constraints


Simplest form entire database is the Boolean valued functions whose value must
server, except for the query interace that be true.
interacts with the user. A bank balance has a constraint to be greater
Query sent from the client using SQL to than or equal to zero.
represent the request. Any transaction that threatens to violate this
constraint is rejected.
Server generates data and returns to the client.

February 05 DBMS Architecture 23 February 05 DBMS Architecture 24

4
Triggers Multimedia data
A piece of code that is executed when a Has forced expansion.
particular event occurs. Operations on multimedia data are not as
Insertion or deletion of a certain data item. simple as traditional data formats.
When a flight status is changed to cancelled, a Try searching for pictures that shoe people with
query may be run to fine passenger details to green eyes.
notify them May have to let uses add functions that may
Could be extended to try an find alternative flights apply to multimedia data.
for them.

February 05 DBMS Architecture 25 February 05 DBMS Architecture 26

Multimedia Data Data Integration


Size of the data is also a problem Combining already existing databases (divisional)
Sending 1Gb of data to a user may not be may be difficult
feasible. Differences in data, standards for same data
Set up delivery on demand or fixed rate delivery Often a data warehouse is used to select the relevant
system pieces from the legacy systems and present a unified
vew to someone (customer perhaps).
What the client wants may be in the middle and they
could stop transmission when the piece is received. Legacy systems keep working in their own environment
Warehouse gets updated periodically.

February 05 DBMS Architecture 27 February 05 DBMS Architecture 28

Das könnte Ihnen auch gefallen