SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
Chapter 20: Database System Architectures 



                     Version: Oct 5, 2006


            Database System Concepts, 5th Ed.
                 ©Silberschatz, Korth and Sudarshan
            See www.db­book.com for conditions on re­use 
Chapter 20:  Database System Architectures
             s Centralized and Client­Server Systems
             s Server System Architectures
             s Parallel Systems
             s Distributed Systems
             s Network Types




Database System Concepts ­ 5th Edition       20.<number>   ©Silberschatz, Korth and Sudarshan
Centralized Systems
            s Run on a single computer system and do not interact with other 
                  computer systems.
            s General­purpose computer system: one to a few CPUs and a number 
                  of device controllers that are connected through a common bus that 
                  provides access to shared memory.
            s Single­user system (e.g., personal computer or workstation): desk­top 
                  unit, single user, usually has only one CPU  and one or two hard 
                  disks; the OS may support only one user.
            s Multi­user system: more disks, more memory, multiple CPUs, and a 
                  multi­user OS. Serve a large number of users who are connected to 
                  the system vie terminals. Often called server systems.




Database System Concepts ­ 5th Edition          20.<number>              ©Silberschatz, Korth and Sudarshan
A Centralized Computer System




Database System Concepts ­ 5th Edition   20.<number>   ©Silberschatz, Korth and Sudarshan
Client­Server Systems
      s Server systems satisfy requests generated at m client systems, whose general 
            structure is shown below:




Database System Concepts ­ 5th Edition           20.<number>      ©Silberschatz, Korth and Sudarshan
Client­Server Systems (Cont.)
             s Database functionality can be divided into:
                    q    Back­end: manages access structures, query evaluation and 
                         optimization, concurrency control and recovery.
                    q    Front­end: consists of tools such as forms, report­writers, and 
                         graphical user interface facilities.
             s The interface between the front­end and the back­end is through SQL or 
                  through an application program interface.




Database System Concepts ­ 5th Edition             20.<number>               ©Silberschatz, Korth and Sudarshan
Client­Server Systems (Cont.)
            s Advantages of replacing mainframes with networks of workstations or 
                  personal computers connected to back­end server machines:
                    q   better functionality for the cost
                    q   flexibility in locating resources and expanding facilities
                    q   better user interfaces
                    q   easier maintenance




Database System Concepts ­ 5th Edition               20.<number>               ©Silberschatz, Korth and Sudarshan
Server System Architecture
            s Server systems can be broadly categorized into two kinds:
                    q   transaction servers which are widely used in relational database 
                        systems, and
                    q   data servers, used in object­oriented database systems




Database System Concepts ­ 5th Edition            20.<number>             ©Silberschatz, Korth and Sudarshan
Transaction Servers
            s Also called query server systems or SQL server systems
                    q   Clients send requests to the server
                    q   Transactions are executed at the server
                    q   Results are shipped back to the client.
            s Requests are specified in SQL, and communicated to the server 
                  through a remote procedure call (RPC) mechanism.
            s Transactional RPC allows many RPC calls to form a transaction.
            s 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.
            s JDBC standard is similar to ODBC, for Java




Database System Concepts ­ 5th Edition             20.<number>            ©Silberschatz, Korth and Sudarshan
Transaction Server Process Structure
            s A typical transaction server consists of multiple processes accessing 
                  data in shared memory.
            s Server processes
                    q   These receive user queries (transactions), execute them and send 
                        results back
                    q   Processes may be multithreaded, allowing a single process to 
                        execute several user queries concurrently
                    q   Typically multiple multithreaded server processes
            s Lock manager process
                    q   More on this later
            s Database writer process
                    q   Output modified buffer blocks to disks continually




Database System Concepts ­ 5th Edition             20.<number>               ©Silberschatz, Korth and Sudarshan
Transaction Server Processes (Cont.)

             s Log writer process
                    q    Server processes simply add log records to log record buffer
                    q    Log writer process outputs log records to stable storage. 
             s Checkpoint process
                    q    Performs periodic checkpoints
             s Process monitor process
                    q    Monitors other processes, and takes recovery actions if any of the other 
                         processes fail
                             E.g. aborting any transactions being executed by a server process 
                              and restarting it




Database System Concepts ­ 5th Edition              20.<number>              ©Silberschatz, Korth and Sudarshan
Transaction System Processes (Cont.)




Database System Concepts ­ 5th Edition   20.<number>   ©Silberschatz, Korth and Sudarshan
Transaction System Processes (Cont.)
            s Shared memory contains shared data 
                    q   Buffer pool
                    q   Lock table
                    q   Log buffer
                    q   Cached query plans (reused if same query submitted again)
            s All database processes can access shared memory
            s To ensure that no two processes are accessing the same data structure 
                  at the same time, databases systems implement mutual exclusion 
                  using either
                    q   Operating system semaphores
                    q   Atomic instructions such as test­and­set
            s To avoid overhead of interprocess communication for lock 
                  request/grant, each database process operates directly on the lock 
                  table 
                    q   instead of sending requests to lock manager process
            s Lock manager process still used for deadlock detection

