DBMS Architecture Features(3)

download DBMS Architecture Features(3)

of 30

Transcript of DBMS Architecture Features(3)

  • 8/2/2019 DBMS Architecture Features(3)

    1/30

    Dr James Xue

    School of Science & TechnologyUniversity of Northampton

    DBMS architecture & features

    Database Technologies 2 (CSY3024)

  • 8/2/2019 DBMS Architecture Features(3)

    2/30

    Database architectures

    2

    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

  • 8/2/2019 DBMS Architecture Features(3)

    3/30

    Teleprocessing

    3

    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 personalcomputers (downsizing)

    File server architectures Client-server architectures .

  • 8/2/2019 DBMS Architecture Features(3)

    4/30

    File-Server Architecture

    4

    A file-server is a computer that is connected to a network andmainly servers as ashared storage

    E.g., for shared access to databases

    In afile-server architecturethe processing is distributedover thenetwork Workstations (application and DBMS) request data (files)

  • 8/2/2019 DBMS Architecture Features(3)

    5/30

    File-Server Architecture (cont.)

    5

    SQL request example

    Since the file-server isnot SQL-aware, the DBMS mustrequest files corresponding to theBranchand Staff relationsfrom the file server, rather than just the staff names thatsatisfy 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

  • 8/2/2019 DBMS Architecture Features(3)

    6/30

    Two-tier Client-Server Architecture

    6

    Application consists of a client (1st tier) and a server (2nd tier) thatmight 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

  • 8/2/2019 DBMS Architecture Features(3)

    7/30

    Two-tier Client-Server Architecture

    7

    Client (1st tier) tasks Presentationof 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) Authorisation, integrity checks, query/update processing, recovery control,

    Business logic (e.g., validation of data) Different possible client-server topologies

    Single client and single server Multiple clients and single server Multiple clients and multiple servers

  • 8/2/2019 DBMS Architecture Features(3)

    8/30

    Three-tier Client-Server Architecture

    8

    In the 1990s, the three-tier client-server architecture wasintroduced 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 mightrun on different platforms

  • 8/2/2019 DBMS Architecture Features(3)

    9/30

  • 8/2/2019 DBMS Architecture Features(3)

    10/30

    Three-tier Client-Server Architecture

    10

  • 8/2/2019 DBMS Architecture Features(3)

    11/30

    N-tier architecture

    11

    The three-tier architecture can be extended withadditional intermediary tiers for increased flexibility

    Increases the flexibility for load balancing by introducing multiple webservers and/or edege servers.

  • 8/2/2019 DBMS Architecture Features(3)

    12/30

    Peer-to-Peer Architecture

    12

    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

  • 8/2/2019 DBMS Architecture Features(3)

    13/30

    Middleware

    13

    Software that connects (mediates) between softwarecomponents or applications

    Hide complexityof heterogeneous and distributed components andprovide a uniform interface

    There exists different types of middleware Remote procedure call (RPC)

    Java RMI CORBA XML RPC

    Asynchronouspublish/subscribe

    Subscribe for different types of messages

  • 8/2/2019 DBMS Architecture Features(3)

    14/30

    Distributed DBMS (DDBMS)

    14

    Distributed database Legally relatedconnection of shared data and metadatathat is

    distributed over a network

    Distributed DBMS Software system tomanagethe distributed databases in a transparentway

  • 8/2/2019 DBMS Architecture Features(3)

    15/30

    Distributed DBMS (DDBMS)

    15

    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

  • 8/2/2019 DBMS Architecture Features(3)

    16/30

    Distributed DBMS (DDBMS)

    16

    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 singlecoordinator

    Distributed concurrency control Deadlock detectionhas to be carried out across multiple sites

  • 8/2/2019 DBMS Architecture Features(3)

    17/30

    Parallel Database Architectures

    17

    Parallel machines (multiple processors) can be used tospeed up the transaction processing

    Different models for parallel database architectures Shared-memory, shared-disk, shared-nothing and hierarchical

  • 8/2/2019 DBMS Architecture Features(3)

    18/30

    Parallel Database Architectures

    18

    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

    Interconnection network

    Memory

    CPU CPU CPU CPU

    (Shared-memory)

  • 8/2/2019 DBMS Architecture Features(3)

    19/30

    Parallel Database Architectures

    19

    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

    (Shared-disk)

    Interconnection network

    CPU CPU CPU CPU

    Memory Memory MemoryMemory

  • 8/2/2019 DBMS Architecture Features(3)

    20/30

    Parallel Database Architectures

    20

    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

    Increasedcommunicationcosts for non-local disk access

    (Shared-nothing)Interconnection network

    CPU

    CPU CPU

    CPU

    Memory

    Memory

    Memory

    Memory

  • 8/2/2019 DBMS Architecture Features(3)

    21/30

    Parallel Database Architectures

    21

    Hierarchical Combines the different models (composition) Top-level is shared nothing between nodes

    Each node can be a shared memory or shared disk subsystem

  • 8/2/2019 DBMS Architecture Features(3)

    22/30

    Object Databases

    22

    Motivation to overcome weakness of relationalapproach.

    Richer data models. Closer integration with programming languages.

    Better for situations that there are many objects, but lessdata for each object. E.g., CAD

    ODMG created OQL standard, but very few vendorsimplemented it

  • 8/2/2019 DBMS Architecture Features(3)

    23/30

    Object Databases

    23

    Kinds of object databases Object relational (Oracle, DB2, PostgreSQL) Semantic data model (Jasmine) Programming language centred (Objectivity, FastObjects,

    ObjectStore). Commercial Object database (ObjectDB)

  • 8/2/2019 DBMS Architecture Features(3)

    24/30

    Mobile databases

    24

    Users want to access information on the move via mobiledevices

    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

  • 8/2/2019 DBMS Architecture Features(3)

    25/30

    Mobile databases (cont.)

    25

    Communicate with centralised database server via wireless networkor 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 networkconnection failures

    Opportunistic (peer-to-peer based) information exchange with othermobile 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?

  • 8/2/2019 DBMS Architecture Features(3)

    26/30

    Cloud computing

    26

    Internet-based computing with on-demand and pay-per-use accessto 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)

  • 8/2/2019 DBMS Architecture Features(3)

    27/30

    Cloud computing Layers

    27

  • 8/2/2019 DBMS Architecture Features(3)

    28/30

    Cloud data service example

    28

    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

  • 8/2/2019 DBMS Architecture Features(3)

    29/30

    29

  • 8/2/2019 DBMS Architecture Features(3)

    30/30

    Exercises

    30

    List the benefits of multi-tiered architecture Compare with the MVC (Model-View-Controller)

    architecture