Академический Документы
Профессиональный Документы
Культура Документы
Outline
Overview Client-Server Database Architectures Parallel Database Architectures Architectures for Distributed Database Management Systems Transparency for Distributed Database Processing Distributed Database Processing
17-2
17-3
Timesharing Network
Terminal
Terminal
Terminal
17-4
Database
Client-Server Processing
Server
Client
Client
Client
Database
17-6
Client
Client
Client
Client
Database
Database
17-7
17-8
17-10
17-11
17-12
Design Issues
Division of processing: the allocation of tasks to clients and servers. Process management: interoperability among clients and servers and efficiently processing messages between clients and servers. Middleware: software for process management
17-13
Tasks to Distribute
Presentation: code to maintain the graphical user interface Validation: code to ensure the consistency of the database and user inputs Business logic: code to perform business functions Workflow: code to ensure completion of business processes Data access: code to extract data to answer queries and modify a database
17-14
Middleware
A software component that performs process management. Allow clients and servers to exist on different platforms. Allows servers to efficiently process messages from a large number of clients. Often located on a dedicated computer.
17-15
Middleware
17-16
Types of Middleware
Transaction-processing monitors: relieve the operating system of managing database processes Message-oriented middleware: maintain a queue of messages Object-request brokers: provide a high level of interoperability and message intelligence Data access middleware: provide a uniform interface to relational and non relational data using SQL
17-17
Two-Tier Architecture
SQL statements Database server
Database
Query results
17-18
Two-Tier Architecture
A PC client and a database server interact directly to request and transfer data. The PC client contains the user interface code. The server contains the data access logic. The PC client and the server share the validation and business logic.
17-19
Database
Database server
17-20
SQL statements
Application server
17-21
Three-Tier Architecture
To improve performance, the three-tier architecture adds another server layer either by a middleware server or an application server. The additional server software can reside on a separate computer. Alternatively, the additional server software can be distributed between the database server and PC clients.
17-22
Multiple-Tier Architecture
A client-server architecture with more than three layers: a PC client, a backend database server, an intervening middleware server, and application servers. Provides more flexibility on division of processing The application servers perform business logic and manage specialized kinds of data such as images.
17-23
Multiple-Tier Architecture
Application server
Application server
17-24
HTML
SQL
Web server
HTML
Database server
Database
17-25
Service requestor
Bind
Service provider
Service implementation
17-27
Parallel DBMS
Uses a collection of resources (processors, disks, and memory) to perform work in parallel Divide work among resources to achieve desired performance (scaleup and speedup) and availability. Uses high speed network, operating system, and storage system Purchase decision involves more than parallel DBMS
17-29
Basic Architectures
(a) SE (b) SD
N P P ... M P P M P ... M P M P M
(c) SN
N P ... M P M
... Legend P: processor M: memory N: high-speed network SE: shared everything SD: shared disk SN: shared nothing
...
...
17-30
Clustering Architectures
(a) Clustered disk (CD)
N P M P ... P M M
P M
P ... P M M
P M
P ... P M M
P M
P ... P M M
...
...
...
...
17-31
Design Issues
Load balancing: CN architecture most sensitive Cache coherence: CD architecture problem Interprocessor communication: CN architecture most sensitive Application transparency: no knowledge about parallelism
17-32
Cache fusion
SGA
LGWR
DBWR
GCS
GCS
DBWR
LGWR
Shared storage system Redo logs Legend LGWR: Log writer process DBWR: DB writer process GCS: Global cache service SGA: Shared global area DB files Redo logs
17-33
17-34
P M
...
P M
...
P M
...
...
...
...
...
Partition 1
Partition 2
Partition n
17-35
17-36
Global Requests
Product data Customer-order data
17-38
Component Architecture
GD
GD
DDM
GD
DB
DB
17-39
Schema Architecture I
External schema 1 External schema 2
...
External schema n
Conceptual schema
Fragmentation schema
Allocation schema
m Sites
Internal schema 1 Internal schema 2 Internal schema m
...
17-40
Schema Architecture II
Global external schema 1 Global external schema 2
...
m Sites
Site 1 local mapping schema Site 2 local mapping schema
...
...
17-41
Motivating Example
Custome r
CustNo
CustName CustCity CustState CustZip CustRegion
Product
ProdNo
1 Orde rLine 1
ProdNo OrdNo
OrdCity
Orde r
OrdNo
8 8 8
OrdDate OrdAmt CustNo
Inv e ntory
StockNo
QOH WarehouseNo ProdNo
8
17-43
17-44
CREATE FRAGMENT Denver-Inventory AS SELECT * FROM Inventory WHERE WareHouseNo = 1 CREATE FRAGMENT Seattle-Inventory AS SELECT * FROM Inventory WHERE WareHouseNo = 2
17-45
Fragmentation Transparency
Fragmentation transparency provides the highest level of data independence. Users formulate queries and transactions without knowledge of fragments (locations, or local formats). If fragments change, queries and transactions are not affected.
17-46
Location Transparency
Location transparency provides a lesser level of data independence than fragmentation transparency. Users need to reference fragments in formulating queries and transactions. However, knowledge of locations and local formats is not necessary.
17-47
17-48
17-49
Oracle Links
One way link from local to remote Support remote access to other users objects Necessary to have knowledge of remote database objects Use synonyms and views with links to reduce remote database knowledge
17-50
17-53
Centralized Coordination
Lock status Lock request Central coordinator
Subtransaction 1 at Site x
...
Subtransaction n at Site z
17-55
Participant
Voting phase
2
Force updates to disk. If no failure, Write Ready-Commit to log. Send Ready vote. Else send Abort vote.
3
If all sites vote ready before timeout, Write Global Commit record. Decision phase Send Commit messages. Wait for Acknowledgments. Else send Abort messages.
4
Write Commit to log. Release locks. Send acknowledgment.
5
Wait for acknowledgments. Resend Commit messages if necessary. Write global end of transaction.
17-57
Summary
Utilizing distributed processing and data can significantly improve DBMS services but at the cost of new design challenges. Client-server architectures provide alternatives among cost, complexity, and benefit levels. Parallel database processing provides improved performance (speedup and scaleup) and availability. Architectures for distributed DBMSs differ in the integration of the local databases and level of data independence.
17-58