Database System Concepts ­ 5th Edition            20.<number>            ©Silberschatz, Korth and Sudarshan
Data Servers
            s Used in high­speed LANs, in cases where
                    q   The clients are comparable in processing power to the server
                    q   The tasks to be executed are compute intensive.
            s Data are shipped to clients where processing is performed, and then 
                  shipped results back to the server.
            s This architecture requires full back­end functionality at the clients.
            s Used in many object­oriented database systems 
            s Issues:
                    q   Page­Shipping versus Item­Shipping
                    q   Locking
                    q   Data Caching
                    q   Lock Caching




Database System Concepts ­ 5th Edition            20.<number>             ©Silberschatz, Korth and Sudarshan
Data Servers (Cont.)
            s Page­shipping versus item­shipping
                    q   Smaller unit of shipping ⇒ more messages
                    q   Worth prefetching related items along with requested item
                    q   Page shipping can be thought of as a form of prefetching
            s Locking
                    q   Overhead of requesting and getting locks from server is high due 
                        to message delays
                    q   Can grant locks on requested and prefetched items; with page 
                        shipping, transaction is granted lock on whole page.
                    q   Locks on a prefetched item can be P{called back} by the server, 
                        and returned by client transaction if the prefetched item has not 
                        been used.  
                    q   Locks on the page can be deescalated to locks on items in the 
                        page when there are lock conflicts. Locks on unused items can 
                        then be returned to server.




Database System Concepts ­ 5th Edition             20.<number>              ©Silberschatz, Korth and Sudarshan
Data Servers (Cont.)
             s Data Caching
                    q    Data can be cached at client even in between transactions
                    q    But check that data is up­to­date before it is used (cache coherency)
                    q    Check can be done when requesting lock on data item
             s Lock Caching
                    q    Locks can be retained by client system even in between transactions
                    q    Transactions can acquire cached locks locally, without contacting 
                         server
                    q    Server calls back locks from clients when it receives conflicting lock 
                         request.  Client returns lock once no local transaction is using it.
                    q    Similar to deescalation, but across transactions.




Database System Concepts ­ 5th Edition              20.<number>              ©Silberschatz, Korth and Sudarshan
Parallel Systems
            s Parallel database systems consist of multiple processors and multiple 
                  disks connected by a fast interconnection network.
            s A coarse­grain parallel machine consists of a small number of 
                  powerful processors
            s A massively parallel or fine grain parallel machine utilizes 
                  thousands of smaller processors.
            s Two main performance measures:
                    q   throughput ­­­ the number of tasks that can be completed in a 
                        given time interval
                    q   response time ­­­ the amount of time it takes to complete a single 
                        task from the time it is submitted




Database System Concepts ­ 5th Edition            20.<number>              ©Silberschatz, Korth and Sudarshan
Speed­Up and Scale­Up
           s Speedup: a fixed­sized problem executing on a small system is given 
                to a system which is N­times larger.
                  q    Measured by:
                  speedup = small system elapsed time
                                    large system elapsed time
                  q    Speedup is linear if equation equals N.
           s Scaleup: increase the size of both the problem and the system
                  q    N­times larger system used to perform N­times larger job
                  q    Measured by:
                  scaleup = small system small problem elapsed time
                                     big system big problem elapsed time 
                  q    Scale up is linear if equation equals 1.




Database System Concepts ­ 5th Edition              20.<number>             ©Silberschatz, Korth and Sudarshan
Speedup




                                         Speedup

Database System Concepts ­ 5th Edition      20.<number>   ©Silberschatz, Korth and Sudarshan
Scaleup




                                           Scaleup


Database System Concepts ­ 5th Edition    20.<number>   ©Silberschatz, Korth and Sudarshan
Batch and Transaction Scaleup
            s Batch scaleup:
                    q   A single large job; typical of most decision support queries and 
                        scientific simulation.
                    q   Use an N­times larger computer on N­times larger problem.
            s Transaction scaleup:
                    q   Numerous small queries submitted by independent users to a 
                        shared database; typical transaction processing and timesharing 
                        systems.
                    q   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.
                    q   Well­suited to parallel execution.




Database System Concepts ­ 5th Edition             20.<number>               ©Silberschatz, Korth and Sudarshan
Factors Limiting Speedup and Scaleup
            Speedup and scaleup are often sublinear due to:
            s Startup costs: Cost of starting up multiple processes may dominate 
                  computation time, if the degree of parallelism is high.
            s 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.
            s 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.




Database System Concepts ­ 5th Edition           20.<number>                ©Silberschatz, Korth and Sudarshan
Interconnection Network Architectures
            s Bus. System components send data on and receive data from a single 
                  communication bus;
                    q   Does not scale well with increasing parallelism.
            s Mesh. Components are arranged as nodes in a grid, and each 
                  component is connected to all adjacent components
                    q   Communication links grow with growing number of components, 
                        and so scales better.  
                    q   But may require 2√n hops to send message to a node (or √n with 
                        wraparound connections at edge of grid).
            s Hypercube.  Components are numbered in binary;  components are 
                  connected to one another if their binary representations differ in 
                  exactly one bit.
                    q   n components are connected to log(n) other components and can 
                        reach each other via at most log(n) links; reduces communication 
                        delays.




