Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

Database Systems Design Implementation and Management (PowerPoint) by ewghwehws

VIEWS: 4 PAGES: 51

									 Chapter 10
Distributed Database
Management Systems
    In this chapter, you will learn:
   What a distributed database management
    system (DDBMS) is and what its components
    are
   How database implementation is affected by
    different levels of data and process
    distribution


                                                 2
    In this chapter, you will learn:
   How transactions are managed in a
    distributed database environment
   How database design is affected by the
    distributed database environment




                                             3
            Evolution of DDBMS
   Distributed (Decentralized) database management
    systems (DDBMS)
   Definition: Database system governs the storage
    and processing of logically related data over
     Interconnected computer systems
     Data/processing functions reside on multiple sites




                                                           4
            Evolution of DDBMS
   1970’s: Centralized DBMS
      Structure information system for reports

      Using structure (3GL) programming languages

      Store in central mainframe or minicomputer




                                                     5
            Evolution of DDBMS
   1980’s: Social and Technical Changes
     Ad hoc capability required
     Decentralized management structure common

   1990’s: New forces
     Internet and the World Wide Web used for data access
      and distribution
     Data analysis through data mining and data warehousing




                                                         6
            Evolution of DDBMS
   Future (discussion)
     Centralized
     De-centralized
                          Multiple source
     Hybrid (combined)

     Grid-enhanced       Multiple location

                          Multiple processes

                          User-oriented
                                               7
       DDBMS Advantages
   Data located near site with greatest demand,
    distributed to match business requirements
   Faster data access delivered to end-user
   Faster data processing
   Growth facilitation (scalability of system
    extension)
   Improved communications, improve
    information system
                                                   8
       DDBMS Advantages

   Reduced operating costs
   User-friendly interface (GUI)
   Less danger of single-point failure
   Processor independence




                                          9
     DDBMS Disadvantages
   Complexity of management and control
   Security
   Lack of standards
   Increased storage requirements
   Greater difficulty in managing data
    environment
   Increased training costs
                                           10
     Distributed Processing and
       Distributed Database
   Distributed Processing
     Shares database’s logical processing among
      physically, networked independent sites
     Example: data I/O, data selection, data validation
      are performed on one computer
     Reports are performed on another computer




                                                      11
     Distributed Processing and
       Distributed Database
   Distributed Processing
     Shares database’s logical processing among
      physically, networked independent sites
     Example: data I/O, data selection, data validation
      are performed on one computer
     Reports are performed on another computer




                                                      12
Shared data processing among three sites
through communication network
                                           13
     Distributed Processing and
       Distributed Database
   Distributed Database
     Store a logically related database over two or
      more physically independent site
     The sites are connected through a network




                                                       14
Distributed Database




                       15
       Distributed Database
    vs. Distributed Processing
   Distributed processing
     Share with processing chores among several site
     Does not require distributed database

     May be based on a single database on single
      computer
     Copies or parts of database processing functions
      must be distributed to all data storage sites


                                                         16
       Distributed Database
    vs. Distributed Processing
   Distributed database
     System is composed of several parts of database
      (called database fragments)
     Database fragments are located at different sites

     Requires distributed processing

   Both (common points)
       Require a network to connect components

                                                          17
        Functions of DDBMS
   Application/end user interface
   Validation to analyze data requests
   Transformation to determine request
    components
   Query optimization to find the best access
    strategy
   Mapping to determine the data location


                                                 18
        Functions of DDBMS
   I/O interface to read or write data
   Formatting to prepare the data for
    presentation
   Security to provide data privacy
   Backup and recovery
   DB Administration
   Concurrency Control
   Transaction Management

                                          19
Centralized Database




                       Figure 10.3

                               20
Fully Distributed Database
  Management System




                     Figure 10.4
                                   21
        DDBMS Components
   Computer workstations
   Network hardware and software components
   Communications media
   Transaction processor (TP)
       Also called application manager (AP) or
        transaction manager (TM)
   Data processor (DP)
       Also called data manager (DM)
                                                  22
Distributed Database
    Components




                 Figure 10.5
                               23
           DDBMS Protocols
   Interface with network to transport data and
    commands between DPs and TPs
   Synchronize data received from DPs and
    route to appropriate TPs
   Ensure common database functions
     Security
     Concurrency control

     Backup and recovery
                                                   24
 Levels of Data and Process
        Distribution
Database systems can be classified based on
process distribution and data distribution



                                     Table 10.1




                                                  25
