CS212 Distributed Database Systems Distributed DBMS Architecture Part

CS-212 Distributed Database Systems Distributed DBMS Architecture Part II Instructor: Ms. Mariam Nosheen Computer Science Department LCWU, Lhr

DDBMS Architecture The Client/Server Database Environment Ms. Mariam Nosheen CS- 212 Distributed Database Systems

DDBMS Architecture Client/Server Systems • Networked computing model • Processes distributed between clients and servers • Client – Workstation (usually a PC) that requests and uses a service • Server – Computer (PC/mini/mainframe) that provides a service • For DBMS, server is a database server Ms. Mariam Nosheen CS- 212 Distributed Database Systems 3

DDBMS Architecture Application Logic in C/S Systems • Presentation Logic – Input – keyboard/mouse – Output – monitor/printer • Processing Logic – I/O processing – Business rules – Data management GUI Interface Procedures, functions, programs • Storage Logic – Data storage/retrieval Ms. Mariam Nosheen DBMS activities CS- 212 Distributed Database Systems 4

DDBMS Architecture Client/Server Architectures • File Server Architecture • Database Server Architecture • Three-tier Architecture Ms. Mariam Nosheen CS- 212 Distributed Database Systems 5

DDBMS Architecture File Server Architecture • All processing is done at the PC that requested the data • Entire files are transferred from the server to the client for processing. • Problems: – Huge amount of data transfer on the network – Each client must contain full DBMS • Heavy resource demand on clients • Client DBMSs must recognize shared locks, integrity checks, etc. Ms. Mariam Nosheen CS- 212 Distributed Database Systems 6

DDBMS Architecture File Server Architecture Ms. Mariam Nosheen CS- 212 Distributed Database Systems 7

DDBMS Architecture Database Server Architectures • 2 -tiered approach • Client is responsible for – I/O processing logic – Some business rules logic • Server performs all data storage and access processing DBMS is only on server • Advantages – – Clients do not have to be as powerful Greatly reduces data traffic on the network Improved data integrity since it is all processed centrally Stored procedures some business rules done on server Ms. Mariam Nosheen CS- 212 Distributed Database Systems 8

DDBMS Architecture Advantages of Stored Procedures • • Compiled SQL statements Reduced network traffic Improved security Improved data integrity Ms. Mariam Nosheen CS- 212 Distributed Database Systems 9

DDBMS Architecture Database server architecture DBMS only on server 10 Ms. Mariam Nosheen CS- 212 Distributed Database Systems

DDBMS Architecture Three-Tier Architectures • Three layers: GUI interface (I/O processing) – Client – Application server Business rules – Database server Data storage l Thin l Ms. Mariam Nosheen Browser Web Server DBMS Client PC just for user interface and a little application processing. Limited or no data storage (sometimes no hard drive) CS- 212 Distributed Database Systems 11

DDBMS Architecture Three-tier architecture Thinnest clients Business rules on separate server DBMS only on DB server 12 Ms. Mariam Nosheen CS- 212 Distributed Database Systems

DDBMS Architecture DISTRIBUTED DBMS ARCHITECTURE CLIENT / SERVER SYSTEMS • This provides two-level architecture which make it easier to manage the complexity of modern DBMSs and the complexity of distribution. • The server does most of the data management work (query processing and optimization, transaction management, storage management). • The client is the application and the user interface (management the data that is cached to the client, management the transaction locks). Ms. Mariam Nosheen CS- 212 Distributed Database Systems 13

DDBMS Architecture DISTRIBUTED DBMS ARCHITECTURE CLIENT / SERVER SYSTEMS • This architecture is quite common in relational systems where the communicationbetween the clients and the server(s) is at the level of SQL statements. 14 Ms. Mariam Nosheen CS- 212 Distributed Database Systems

DDBMS Architecture DISTRIBUTED DBMS ARCHITECTURE CLIENT / SERVER SYSTEMS Ms. Mariam Nosheen CS- 212 Distributed Database Systems 15

DDBMS Architecture DISTRIBUTED DBMS ARCHITECTURE CLIENT / SERVER SYSTEMS Multiple client - single server From a data management perspective, this is not much different from centralized databases since the database is stored on only one machine (the server) which also hosts the software to manage it. However, there are some differences from centralized systems in the way transactions are executed and caches are managed. Multiple client - multiple server In this case, two alternative management strategies are possible: either each client manages its own connection to the appropriate server or each client knows of only its “home server” which then communicates with other servers as required. Ms. Mariam Nosheen CS- 212 Distributed Database Systems 16

DDBMS Architecture Multiple Clients/Single Server Applications Client Services Communications High-level requests Filtered data only LAN Communications DBMS Services Database Ms. Mariam Nosheen CS- 212 Distributed Database Systems 17

DDBMS Architecture Task Distribution Application QL Interface … Programmatic Interface Communications Manager SQL query result table Communications Manager Query Optimizer Lock Manager Storage Manager Page & Cache Manager Database Ms. Mariam Nosheen CS- 212 Distributed Database Systems 18

DDBMS Architecture Advantages of Client-Server Architectures • More efficient division of labor • Better price/performance on client machines • Ability to use familiar tools on client machines • Client access to remote data (via standards) • Full DBMS functionality provided to client workstations • Overall better system price/performance Ms. Mariam Nosheen CS- 212 Distributed Database Systems 19

DDBMS Architecture Problems With Multiple-Client/Single Server • Server forms bottleneck • Server forms single point of failure • Database scaling difficult Ms. Mariam Nosheen CS- 212 Distributed Database Systems 20

DDBMS Architecture Multiple Clients/Multiple Servers Applications • directory Client • caching Services Communications • query decomposition • commit protocols Communications DBMS Services Database Ms. Mariam Nosheen LAN Communications DBMS Services Database CS- 212 Distributed Database Systems 21

DDBMS Architecture Server-to-Server • SQL interface Applications Client • programmatic Services Communications interface • other application support environments. Communications Ms. Mariam Nosheen LAN Communications DBMS Services Database CS- 212 Distributed Database Systems 22
- Slides: 22