Database System Concepts ­ 5th Edition             20.<number>              ©Silberschatz, Korth and Sudarshan
Interconnection Architectures




Database System Concepts ­ 5th Edition   20.<number>   ©Silberschatz, Korth and Sudarshan
Parallel Database Architectures
            s Shared memory ­­ processors share a common memory
            s Shared disk ­­ processors share a common disk
            s Shared nothing ­­ processors share neither a common memory nor 
                  common disk
            s Hierarchical ­­ hybrid of the above architectures




Database System Concepts ­ 5th Edition       20.<number>          ©Silberschatz, Korth and Sudarshan
Parallel Database Architectures




Database System Concepts ­ 5th Edition   20.<number>   ©Silberschatz, Korth and Sudarshan
Shared Memory
            s Processors and disks have access to a common memory, typically via 
                  a bus or through an interconnection network.
            s Extremely efficient communication between processors — data in 
                  shared memory can be accessed by any processor without having to 
                  move it using software.
            s Downside – architecture is not scalable beyond 32 or 64 processors 
                  since the bus or the interconnection network becomes a bottleneck
            s Widely used for lower degrees of parallelism (4 to 8).




Database System Concepts ­ 5th Edition         20.<number>              ©Silberschatz, Korth and Sudarshan
Shared Disk
             s All processors can directly access all disks via an interconnection 
                  network, but the processors have private memories.
                    q    The memory bus is not a bottleneck
                    q    Architecture provides a degree of fault­tolerance — if a processor 
                         fails, the other processors can take over its tasks since the database 
                         is resident on disks that are accessible from all processors.
             s Examples:  IBM Sysplex and DEC clusters (now part of Compaq) 
                  running Rdb (now Oracle Rdb) were early commercial users 
             s Downside: bottleneck now occurs at interconnection to the disk 
                  subsystem.
             s Shared­disk systems can scale to a somewhat larger number of 
                  processors, but communication between processors is slower.




Database System Concepts ­ 5th Edition             20.<number>               ©Silberschatz, Korth and Sudarshan
Shared Nothing
            s Node consists of a processor, memory, and one or more disks. 
                  Processors at one node  communicate with another processor at 
                  another node using an interconnection network. A node functions as 
                  the server for the data on the disk or disks the node owns.
            s Examples: Teradata, Tandem, Oracle­n CUBE
            s Data accessed from local disks (and local memory accesses)  do not 
                  pass through interconnection network, thereby minimizing the 
                  interference of resource sharing.
            s Shared­nothing multiprocessors can be scaled up to thousands of 
                  processors without interference.
            s Main drawback: cost of communication and non­local disk access; 
                  sending data involves software interaction at both ends.




Database System Concepts ­ 5th Edition          20.<number>                  ©Silberschatz, Korth and Sudarshan
Hierarchical
            s Combines characteristics of shared­memory, shared­disk, and shared­
                  nothing architectures.
            s Top level is a shared­nothing architecture –  nodes connected by an 
                  interconnection network, and do not share disks or memory with each 
                  other.
            s Each node of the system could be a shared­memory system with a 
                  few processors.
            s Alternatively, each node could be a shared­disk system, and each of 
                  the systems sharing a set of disks could be a shared­memory system.
            s Reduce the complexity of programming such systems by distributed 
                  virtual­memory architectures
                    q   Also called non­uniform memory architecture (NUMA)




Database System Concepts ­ 5th Edition           20.<number>            ©Silberschatz, Korth and Sudarshan
Distributed Systems
             s Data spread over multiple machines (also referred to as sites or 
                  nodes).
             s Network interconnects the machines
             s Data shared by users on multiple machines




Database System Concepts ­ 5th Edition          20.<number>           ©Silberschatz, Korth and Sudarshan
Distributed Databases
            s Homogeneous distributed databases
                    q   Same software/schema on all sites, data may be partitioned 
                        among sites
                    q   Goal: provide a view of a single database, hiding details of 
                        distribution
            s Heterogeneous distributed databases
                    q   Different software/schema on different sites
                    q   Goal: integrate existing databases to provide useful functionality
            s Differentiate between local and global transactions
                    q   A local transaction accesses data in the single site at which the 
                        transaction was initiated.
                    q   A global transaction either accesses data in a site different from 
                        the one at which the transaction was initiated or accesses data in 
                        several different sites.




Database System Concepts ­ 5th Edition             20.<number>               ©Silberschatz, Korth and Sudarshan
Trade­offs in Distributed Systems
            s Sharing data – users at one site able to access the data residing at 
                  some other sites.
            s Autonomy – each site is able to retain a degree of control over data 
                  stored locally.
            s Higher system availability through redundancy — data can be 
                  replicated at remote sites, and system can function even if a site fails.
            s Disadvantage: added complexity required to ensure proper 
                  coordination among sites.
                    q   Software development cost.
                    q   Greater potential for bugs.
                    q   Increased processing overhead.




