Database System Architectures. Client-server Database System Parallel Database System Distributed Database System. Wei Jiang. Centralized Systems. CPU. Disk Controller. Printer Controller. Tape-drive Controller. System bus. Memory Controller. Memory. Single-user system
A desktop unit used by a single person
Only one CPU, one or two disk
It serves a large number of users who are connected to system via terminals
More disks, more memory, multiple CPUs
Databases designed for Single-processor machines provide multitasking
General structure of a client-server System
Front-end and back-end functionality
Provide an interface to which client can send requests to perform an action, in response to which they execute the action and send back results to the client. Requests may be specified by using SQL, or through a specialized application program interface
Allow clients to interact with the servers by making requests to read or update data, in units such as files or pages.
For example, file servers provide a file-system interface where clients can create, update,read and delete files.
Transaction Server Process Structure
The shared memory:
Buffer pool, Lock table, Log buffer,Cached query plans
Mutual exclusion rule
2)a massively parallel machine
1)throughput: the number of tasks that can be completed in a time interval
2)response time: the amount of time it takes to complete a single task from the time it is submitted
Def: Running a given task in less time by increasing the degree of parallelism
Goal: to process the task in time inversely proportional to the number of processors and disks allocated.
Calculation: speedup is Ts/Tn when the larger system has N times the resources of smaller system
Type: 1)linear speedup: N
2)sublinear speedup: <N
Def: the ability to process larger tasks in the same amount of time by providing more resources.
Calculation: Ts / Ta
(Ts-execution time of tasks Q on machine with size Ms;
Ta-execution time of tasks N*Q on machine with size N*Ms)
Type: 1)linear scaleup: Ts = Ta
2)sublinear scaleup: Ta > Ts
Two kinds of scaleup
The factors work against efficient parallel operation
Bus: send and receive data from a a single communication bus.It can handle communication from only one component at a time. Work well for small numbers of processors, but not scale well with increasing parallelism
Mesh: The number of communication links grows as the number of components grows, and work well with increasing parallelism
Hypercube: The components are numbered in binary, each of the n components is connected to log(n) other components. The communication delays are lower than mesh
--Def: each node of machine consists of a processor, memory, and one or more disks.
--strength: more scalable and easily support a large number of processors.
--weakness: cost high
--Def: combines the above three
Def: The database is stored on several computers which communicate with each other through communication media.
The main difference between Distributed database and share-nothing parallel database:
1)the databases are separated geographically, so a slow interconnection
2)there exist a local transaction and global transaction
The reasons for building Distributed System: