Chapter 17:Database System Architectures Centralized and Client-Server Systems Server System Architectures Parallel Systems Distributed Systems Network Types Database System Concepts-6th Edition 17.2 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 17.2 ©Silberschatz, Korth and Sudarshan th Edition Chapter 17: 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-6th Edition 17.3 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 17.3 ©Silberschatz, Korth and Sudarshan th Edition 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 mouse keyboard printer monitor disks on-line CPU disk USB controller graphics controller adapter memory Database System Concepts-6th Edition 17.4 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 17.4 ©Silberschatz, Korth and Sudarshan th Edition 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-6th Edition 17.5 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 17.5 ©Silberschatz, Korth and Sudarshan th Edition 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. SQL user forms report data mining front end and analysis interface interface generation tools tools interface (SQL API) SQL engine back end Database System Concepts-6th Edition 17.6 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 17.6 ©Silberschatz, Korth and Sudarshan th Edition 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-6th Edition 17.7 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 17.7 ©Silberschatz, Korth and Sudarshan th Edition 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-6th Edition 17.8 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 17.8 ©Silberschatz, Korth and Sudarshan th Edition 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-6th Edition 17.9 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 17.9 ©Silberschatz, Korth and Sudarshan th Edition 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-6th Edition 17.10 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 17.10 ©Silberschatz, Korth and Sudarshan th Edition 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-6th Edition 17.11 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 17.11 ©Silberschatz, Korth and Sudarshan th Edition 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