Database Technologies 2 (CSY3024)
DBMS architecture & features
Dr James Xue
School of Science & Technology University of Northampton
Database 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 Client-Server Architecture Peer-to-Peer Architecture Distributed DBMS Cloud Architecture Mobile databases
2
Teleprocessing
Traditional multi-user system architecture Single mainframe and multiple terminals Heavy load on the central mainframe Run application programs and DBMS Format data for presentation on terminals Tendency to replace mainframes with network of personal
computers (downsizing)
File server architectures Client-server architectures .
File-Server Architecture
A file-server is a computer that is connected to a network and
mainly servers as a shared storage
E.g., for shared access to databases
In a file-server architecture the processing is distributed over the
network
Workstations (application and DBMS) request data (files)
4
File-Server Architecture (cont.)
SQL request example
Since the file-server is not SQL-aware, the DBMS must
request files corresponding to the Branch and Staff relations from the file server, rather than just the staff names that satisfy the request Disadvantages
Heavy network traffic Each work stations runs a full instance of the DBMS Complex integrity, concurrency and recovery control Multiple DBMSs may concurrently access the shared file
Two-tier Client-Server Architecture
Application consists of a client (1st tier) and a server (2nd tier) that
might run on different machines
Clear separation of concerns between client and server Thin client vs thick client Less or more application logic on the client side
Support decentralised business environments
6
Two-tier Client-Server Architecture
Client (1st tier) tasks Presentation of data (user interfaces) Business and data application logic Send the database request to the server and process the results Server (2nd tier) tasks Manage (concurrent) data access (data services)
Business logic (e.g., validation of data)
Authorisation, integrity checks, query/update processing, recovery control,
Different possible client-server topologies Single client and single server Multiple clients and single server Multiple clients and multiple servers
7
Three-tier Client-Server Architecture
In the 1990s, the three-tier client-server architecture was
introduced to address the enterprise scalability issue
e.g., driven by emerging web applications
Application consists of a presentation tier (client) , a logic tier
(application server) and a data tier (database server) that might run on different platforms
8
Three-tier Client-Server Architecture
Presentation (1st tier ) tasks Presentation of data (user interfaces) Basic input validation (thin client) Send request to the server and visualise results Logic tier (2nd tier) tasks Business logic Data processing logic Data tier (3rd tier) tasks Basic data invalidation Manage (concurrent) database access (data services)
Authorisation, integrity checks, query/update processing, recovery
control
Three-tier Client-Server Architecture
10
N-tier architecture
The three-tier architecture can be extended with
additional intermediary tiers for increased flexibility
Increases the flexibility for load balancing by introducing multiple web
servers and/or edege servers.
11
Peer-to-Peer Architecture
Systems changing information and services in a peer-to-peer (P2P)
manner without a central authority
No global schema and need for schema integration (matching)
Data and service sharing No dedicated clients and servers Sites may dynamically form new client/server relationships
12
Middleware
Software that connects (mediates) between software
components or applications
provide a uniform interface
Hide complexity of heterogeneous and distributed components and
There exists different types of middleware Remote procedure call (RPC)
Java RMI CORBA XML RPC
Asynchronous publish/subscribe Subscribe for different types of messages
13
Distributed DBMS (DDBMS)
Distributed database Legally related connection of shared data and metadata that is distributed over a network Distributed DBMS Software system to manage the distributed databases in a transparent way
14
Distributed DBMS (DDBMS)
Distinction between local and global transaction Local transaction
Accesses only data from the site from which the transaction was initiated
Global transaction Accesses data from several different sites
Reasons for building a distributed DBMS Data sharing
Possibility to access data that resides at other sites
Autonomy 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 several sites to increase the availability
15
Distributed DBMS (DDBMS)
Costs and scalability Use cluster of PCs in stead of large mainframe systems Integration of existing DBMSs Coexistence of legacy systems with new applications Dynamic organisational structure Mergers and acquisitions
Implementation issues Transactions have to be executed atomically across different sites (two-phase commit protocol)
Commit decision is left to a single coordinator
Distributed concurrency control Deadlock detection has to be carried out across multiple sites
16
Parallel Database Architectures
Parallel machines (multiple processors) can be used to
speed up the transaction processing Different models for parallel database architectures
Shared-memory, shared-disk, shared-nothing and hierarchical
17
Parallel Database Architectures
CPU CPU CPU CPU Interconnection network
Memory
(Shared-memory)
Shared memory Processors and disks have access to shared memory via a bus Very efficient communication between processors Not scalable since bus becomes a bottleneck
18
Parallel Database Architectures
Memory Memory Memory Memory CPU CPU CPU CPU
Interconnection network
(Shared-disk)
Shared disk All processors can access all disks via a communication network Each processor has its own memory Certain degree of fault tolerance if processor/memory fails Also disks maybe have fault tolerance (e.g., RAID architecture) Interconnection to the disk systems becomes bottleneck
19
Parallel Database Architectures
Memory Memory CPU CPU Interconnection network
(Shared-nothing)
CPU Memory
CPU
Memory
Shared nothing Each node consists of a processor, memory and one or more disks High-speed interconnection network between processors More scalable than shared memory or shared disk model Increased communication costs for non-local disk access
20
Parallel Database Architectures
Hierarchical Combines the different models (composition) Top-level is shared nothing between nodes
Each node can be a shared memory or shared disk subsystem
21
Object Databases
Motivation to overcome weakness of relational
approach.
Richer data models. Closer integration with programming languages.
Better for situations that there are many objects, but less
data for each object. E.g., CAD ODMG created OQL standard, but very few vendors implemented it
22
Object Databases
Kinds of object databases Object relational (Oracle, DB2, PostgreSQL) Semantic data model (Jasmine) Programming language centred (Objectivity, FastObjects, ObjectStore). Commercial Object database (ObjectDB)
23
Mobile databases
Users want to access information on the move via mobile
devices
Tourist information systems Salesperson who is visiting their customers Emergency services
New requirements for mobile DBMSs Small footprint databases that can run on mobile devices with limited resources Location dependent queries Context-aware queries
24
Mobile databases (cont.)
Communicate with centralised database server via wireless network
or fixed Internet connection 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?
25
Cloud computing
Internet-based computing with on-demand and pay-per-use access
to shared resources, data and software Main characteristics
Elasticity Pay only for the services that are actually used (pay-as-you-go) Web-based access (e.g., Web Service API or browser)
26
Cloud computing Layers
27
Cloud data service example
Amazon Simple Storage Service (Amazon S3) Online storage service with unlimited storage space Store objects (up to 5GB in size) in buckets Web Service API Amazon SimpleDB Distributed database written in Erlang Offers a Web Service API Makes use of S3 and EC2 On demand scaling Non-relational data store
Schemaless Hashtables with set of key-value pairs
28
29
Exercises
List the benefits of multi-tiered architecture Compare with the MVC (Model-View-Controller)
architecture
30