Ch-6 Database System Architecture
Ch-6 Database System Architecture
Architecture
Database System Architecture
• Database system architecture is the framework that
defines how data is stored, accessed, managed and
secured within a database management system.
• It plays a crucial role in ensuring data reliability,
performance and security for various applications and
users.
• Database systems are mainly client/server, parallel
systems and distributed systems.
• Client/server database systems
Networking of computers allows some tasks to be
executed on a server system and some tasks to be
executed on client systems.
Database System Architecture
• Parallel Processing
To speed up the database-system activities and allowing
faster response to transactions as well as more transactions
per second.
• Distributed database
• It is not limited to one system, it is spread over different
sites i.e. on multiple computers or over a network of
computers.
• There are a number of databases that maybe
geographically distributed all over the world.
• A distributed DBMS manages the distributed database in a
manner so that it appears as one single database to users.
• It is a collection of multiple interconnected databases,
which are spread physically across various locations that
communicate via a computer network.
CENTRALIZED AND CLIENT/SERVER
ARCHITECTURES
• Database resides on a single computer system that allows access by
remote terminals.
Centralized Systems
• Centralized database systems will run on a single computer system
and do not interact with other computer systems.
– General-purpose computer system: This system has one or more
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 PC or Workstation): This system has Desktop
unit, single user. It usually has only one CPU and one or two hard
disk. OS may support only one user.
– Multi-user system : Has more disks, more memory, multiple CPUs & a
multi-user OS Serve a large number of users who are connected to the
.,
Shared common memory Shared common disk Share neither common memory
nor disk
Shared Memory Architecture
• Multiple CPUs that are attached to an interconnection
network or bus network.
• They are able to share a single or global main memory and
common disk arrays.
• Efficient communication between multiple processor.
• It is also known as Symmetric multiprocessing (SMP).
• This architecture has a very wide range which starts from
personal workstations that support a few microprocessors
in parallel via RISC.
Advantages :
• It has high-speed data access for a limited number of
processors.
• The communication is efficient.
Disadvantages
– Architecture is not scalable beyond 32 or 64 processors
– Widely used for lower degrees of parallelism(4 to 8).
Shared Disk Architecture
• Various CPUs are attached to an interconnection network.
• Each CPU has its own memory and all of them have access to the
same disk.
• Here the memory is not shared among CPUs therefore each node
has its own copy of the operating system and DBMS.
• It is a loosely coupled architecture optimized for applications that
are inherently centralized. They are also known as clusters.
Advantages :
• The interconnection network is no longer a bottleneck each CPU
has its own memory.
• Load-balancing
• There is better fault tolerance.
Disadvantages :
• If the number of CPUs increases, the problems of interference and
memory contentions also increase.
• There’s also exists a scalability problem.
Shared Nothing Architecture
• Multiple processor architecture in which each processor
has its own memory and disk storage.
• In this, multiple CPUs are attached to an interconnection
network through a node.
• No sharing of memory or disk resources is done. It is also
known as Massively parallel processing (MPP).
Advantages :
• It has better scalability as no sharing of resources is done
• Multiple CPUs can be added
Disadvantages:
• The cost of communications is higher as it involves sending
of data and software interaction at both ends
• The cost is higher than that of cost of shared disk
architectures.
Parallel Database Architecture
Hybrid Architecture
Hierarchical or Hybrid Architecture
• This architecture is a combination of shared
disk, shared memory and shared nothing
architectures.
• This architecture is scalable due to availability
of more memory and many processor.
• It is costly to other architecture.
Distributed Systems
Distributed Systems in Database Management Systems (DBMS) refer to a setup
where data and processing are spread across multiple interconnected computers
or nodes.
Distributed Systems
• Data Distribution: In this data is stored across multiple locations or
nodes, often in a network. Each node may hold a subset of the
database.
Advantages:
• Improved Performance: Data can be accessed locally, reducing latency.
• Scalability: Easy to add more nodes to handle increased load.
• Fault Tolerance: Redundancy can help in data recovery and fault
tolerance.
Disadvantages :
• Data Consistency: Ensuring data consistency across distributed nodes
can be complex.
• Network Overhead: Communication between nodes can introduce
delays and overhead.
• Security: Distributed systems require robust security measures to
protect data.
Types of distributed databases
• Homogeneous distributed databases
– It is a network of two or more databases (With the
same type of DBMS software) which can be stored on
one or more machines.
– In this system data can be accessed and modified
simultaneously on several databases in the network.
– Easy to handle.
– Example : Consider that we have three departments
using Oracle-9i for DBMS.
– If some changes are made in one department then it
would update the other department also.
• Heterogeneous distributed databases
– It is a network of two or more databases with different types of
DBMS software which can be stored on one or more machines.
– In this system data can be accessible to several databases in the
network with the help of generic connectivity (ODBC and JDBC).
• Difference between Homogeneous and Heterogeneous
Distributed databases:
– Homogeneous distributed databases maintain consistency by
using the same DBMS and data model at all sites.
– Heterogeneous distributed databases, on the other hand,
embrace diversity by allowing different DBMS types and data
models at different sites,.
• Differentiate between local and global transactions :
– A local transaction accesses data in the single site at which the
transaction was initiated.
– A global transaction either accesses data in a site different from
the one at which the transaction was initiated or accesses data
in several different sites.
Distributed Database Management Systems