Database System Concepts ­ 5th Edition                20.<number>           ©Silberschatz, Korth and Sudarshan
Implementation Issues for Distributed 
                                     Databases 
             s Atomicity needed even for transactions that update data at multiple sites
             s The two­phase commit protocol (2PC) is used to ensure atomicity
                    q    Basic idea:  each site executes transaction until just before commit, 
                         and the leaves final decision to a coordinator
                    q    Each site must follow decision of coordinator, even if there is a failure 
                         while waiting for coordinators decision
             s 2PC is not always appropriate:  other transaction models based on 
                  persistent messaging, and workflows, are also used 
             s Distributed concurrency control (and deadlock detection) required
             s Data items may be replicated to improve data availability
             s Details of above in Chapter 22




Database System Concepts ­ 5th Edition              20.<number>                ©Silberschatz, Korth and Sudarshan
Network Types
            s Local­area networks (LANs) – composed of processors that are 
                  distributed over small geographical areas, such as a single building or 
                  a few adjacent buildings. 
            s Wide­area networks (WANs) – composed of processors distributed 
                  over a large geographical area.




Database System Concepts ­ 5th Edition           20.<number>               ©Silberschatz, Korth and Sudarshan
Networks Types (Cont.)
            s WANs with continuous connection (e.g. the Internet) are needed for 
                  implementing distributed database systems
            s Groupware applications such as Lotus notes can work on WANs with 
                  discontinuous connection:
                    q   Data is replicated.
                    q   Updates are propagated to replicas periodically.
                    q   Copies of data may be updated independently.
                    q   Non­serializable executions can thus result. Resolution is 
                        application dependent.   




Database System Concepts ­ 5th Edition             20.<number>              ©Silberschatz, Korth and Sudarshan
End of Chapter




Database System Concepts, 5th Ed.
     ©Silberschatz, Korth and Sudarshan
See www.db­book.com for conditions on re­use 

Contenu connexe

Tendances

Introduction to Postrges-XC
Introduction to Postrges-XCIntroduction to Postrges-XC
Introduction to Postrges-XCAshutosh Bapat
 
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data AnalyticsSupersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analyticsmason_s
 
Directory Write Leases in MagFS
Directory Write Leases in MagFSDirectory Write Leases in MagFS
Directory Write Leases in MagFSMaginatics
 
Maginatics Cloud Storage Platform - MCSP 3.0 Technical Highlights
Maginatics Cloud Storage Platform - MCSP 3.0 Technical HighlightsMaginatics Cloud Storage Platform - MCSP 3.0 Technical Highlights
Maginatics Cloud Storage Platform - MCSP 3.0 Technical HighlightsMaginatics
 
Maginatics @ SDC 2013: Architecting An Enterprise Storage Platform Using Obje...
Maginatics @ SDC 2013: Architecting An Enterprise Storage Platform Using Obje...Maginatics @ SDC 2013: Architecting An Enterprise Storage Platform Using Obje...
Maginatics @ SDC 2013: Architecting An Enterprise Storage Platform Using Obje...Maginatics
 
140116 max scale-for_madrid_meetup
140116 max scale-for_madrid_meetup140116 max scale-for_madrid_meetup
140116 max scale-for_madrid_meetupdsdata systems
 
Red Hat Gluster Storage - Direction, Roadmap and Use-Cases
Red Hat Gluster Storage - Direction, Roadmap and Use-CasesRed Hat Gluster Storage - Direction, Roadmap and Use-Cases
Red Hat Gluster Storage - Direction, Roadmap and Use-CasesRed_Hat_Storage
 
[B5]memcached scalability-bag lru-deview-100
[B5]memcached scalability-bag lru-deview-100[B5]memcached scalability-bag lru-deview-100
[B5]memcached scalability-bag lru-deview-100NAVER D2
 
Cassandra - A Distributed Database System
Cassandra - A Distributed Database System Cassandra - A Distributed Database System
Cassandra - A Distributed Database System Md. Shohel Rana
 
Triangle MySQL User Group MySQL Fabric Presentation Feb 12th, 2015
Triangle MySQL User Group MySQL Fabric Presentation Feb 12th, 2015Triangle MySQL User Group MySQL Fabric Presentation Feb 12th, 2015
Triangle MySQL User Group MySQL Fabric Presentation Feb 12th, 2015Dave Stokes
 
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres OpenKoichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres OpenPostgresOpen
 
Scaling Out Tier Based Applications
Scaling Out Tier Based ApplicationsScaling Out Tier Based Applications
Scaling Out Tier Based ApplicationsYury Kaliaha
 
Distributed Caching Essential Lessons (Ts 1402)
Distributed Caching   Essential Lessons (Ts 1402)Distributed Caching   Essential Lessons (Ts 1402)
Distributed Caching Essential Lessons (Ts 1402)Yury Kaliaha
 
As fast as a grid, as safe as a database
As fast as a grid, as safe as a databaseAs fast as a grid, as safe as a database
As fast as a grid, as safe as a databasegojkoadzic
 
