Chapter 20:Database System Architectures Centralized and Client-Server Systems Server System Architectures Parallel Systems Distributed Systems Network Types Database System Concepts-5th Edition,Oct 5,2006 20.2 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 20.2 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Chapter 20: Database System Architectures Centralized and Client-Server Systems Server System Architectures Parallel Systems Distributed Systems Network Types
Centralized Systems Run on a single computer system and do not interact with other computer systems. 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. 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. 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,Oct 5,2006 20.3 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 20.3 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Centralized Systems Run on a single computer system and do not interact with other computer systems. 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. 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. 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
A Centralized Computer System mes日 keyboard onnter monitor disks CPU desk USB controler graphics controllet adapter memory Database System Concepts -5th Edition,Oct 5,2006 20.4 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 20.4 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 A Centralized Computer System
Client-Server Systems Server systems satisfy requests generated at m client systems,whose general structure is shown below: client client client client network server Database System Concepts-5th Edition,Oct 5,2006 20.5 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 20.5 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Client-Server Systems Server systems satisfy requests generated at m client systems, whose general structure is shown below:
Client-Server Systems(Cont.) Database functionality can be divided into: Back-end:manages access structures,query evaluation and optimization,concurrency control and recovery. Front-end:consists of tools such as forms,report-writers,and graphical user interface facilities. The interface between the front-end and the back-end is through SQL or through an application program interface. SOL user fors report data mining front end generation and analysis interface interface tools tools interface (SQL API) SQL engine back end Database System Concepts-5th Edition,Oct 5,2006 20.6 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 20.6 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Client-Server Systems (Cont.) Database functionality can be divided into: Back-end: manages access structures, query evaluation and optimization, concurrency control and recovery. Front-end: consists of tools such as forms, report-writers, and graphical user interface facilities. The interface between the front-end and the back-end is through SQL or through an application program interface
Client-Server Systems (Cont.) Advantages of replacing mainframes with networks of workstations or personal computers connected to back-end server machines: better functionality for the cost flexibility in locating resources and expanding facilities better user interfaces easier maintenance Database System Concepts-5th Edition,Oct 5,2006 20.7 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 20.7 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Client-Server Systems (Cont.) Advantages of replacing mainframes with networks of workstations or personal computers connected to back-end server machines: better functionality for the cost flexibility in locating resources and expanding facilities better user interfaces easier maintenance
Server System Architecture Server systems can be broadly categorized into two kinds: transaction servers which are widely used in relational database systems,and data servers,used in object-oriented database systems Database System Concepts-5th Edition,Oct 5,2006 20.8 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 20.8 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Server System Architecture Server systems can be broadly categorized into two kinds: transaction servers which are widely used in relational database systems, and data servers, used in object-oriented database systems
Transaction Servers Also called query server systems or SQL server systems Clients send requests to the server Transactions are executed at the server Results are shipped back to the client. Requests are specified in SQL,and communicated to the server through a remote procedure call(RPC)mechanism. Transactional RPC allows many RPC calls to form a transaction. 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. JDBC standard is similar to ODBC,for Java Database System Concepts-5th Edition,Oct 5,2006 20.9 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 20.9 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Transaction Servers Also called query server systems or SQL server systems Clients send requests to the server Transactions are executed at the server Results are shipped back to the client. Requests are specified in SQL, and communicated to the server through a remote procedure call (RPC) mechanism. Transactional RPC allows many RPC calls to form a transaction. 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. JDBC standard is similar to ODBC, for Java
Transaction Server Process Structure A typical transaction server consists of multiple processes accessing data in shared memory Server processes These receive user queries(transactions),execute them and send results back Processes may be multithreaded,allowing a single process to execute several user queries concurrently Typically multiple multithreaded server processes Lock manager process More on this later Database writer process Output modified buffer blocks to disks continually Database System Concepts-5th Edition,Oct 5,2006 20.10 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 20.10 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Transaction Server Process Structure A typical transaction server consists of multiple processes accessing data in shared memory. Server processes These receive user queries (transactions), execute them and send results back Processes may be multithreaded, allowing a single process to execute several user queries concurrently Typically multiple multithreaded server processes Lock manager process More on this later Database writer process Output modified buffer blocks to disks continually
Transaction Server Processes(Cont.) Log writer process Server processes simply add log records to log record buffer Log writer process outputs log records to stable storage. Checkpoint process Performs periodic checkpoints Process monitor process 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,Oct 5,2006 20.11 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 20.11 ©Silberschatz, Korth and Sudarshan th Edition, Oct 5, 2006 Transaction Server Processes (Cont.) Log writer process Server processes simply add log records to log record buffer Log writer process outputs log records to stable storage. Checkpoint process Performs periodic checkpoints Process monitor process 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