Transcription of Distributed Database Systems - Forsiden
1 1 Distributed Database Systems Vera Goebel Department of Informatics University of Oslo 2011 2 Contents Review: Layered DBMS Architecture Distributed DBMS Architectures DDBMS Taxonomy Client/Server Models Key Problems of Distributed DBMS Distributed data modeling Distributed query processing & optimization Distributed transaction management Concurrency Control Recovery 3 Functional Layers of a DBMS Database Applications Data Model / View Management Semantic Integrity Control / Authorization Query Processing and Optimization Storage Structures Buffer Management Concurrency Control / Logging Interface Control
2 Compilation Execution Data Access Consistency Transaction Management 4 Dependencies among DBMS components Log component (with savepoint mgmt) Lock component System Buffer Mgmt Central Components Access Path Mgmt Transaction Mgmt Sorting component Indicates a dependency 5 Centralized DBS logically integrated physically centralized network T1 T2 T4 T3 T5 DBS Traditionally: one large mainframe DBMS + n stupid terminals 6 Distributed DBS Data logically integrated ( , access based on one schema) Data physically Distributed among multiple Database nodes Processing is Distributed among multiple Database nodes network T1 T2 T3 DBS1 DBS3 DBS2 Traditionally: m mainframes for the DBMSs + n terminals Why a Distributed DBS?
3 Performance via parallel execution - more users - quick response More data volume - max disks on multiple nodes 7 Centralized DBMS Distributed DBMS Homogeneous DBMS Centralized Heterogeneous DBMS Homogeneous DBMS Distributed Heterogeneous DBMS DBMS implementation Alternatives Distribution Heterogeneity Autonomy Centralized Homog. Distributed Homog. Federated DBMS Distributed Heterog. Federated DBMS Centralized Heterog. Federated DBMS Client/Server Distribution Centralized Homog. Distributed Multi-DBMS Distributed Heterog.
4 Multi-DBMS Centralized Heterog. Multi-DBMS Federated DBMS Multi-DBMS 8 Common DBMS Architectural Configurations No Autonomy Federated Multi N1 N3 N4 N2 D3 D2 D4 D1 D3 D1 D2 D4 GTM & SM Fully integrated nodes Complete cooperation on: - Data Schema - Transaction Mgmt Fully aware of all other nodes in the DDBS Independent DBMSs Implement some cooperation functions : - Transaction Mgmt - Schema mapping Aware of other DBSs in the federation Fully independent DBMSs Independent, global manager tries to coordinate the DBMSs using only existing DBMS services Unaware of GTM and other DBSs in the MultiDBS 9 Parallel Database System Platforms (Non-autonomous Distributed DBMS) Shared Everything Disk 1 Disk p.
5 Fast Interconnection Network Proc1 ProcN Proc2 .. Mem1 Mem2 MemM .. Typically a special-purpose hardware configuration, but this can be emulated in software. Shared Nothing Disk 1 Disk N .. Fast Interconnection Network Proc1 ProcN Mem1 MemN Can be a special-purpose hardware configuration, or a network of workstations. 10 Distributed DBMS Advantages: Improved performance Efficiency Extensibility (addition of new nodes) Transparency of distribution Storage of data Query execution Autonomy of individual nodes Problems: Complexity of design and implementation Data consistency Safety Failure recovery 11 Client/Server Database Systems The Simple Case of Distributed Database Systems ?
6 12 Client/Server Environments objects stored and administered on server objects processed (accessed and modified) on workstations [sometimes on the server too] CPU-time intensive applications on workstations GUIs, design tools Use client system local storage capabilities combination with Distributed DBS services => Distributed server architecture data (object) server + n smart clients (workstations) 13 Clients with Centralized Server Architecture Disk 1 Disk n .. Data Server Database local communication network interface Database functions workstations 14 Clients with Distributed Server Architecture Disk 1 Disk n.
7 Data Server 1 Database local communication network interface local data mgnt. functions workstations Data Server m Distributed DBMS .. Disk 1 Disk p .. Database interface local data mgnt. functions Distributed DBMS 15 Clients with Data Server Approach Disk 1 Disk n .. Application Server Data Server Database communication channel user interface query parsing data server interface application server interface Database functions 3-tier client/server 16 In the Client/Server DBMS Architecture, how are the DB services organized?
8 There are several architectural options! 17 Client/Server Architectures Relational Application client process server process SQL cursor management Object-Oriented Application client process server process objects, pages, or files object/page cache management DBMS 18 Object Server Architecture Object Cache Page Cache Log/Lock Manager Object Manager Storage Allocation and I/O objects object references queries method calls locks log records Object Cache Application Object Manager client process server process File/Index Manager Page Cache Manager Database 19 Object Server Architecture - summary Unit of transfer.
9 Object(s) Server understands the object concept and can execute methods most DBMS functionality is replicated on client(s) and server(s) Advantages: - server and client can run methods, workload can be balanced - simplifies concurrency control design (centralized in server) - implementation of object-level locking - low cost for enforcing constraints on objects Disadvantages/problems: - remote procedure calls (RPC) for object references - complex server design - client cache consistency problems - page-level locking, objects get copied multiple times, large objects 20 Page Server Architecture Page Cache Database Log/Lock Manager Page Cache Manager Storage Allocation and I/O pages page references locks log records server process client process Object Cache Page Cache Application Object Manager File/Index Manager Page Cache Manager 21 Page Server Architecture - summary unit of transfer.
10 Page(s) server deals only with pages (understands no object semantics) server functionality: storage/retrieval of page(s), concurrency control, recovery advantages: - most DBMS functionality at client - page transfer -> server overhead minimized - more clients can be supported - object clustering improves performance considerably disadvantages/problems: - method execution only on clients - object-level locking - object clustering - large client buffer pool required 22 File Server Architecture Database Log/Lock Manager Space Allocation locks log records server process pages page references NFS Object Cache Application Object Manager client process File/Index Manager Page Cache Manager Page Cache 23 File Server Architecture - summary unit of transfer.