Moskva Architecture Highload
Moskva Architecture HighloadMoskva Architecture Highload
Moskva Architecture HighloadOntico
 
Data has a better idea the in-memory data grid
Data has a better idea   the in-memory data gridData has a better idea   the in-memory data grid
Data has a better idea the in-memory data gridBogdan Dina
 
HDFS for Geographically Distributed File System
HDFS for Geographically Distributed File SystemHDFS for Geographically Distributed File System
HDFS for Geographically Distributed File SystemKonstantin V. Shvachko
 

Tendances (19)

Introduction to Postrges-XC
Introduction to Postrges-XCIntroduction to Postrges-XC
Introduction to Postrges-XC
 
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data AnalyticsSupersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
Supersized PostgreSQL: Postgres-XL for Scale-Out OLTP and Big Data Analytics
 
Directory Write Leases in MagFS
Directory Write Leases in MagFSDirectory Write Leases in MagFS
Directory Write Leases in MagFS
 
Maginatics Cloud Storage Platform - MCSP 3.0 Technical Highlights
Maginatics Cloud Storage Platform - MCSP 3.0 Technical HighlightsMaginatics Cloud Storage Platform - MCSP 3.0 Technical Highlights
Maginatics Cloud Storage Platform - MCSP 3.0 Technical Highlights
 
Maginatics @ SDC 2013: Architecting An Enterprise Storage Platform Using Obje...
Maginatics @ SDC 2013: Architecting An Enterprise Storage Platform Using Obje...Maginatics @ SDC 2013: Architecting An Enterprise Storage Platform Using Obje...
Maginatics @ SDC 2013: Architecting An Enterprise Storage Platform Using Obje...
 
140116 max scale-for_madrid_meetup
140116 max scale-for_madrid_meetup140116 max scale-for_madrid_meetup
140116 max scale-for_madrid_meetup
 
Red Hat Gluster Storage - Direction, Roadmap and Use-Cases
Red Hat Gluster Storage - Direction, Roadmap and Use-CasesRed Hat Gluster Storage - Direction, Roadmap and Use-Cases
Red Hat Gluster Storage - Direction, Roadmap and Use-Cases
 
[B5]memcached scalability-bag lru-deview-100
[B5]memcached scalability-bag lru-deview-100[B5]memcached scalability-bag lru-deview-100
[B5]memcached scalability-bag lru-deview-100
 
Cassandra - A Distributed Database System
Cassandra - A Distributed Database System Cassandra - A Distributed Database System
Cassandra - A Distributed Database System
 
final_rac
final_racfinal_rac
final_rac
 
Triangle MySQL User Group MySQL Fabric Presentation Feb 12th, 2015
Triangle MySQL User Group MySQL Fabric Presentation Feb 12th, 2015Triangle MySQL User Group MySQL Fabric Presentation Feb 12th, 2015
Triangle MySQL User Group MySQL Fabric Presentation Feb 12th, 2015
 
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres OpenKoichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres Open
 
Scaling Out Tier Based Applications
Scaling Out Tier Based ApplicationsScaling Out Tier Based Applications
Scaling Out Tier Based Applications
 
Distributed Caching Essential Lessons (Ts 1402)
Distributed Caching   Essential Lessons (Ts 1402)Distributed Caching   Essential Lessons (Ts 1402)
Distributed Caching Essential Lessons (Ts 1402)
 
Hbase: an introduction
Hbase: an introductionHbase: an introduction
Hbase: an introduction
 
As fast as a grid, as safe as a database
As fast as a grid, as safe as a databaseAs fast as a grid, as safe as a database
As fast as a grid, as safe as a database
 
Moskva Architecture Highload
Moskva Architecture HighloadMoskva Architecture Highload
Moskva Architecture Highload
 
Data has a better idea the in-memory data grid
Data has a better idea   the in-memory data gridData has a better idea   the in-memory data grid
Data has a better idea the in-memory data grid
 
HDFS for Geographically Distributed File System
HDFS for Geographically Distributed File SystemHDFS for Geographically Distributed File System
HDFS for Geographically Distributed File System
 

Similaire à Ch20 (20)

Sayed database system_architecture
Sayed database system_architectureSayed database system_architecture
Sayed database system_architecture
 
Ch17
Ch17Ch17
Ch17
 
Database architecture
Database architectureDatabase architecture
Database architecture
 
Ch20
Ch20Ch20
Ch20
 
Ch18
Ch18Ch18
Ch18
 
Ch24
Ch24Ch24
Ch24
 
Database management system chapter15
Database management system chapter15Database management system chapter15
Database management system chapter15
 
Ch23
Ch23Ch23
Ch23
 
Ch23
Ch23Ch23
Ch23
 
Ch8
Ch8Ch8
Ch8
 
Database System Architectures
Database System ArchitecturesDatabase System Architectures
Database System Architectures
 
Csc concepts
Csc conceptsCsc concepts
Csc concepts
 