Single-Site Processing, Single-
       Site Data (SPSD)

   All processing on single CPU or host
    computer
   All data are stored on host computer disk
   DBMS located on the host computer
   DBMS accessed by dumb terminals
   Typical of mainframe and minicomputer
    DBMSs
   Typical of 1st generation of single-user
    microcomputer database                      26
Single-Site Processing, Single-
       Site Data (con’t.)




  Figure 10.6



                                  27
    Multiple-Site Processing,
    Single-Site Data (MPSD)
•   Requires network file server
•   Applications accessed through LAN
•   Variation known as client/server architecture




                                      Figure 10.7
                                                    28
     Multiple-Site Processing,
    Multiple-Site Data (MPMD)
   Fully distributed DDBMS with support for
    multiple DPs and TPs at multiple sites
       Homogeneous I
            Integrate one type of centralized DBMS over the
             network
       Heterogeneous
            Integrate different types of centralized DBMSs over a
             network
                                                                     29
Heterogeneous Distributed
   Database Scenario




                      Figure 10.8


                                    30
    Distributed DB Transparency
   Allows end users to feel like only database
    user
   Hides complexities of distributed database




                                                  31
    Distributed DB Transparency
   Transparency features
     Distribution
     Transaction

     Failure

     Performance

       Heterogeneity


                                  32
        Distribution Transparency
   Allows management of a physically dispersed
    database as though it were centralized
   Three Levels
     Fragmentation transparency
     Location transparency
     Local mapping transparency           Table 10.2




                                                  33
    Transaction Transparency
   Ensures transactions maintain integrity and
    consistency
   Completed only if all involved database sites
    complete their part of the transaction
   Management mechanisms
     Remote request
     Remote transaction

     Distributed transaction

     Distributed request                           34
Remote Request




                 Figure 10.10




                            35
Remote Transaction




                     Figure 10.11


                                    36
        Distributed Transaction
Figure 10.12




                                  37
Distributed Requests




                Figure 10.13


                               38
Distributed Requests (con’t.)




                     Figure 10.14


                                    39
        Distributed Concurrency
                Control
   Multisite, multiple-process operations more
    likely to create data inconsistencies and
    deadlocked transactions
   Problems
     Transaction committed by local DP
     One DP could not commit transaction’s result

     Yields inconsistent database

                                                     40
Two-Phase Commit Protocol
   DO-UNDO-REDO protocol
     Write-ahead protocol
     Two kinds of nodes
         Coordinator
         Subordinates




                             41
Two-Phase Commit Protocol
   Phases
       Preparation
          Coordinator sends message to all subordinates
          Confirms all are ready to commit or abort

       Final Commit
            Ensures all subordinates have committed or aborted




                                                                  42
    Performance Transparency
     and Query Optimization
   Objective: Minimize total cost associated with
    execution of request
   Main costs
     Access time
     Communication
     CPU time




                                                43
    Performance Transparency
     and Query Optimization
   Basis for query optimization algorithms
     Optimum execution order
     Sites accessed to minimize communication costs

   Dynamic or static optimization
   Statistically based vs. rule-based query
    optimization algorithms



                                                       44
Distributed Database Design
    Partition database into fragments
      Horizontal
      Vertical

      Mixed

    Fragments to replicate
      Storage of data copies at multiple sites
      Fully, partially, unreplicated databases



                                                  45
Distributed Database Design
    Data allocation
      Where to locate data
      Centralized, partitioned, replicated




                                              46
Client/Server Advantages Over
           DDBMS
   Client/server less expensive
   Client/server solutions allow use of
    microcomputer’s GUI
   More people with PC skills than mainframe
    skills



                                                47
Client/Server Advantages Over
           DDBMS
   PC is well established in workplace
   Numerous data analysis and query tools exist
   Considerable cost advantages to off-loading
    application development




                                                   48
    Client/Server Disadvantages

   Creates more complex environment with
    different platforms
   Increased number of users and sites creates
    security problems
   Training issues become more complex and
    expensive

                                                  49
Date’s 12 Commandments for
   Distributed Databases
   1. Local Site Independence
   2. Central Site Independence
   3. Failure Independence
   4. Location Transparency
   5. Fragmentation Transparency
   6. Replication Transparency
                                   50
Date’s 12 Commandments for
   Distributed Databases
  7. Distributed Query Processing
  8. Distributed Transaction Processing
  9. Hardware Independence
 10. Operating System Independence
 11. Network Independence
 12. Database Independence
                                          51

								
To top