Database Architectures
Database Architectures
DBMS Architectures
There is a wide variety of different DBMS architectures
Teleprocessing File-Server Architecture Two-Tier Client-Server Architecture Three-Tier Client Server Architecture N-Tier Architecture Peer-to-Peer Architecture Distributed DBMS Service-Oriented Architecture Cloud Architecture ...
Teleprocessing
Terminal 1
Terminal 3
single mainframe and multiple (dumb) terminals runs application programs and DBMS formats data for presentation on terminals
Teleprocessing ...
Tendency to replace mainframes with network of
personal computers (downsizing)
File-Server Architecture
data request
LAN or WAN
Workstation 1 (DBMS)
file
Database File-Server
transferred
Disadvantages
heavy network traffic each workstation runs a full instance of the DBMS complex integrity, concurrency and recovery control
- multiple DBMSs may concurrently access the same shared file
11
LAN or WAN
Client 1
selected data
Client 2
Client n
clear separation of concerns between client and server thin client vs. thick client
- less or more application logic on the client side
presentation of data (user interface) business and data application logic send database requests to the server and process results manage (concurrent) database access (data services)
- authorisation, integrity checks, query/update processing, recovery control, ...
business logic (e.g. validation of data) single client and single server multiple clients and single server multiple clients and multiple servers
13
special protocols such as ODBC (JDBC) introduced earlier in the course when discussing the Call Level Interface (CLI) increased performance
- certain tasks performed in parallel and server can be tuned for DB processing
Advantages
wider access to existing databases maps well to open system architectures limitations in terms of enterprise scalability with thousands of potential clients
- significant client-side administration overhead
e.g. expensive deployment of new busines and data application logic
Disadvantages
- thick client requires a considerable amount of resources (CPU, RAM, ...) for running applications efficiently
15
Application Server
Client 2
Client n
presentation of data (user interface) basic input validation (thin client) send requests to the server and visualise results business logic data processing logic basic data validation manage (concurrent) database access (data services)
- authorisation, integrity checks, query/update processing, recovery control, ...
17
reduced costs for thin clients due to lower resource requirements (CPU, RAM, ...)
- e.g. applications running in a web browser
increased modularity
- easier to replace one tier without affecting the other tiers
load balancing becomes easier with a clear separation between the core business logic and the database functionality
18
Internet
HTTP Response
Client
browser as a thin client, application server (web server) and database server
N-Tier Architecture
HTTP Request
Internet
HTTP Response
Client
HTML Pages
e.g. separation between web server and application server in the previous web information system example
- increases the flexibility for load balancing by introducing multiple web servers - only dynamic content delivered by the application server whereas static content is directly managed by the web server
20
LAN or WAN
Site 3
Database 3
Systems exchanging information and services in a peerto-peer-like manner without a central authority
no global schema and need for schema integration (matching) no dedicated clients and servers sites may dynamically form new client/server relationships
21
Middleware
Software that connects (mediates) between software
components or applications
hide complexity of heterogenous and distributed components (e.g. servers) and provide a uniform interface remote procedure call (RPC)
- Java RMI - CORBA - XML RPC
asynchronous publish/subscribe
- subscribe for different types of messages
...
22
Memory
Disk Disk
Processor
Memory Disk
Processor
Disk Disk
shared memory
shared disk
shared nothing
25
LAN or WAN
Site 3
Database
Distributed database
logically related collection of shared data and metadata that is distributed over a network software system to manage the distributed database in a transparent way
28
Distributed DBMS
local transaction
- accesses only data from the site from which the transaction was initiated
global transaction
- accesses data from several different sites
data sharing
- possibility to access data that resides at other sides
autonomity
- each site retains a certain degree of control over the local data
availability
- if one site fails the other sites may still be able to continue operating - data might be replicated at serveral sites for increased availability
29
Implementation issues
transactions have to be executed atomically accross different sites (two-phase commit protocol)
- commit decission is left to a single coordinator
30
loose coupling of services service encapsulation interoperability between different operating systems and programming languages new services can be defined as a mashup of existing services e.g. single SQL Server processes acting as service providers software is offered as a service and on the other hand might be a composition of other services
- e.g. service for data storage etc.
31
Cloud Computing
Microsoft Google
Client 1
The Cloud
Yahoo Amazon
Client 3
Client 2
Client n
Internet-based computing with on-demand and pay-peruse access to shared resources, data and software
Main characteristics
web-based access (e.g. Web Service API or browser) pay only for the services that are actually used (pay-per-use) no initial investment (e.g. for resources) required
33
34
backup, replication, ... store data in the cloud or on servers on the Internet examples
- QuickBase, quickbase.intuit.com - Blist, www.blist.com - ...
35
online storage service with unlimited storage space store objects (up to 5 GB in size) in buckets Web Service API distributed database written in Erlang offers a Web Service API makes uses of S3 and EC2 on demand scaling non-relational data store
- schemaless - hashtables with set of key value pairs
Amazon SimpleDB
36
Mobile DBMS
Users want access to information on the move via mobile
devices
tourist information systems salesperson who is visiting their customers emergency services ... small footprint databases that can run on mobile devices with limited resources
- e.g. db4objects, http://www.db4o.com
37
communicate with centralised database server via wireless network or fixed Internet connections replicate data on a centralised server and on a mobile device
- synchronisation challenges
caching of data and transactions to cope with potential network connection failures opportunistic (peer-to-peer based) information exchange with other mobile DBMSs
- e.g. dynamic P2P Bluetooth connections with other devices in range (proximity-based information exchange)
security
- which portion of a database can/should be replicated on a mobile device?
...
38