Creating a Centralized Consumer Profile Management Service with WebSphere Dat...
Creating a Centralized Consumer Profile Management Service with WebSphere Dat...Creating a Centralized Consumer Profile Management Service with WebSphere Dat...
Creating a Centralized Consumer Profile Management Service with WebSphere Dat...
 
Client server computing
Client server computingClient server computing
Client server computing
 
Client-Server Computing
Client-Server ComputingClient-Server Computing
Client-Server Computing
 
Session18 Madduri
Session18  MadduriSession18  Madduri
Session18 Madduri
 
Server system architecture
Server system architectureServer system architecture
Server system architecture
 
Distributed_databases.pdf
Distributed_databases.pdfDistributed_databases.pdf
Distributed_databases.pdf
 
Ch21
Ch21Ch21
Ch21
 
Enterprise Use Case Webinar - PaaS Metering and Monitoring
Enterprise Use Case Webinar - PaaS Metering and Monitoring Enterprise Use Case Webinar - PaaS Metering and Monitoring
Enterprise Use Case Webinar - PaaS Metering and Monitoring
 

Plus de Subhankar Chowdhury (18)

Ch19
Ch19Ch19
Ch19
 
Ch17
Ch17Ch17
Ch17
 
Ch16
Ch16Ch16
Ch16
 
Ch14
Ch14Ch14
Ch14
 
Ch13
Ch13Ch13
Ch13
 
Ch12
Ch12Ch12
Ch12
 
Ch11
Ch11Ch11
Ch11
 
Ch10
Ch10Ch10
Ch10
 
Ch9
Ch9Ch9
Ch9
 
Ch7
Ch7Ch7
Ch7
 
Ch6
Ch6Ch6
Ch6
 
Ch5
Ch5Ch5
Ch5
 
Ch4
Ch4Ch4
Ch4
 
Ch3
Ch3Ch3
Ch3
 
Ch2
Ch2Ch2
Ch2
 
Ch1
Ch1Ch1
Ch1
 
Ch22
Ch22Ch22
Ch22
 
Ch21
Ch21Ch21
Ch21
 

Dernier

4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxAnupam32727
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesVijayaLaxmi84
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptxmary850239
 
Geoffrey Chaucer Works II UGC NET JRF TGT PGT MA PHD Entrance Exam II History...
Geoffrey Chaucer Works II UGC NET JRF TGT PGT MA PHD Entrance Exam II History...Geoffrey Chaucer Works II UGC NET JRF TGT PGT MA PHD Entrance Exam II History...
Geoffrey Chaucer Works II UGC NET JRF TGT PGT MA PHD Entrance Exam II History...DrVipulVKapoor
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfChristalin Nelson
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
An Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPAn Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPCeline George
 

Dernier (20)

4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptxCLASSIFICATION OF ANTI - CANCER DRUGS.pptx
CLASSIFICATION OF ANTI - CANCER DRUGS.pptx
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their uses
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
Introduction to Research ,Need for research, Need for design of Experiments, ...
Introduction to Research ,Need for research, Need for design of Experiments, ...Introduction to Research ,Need for research, Need for design of Experiments, ...
Introduction to Research ,Need for research, Need for design of Experiments, ...
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx
 
Geoffrey Chaucer Works II UGC NET JRF TGT PGT MA PHD Entrance Exam II History...
Geoffrey Chaucer Works II UGC NET JRF TGT PGT MA PHD Entrance Exam II History...Geoffrey Chaucer Works II UGC NET JRF TGT PGT MA PHD Entrance Exam II History...
Geoffrey Chaucer Works II UGC NET JRF TGT PGT MA PHD Entrance Exam II History...
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdf
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
 
An Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERPAn Overview of the Calendar App in Odoo 17 ERP
An Overview of the Calendar App in Odoo 17 ERP
 

