9-Database System Architecture
9-Database System Architecture
Architectures
Dr. M. Brindha
Assistant Professor
Department of CSE
NIT, Trichy-15
Centralized Systems
•b
Transaction Servers
• Also
called query server systems or SQL server systems; clients
send requests to the server system where the transactions are
executed, and results are shipped back to the client.
• Requests specified in SQL, and communicated to the server
through a remote procedure call (RPC) mechanism.
• Transactional RPC allows many RPC calls to collectively form a
transaction.
• Open Database Connectivity (ODBC) is a C language application
program interface standard from Microsoft for connecting to a
server, sending SQL requests, and receiving results.
• JDBC standard similar to ODBC, for Java
Transaction Server Process Structure
• A typical transaction server consists of multiple
processes accessing data in shared memory.
• Server processes
• These receive user queries (transactions), execute them and
send results back
• Processes may be multithreaded, allowing a single process to
execute several user queries concurrently
• Typically multiple multithreaded server processes
• Checkpoint process
• Performs periodic checkpoints
• Issues:
•Page-Shipping versus Item-Shipping
•Locking
•Data Caching
•Lock Caching
Data Servers (Cont.)
• Page-Shipping versus Item-Shipping
• Smaller unit of shipping more messages
• Worth prefetching relateditems along with requested item
• Page shipping can be thought of as a form of prefetching
• Locking
• Overhead of requesting and getting locks from server is
high due to message delays
• Can grant locks on requested and prefetched items; with
page shipping, transaction is granted lock on whole page.
Data Servers (Cont.)
• Data Caching
• Data can be cached atclient even in between transactions
• But check that data is up-to-date before it is used (cache
coherency)
• Check can be done when requesting lock on data item
• Lock Caching
• Locks can be retained by client system even in between
transactions
• Transactions can acquire cached locks locally, without
contacting server
• Server calls back locks from clients when it receives
conflicting lock request. Client returns lock once no local
transaction is using it.
Database System Architecture
Speedup
Scaleup
Scaleup
•
Batch and
Batch scaleup:
Transaction Scaleup
•A single large job; typical of most database
queries and scientific simulation.
•Use an N-times larger computer on N-times larger
problem.
• Transaction scaleup:
•Numerous small queries submitted by
independent users to a shared database; typical
transaction processing and timesharing systems.
•N-times as many users submitting requests
(hence, N-times as many requests) to an N-times
larger database, on an N-times larger computer.
•Well-suited to parallel execution.
Factors Limiting Speedup and
Scaleup
Speedup and scaleup are often sublinear due to:
• Startup
costs: Cost of starting up multiple processes may
dominate computation time, if the degree of parallelism is high.
• Interference:Processes accessing shared resources (e.g.,system
bus, disks, or locks) compete with each other, thus spending
time waiting on other processes, rather than performing useful
work.
• Skew: Increasing the degree of parallelism increases the
variance in service times of parallely executing tasks. Overall
execution time determined by slowest of parallely executing
tasks.
Interconnection Network Architectures
• Bus.System components send data on and receive data
from a single communication bus;
• Does not scale well with increasing parallelism.