Ch20

  • 1. Chapter 20: Database System Architectures  Version: Oct 5, 2006 Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See www.db­book.com for conditions on re­use 
  • 2. Chapter 20:  Database System Architectures s Centralized and Client­Server Systems s Server System Architectures s Parallel Systems s Distributed Systems s Network Types Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 3. Centralized Systems s Run on a single computer system and do not interact with other  computer systems. s General­purpose computer system: one to a few CPUs and a number  of device controllers that are connected through a common bus that  provides access to shared memory. s Single­user system (e.g., personal computer or workstation): desk­top  unit, single user, usually has only one CPU  and one or two hard  disks; the OS may support only one user. s Multi­user system: more disks, more memory, multiple CPUs, and a  multi­user OS. Serve a large number of users who are connected to  the system vie terminals. Often called server systems. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 4. A Centralized Computer System Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 5. Client­Server Systems s Server systems satisfy requests generated at m client systems, whose general  structure is shown below: Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 6. Client­Server Systems (Cont.) s Database functionality can be divided into: q Back­end: manages access structures, query evaluation and  optimization, concurrency control and recovery. q Front­end: consists of tools such as forms, report­writers, and  graphical user interface facilities. s The interface between the front­end and the back­end is through SQL or  through an application program interface. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 7. Client­Server Systems (Cont.) s Advantages of replacing mainframes with networks of workstations or  personal computers connected to back­end server machines: q better functionality for the cost q flexibility in locating resources and expanding facilities q better user interfaces q easier maintenance Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 8. Server System Architecture s Server systems can be broadly categorized into two kinds: q transaction servers which are widely used in relational database  systems, and q data servers, used in object­oriented database systems Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 9. Transaction Servers s Also called query server systems or SQL server systems q Clients send requests to the server q Transactions are executed at the server q Results are shipped back to the client. s Requests are specified in SQL, and communicated to the server  through a remote procedure call (RPC) mechanism. s Transactional RPC allows many RPC calls to form a transaction. s 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. s JDBC standard is similar to ODBC, for Java Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 10. Transaction Server Process Structure s A typical transaction server consists of multiple processes accessing  data in shared memory. s Server processes q These receive user queries (transactions), execute them and send  results back q Processes may be multithreaded, allowing a single process to  execute several user queries concurrently q Typically multiple multithreaded server processes s Lock manager process q More on this later s Database writer process q Output modified buffer blocks to disks continually Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 11. Transaction Server Processes (Cont.) s Log writer process q Server processes simply add log records to log record buffer q Log writer process outputs log records to stable storage.  s Checkpoint process q Performs periodic checkpoints s Process monitor process q Monitors other processes, and takes recovery actions if any of the other  processes fail  E.g. aborting any transactions being executed by a server process  and restarting it Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 13. Transaction System Processes (Cont.) s Shared memory contains shared data  q Buffer pool q Lock table q Log buffer q Cached query plans (reused if same query submitted again) s All database processes can access shared memory s To ensure that no two processes are accessing the same data structure  at the same time, databases systems implement mutual exclusion  using either q Operating system semaphores q Atomic instructions such as test­and­set s To avoid overhead of interprocess communication for lock  request/grant, each database process operates directly on the lock  table  q instead of sending requests to lock manager process s Lock manager process still used for deadlock detection Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 14. Data Servers s Used in high­speed LANs, in cases where q The clients are comparable in processing power to the server q The tasks to be executed are compute intensive. s Data are shipped to clients where processing is performed, and then  shipped results back to the server. s This architecture requires full back­end functionality at the clients. s Used in many object­oriented database systems  s Issues: q Page­Shipping versus Item­Shipping q Locking q Data Caching q Lock Caching Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 15. Data Servers (Cont.) s Page­shipping versus item­shipping q Smaller unit of shipping ⇒ more messages q Worth prefetching related items along with requested item q Page shipping can be thought of as a form of prefetching s Locking q Overhead of requesting and getting locks from server is high due  to message delays q Can grant locks on requested and prefetched items; with page  shipping, transaction is granted lock on whole page. q Locks on a prefetched item can be P{called back} by the server,  and returned by client transaction if the prefetched item has not  been used.   q Locks on the page can be deescalated to locks on items in the  page when there are lock conflicts. Locks on unused items can  then be returned to server. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 16. Data Servers (Cont.) s Data Caching q Data can be cached at client even in between transactions q But check that data is up­to­date before it is used (cache coherency) q Check can be done when requesting lock on data item s Lock Caching q Locks can be retained by client system even in between transactions q Transactions can acquire cached locks locally, without contacting  server q Server calls back locks from clients when it receives conflicting lock  request.  Client returns lock once no local transaction is using it. q Similar to deescalation, but across transactions. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 17. Parallel Systems s Parallel database systems consist of multiple processors and multiple  disks connected by a fast interconnection network. s A coarse­grain parallel machine consists of a small number of  powerful processors s A massively parallel or fine grain parallel machine utilizes  thousands of smaller processors. s Two main performance measures: q throughput ­­­ the number of tasks that can be completed in a  given time interval q response time ­­­ the amount of time it takes to complete a single  task from the time it is submitted Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 18. Speed­Up and Scale­Up s Speedup: a fixed­sized problem executing on a small system is given  to a system which is N­times larger. q Measured by: speedup = small system elapsed time                   large system elapsed time q Speedup is linear if equation equals N. s Scaleup: increase the size of both the problem and the system q N­times larger system used to perform N­times larger job q Measured by: scaleup = small system small problem elapsed time                    big system big problem elapsed time  q Scale up is linear if equation equals 1. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 19. Speedup Speedup Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 20. Scaleup Scaleup Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 21. Batch and Transaction Scaleup s Batch scaleup: q A single large job; typical of most decision support queries and  scientific simulation. q Use an N­times larger computer on N­times larger problem. s Transaction scaleup: q Numerous small queries submitted by independent users to a  shared database; typical transaction processing and timesharing  systems. q 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. q Well­suited to parallel execution. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 22. Factors Limiting Speedup and Scaleup Speedup and scaleup are often sublinear due to: s Startup costs: Cost of starting up multiple processes may dominate  computation time, if the degree of parallelism is high. s 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. s 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. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 23. Interconnection Network Architectures s Bus. System components send data on and receive data from a single  communication bus; q Does not scale well with increasing parallelism. s Mesh. Components are arranged as nodes in a grid, and each  component is connected to all adjacent components q Communication links grow with growing number of components,  and so scales better.   q But may require 2√n hops to send message to a node (or √n with  wraparound connections at edge of grid). s Hypercube.  Components are numbered in binary;  components are  connected to one another if their binary representations differ in  exactly one bit. q n components are connected to log(n) other components and can  reach each other via at most log(n) links; reduces communication  delays. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 24. Interconnection Architectures Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 25. Parallel Database Architectures s Shared memory ­­ processors share a common memory s Shared disk ­­ processors share a common disk s Shared nothing ­­ processors share neither a common memory nor  common disk s Hierarchical ­­ hybrid of the above architectures Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 26. Parallel Database Architectures Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 27. Shared Memory s Processors and disks have access to a common memory, typically via  a bus or through an interconnection network. s Extremely efficient communication between processors — data in  shared memory can be accessed by any processor without having to  move it using software. s Downside – architecture is not scalable beyond 32 or 64 processors  since the bus or the interconnection network becomes a bottleneck s Widely used for lower degrees of parallelism (4 to 8). Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 28. Shared Disk s All processors can directly access all disks via an interconnection  network, but the processors have private memories. q The memory bus is not a bottleneck q Architecture provides a degree of fault­tolerance — if a processor  fails, the other processors can take over its tasks since the database  is resident on disks that are accessible from all processors. s Examples:  IBM Sysplex and DEC clusters (now part of Compaq)  running Rdb (now Oracle Rdb) were early commercial users  s Downside: bottleneck now occurs at interconnection to the disk  subsystem. s Shared­disk systems can scale to a somewhat larger number of  processors, but communication between processors is slower. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 29. Shared Nothing s Node consists of a processor, memory, and one or more disks.  Processors at one node  communicate with another processor at  another node using an interconnection network. A node functions as  the server for the data on the disk or disks the node owns. s Examples: Teradata, Tandem, Oracle­n CUBE s Data accessed from local disks (and local memory accesses)  do not  pass through interconnection network, thereby minimizing the  interference of resource sharing. s Shared­nothing multiprocessors can be scaled up to thousands of  processors without interference. s Main drawback: cost of communication and non­local disk access;  sending data involves software interaction at both ends. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 30. Hierarchical s Combines characteristics of shared­memory, shared­disk, and shared­ nothing architectures. s Top level is a shared­nothing architecture –  nodes connected by an  interconnection network, and do not share disks or memory with each  other. s Each node of the system could be a shared­memory system with a  few processors. s Alternatively, each node could be a shared­disk system, and each of  the systems sharing a set of disks could be a shared­memory system. s Reduce the complexity of programming such systems by distributed  virtual­memory architectures q Also called non­uniform memory architecture (NUMA) Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 31. Distributed Systems s Data spread over multiple machines (also referred to as sites or  nodes). s Network interconnects the machines s Data shared by users on multiple machines Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 32. Distributed Databases s Homogeneous distributed databases q Same software/schema on all sites, data may be partitioned  among sites q Goal: provide a view of a single database, hiding details of  distribution s Heterogeneous distributed databases q Different software/schema on different sites q Goal: integrate existing databases to provide useful functionality s Differentiate between local and global transactions q A local transaction accesses data in the single site at which the  transaction was initiated. q A global transaction either accesses data in a site different from  the one at which the transaction was initiated or accesses data in  several different sites. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 33. Trade­offs in Distributed Systems s Sharing data – users at one site able to access the data residing at  some other sites. s Autonomy – each site is able to retain a degree of control over data  stored locally. s Higher system availability through redundancy — data can be  replicated at remote sites, and system can function even if a site fails. s Disadvantage: added complexity required to ensure proper  coordination among sites. q Software development cost. q Greater potential for bugs. q Increased processing overhead. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 34. Implementation Issues for Distributed  Databases  s Atomicity needed even for transactions that update data at multiple sites s The two­phase commit protocol (2PC) is used to ensure atomicity q Basic idea:  each site executes transaction until just before commit,  and the leaves final decision to a coordinator q Each site must follow decision of coordinator, even if there is a failure  while waiting for coordinators decision s 2PC is not always appropriate:  other transaction models based on  persistent messaging, and workflows, are also used  s Distributed concurrency control (and deadlock detection) required s Data items may be replicated to improve data availability s Details of above in Chapter 22 Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 35. Network Types s Local­area networks (LANs) – composed of processors that are  distributed over small geographical areas, such as a single building or  a few adjacent buildings.  s Wide­area networks (WANs) – composed of processors distributed  over a large geographical area. Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 36. Networks Types (Cont.) s WANs with continuous connection (e.g. the Internet) are needed for  implementing distributed database systems s Groupware applications such as Lotus notes can work on WANs with  discontinuous connection: q Data is replicated. q Updates are propagated to replicas periodically. q Copies of data may be updated independently. q Non­serializable executions can thus result. Resolution is  application dependent.    Database System Concepts ­ 5th Edition 20.<number> ©Silberschatz, Korth and Sudarshan
  • 37. End of Chapter Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See www.db­book.com for conditions on re­use