0% found this document useful (0 votes)
16 views41 pages

Ch-6 Database System Architecture

Database system architecture defines how data is stored, accessed, managed, and secured, playing a crucial role in data reliability and performance. It includes client/server, parallel, and distributed systems, with various architectures such as centralized, two-tier, and three-tier models. Each architecture has its advantages and disadvantages, impacting scalability, security, and maintenance costs.

Uploaded by

rohitgadade2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views41 pages

Ch-6 Database System Architecture

Database system architecture defines how data is stored, accessed, managed, and secured, playing a crucial role in data reliability and performance. It includes client/server, parallel, and distributed systems, with various architectures such as centralized, two-tier, and three-tier models. Each architecture has its advantages and disadvantages, impacting scalability, security, and maintenance costs.

Uploaded by

rohitgadade2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Ch-6 Database System

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
.,

system via terminals. Are often called server systems.


• Database systems designed for use by single users
Centralized Systems

•Centralized systems have a single point of control or


authority where all data processing and decision-making
occur.
•They lack distribution of resources or decision-making
power, making them efficient but vulnerable to single points
of failure.
Drawbacks Of Centralized Systems
• Single Point of Failure: A centralized system has a single point of failure. If
the central server fails then the entire system becomes inaccessible
• Data Security Concerns: All data is stored on a single server, making it a
tempting target for security breaches. If a breach occurs, it can result in
the exposure of sensitive information for the entire organization.
• High Maintenance Costs: Maintaining and upgrading a centralized
database system can be expensive, as it requires substantial hardware and
software investments.
• Limited Autonomy: Users or departments may have limited control over
their data and processes in a centralized system, leading to inefficiencies
and delays in decision-making.
• Lack of Flexibility: Centralized systems can be less adaptable to changing
business needs or technological advancements, making it difficult to
implement new features or technologies.
Client-Server Architecture
• It is divided between two types of entities: clients
(front end) and servers(back end).
• The front end of a database system consists of
tools such as the SQL user interface, forms
interfaces, report generation tools and data
mining and analysis tools.
• The back end manages access structures, query
evaluation and optimization, concurrency control,
and recovery.
• Interface is a application program between front
end & back end
Client-Server Architecture
Clients:
• Clients are user devices or applications that request services or resources
from servers.
• They typically initiate communication, send requests and display results to
users. Examples include web browsers, mobile apps and email clients.
Servers:
• Servers are powerful computers or software applications that provide
services or resources to clients.
• They listen for incoming requests, process them and send back responses.
• Servers can specialize in various functions such as file storage, database
management, web hosting or application processing, maintain security &
privacy, avoid unauthorized access of data
Network Interface:
• Clients are connected to the server by network interface.
• It is useful in connecting the server interface with the user interface so
that the server can run his applications over its clients.
• There are more than one server. Sometimes, a server is used as Database
Server, other as Application Server, other as Backup Server etc.
Types of Client Server Architecture
• Client-server architecture can take on different forms. some
common types of client-server architectures:
• Single-Tier Client/Server Architecture.
– Single-tier architecture is the first type of client/server
computing model.
– This system is used on a personal computer.
– Database is centralized , which means the DBMS software and
data in one location and dumb terminals were used to access
the system.
• Advantage
The data is easily and quickly available since it is located in the
same machine.
• Disadvantage
This architecture is completely not scalable.
Only one user can access the system at a given time through the
Types of Client Server Architecture
Two-Tier Client-Server Architecture:
– Also known as the "client-server" model.
– Consists of two main components: the client and the server.
– Clients request services or resources from the server and the
server processes these requests.
– Commonly used in database systems, where clients
(applications or users) interact with a database server.
Advantages
– Easy to maintain and modify.
– Communication between client and server in the form of
request response messages is quite fast.
Disadvantage
– If client nodes are increased beyond capacity in the architecture
then the server is not able to handle the request over flow and
performance of the system degrades.
Three-Tier Client-Server Architecture
Three-Tier Client-Server Architecture
– Adds an additional layer, known as the application or middleware
tier between the client and server.
– The client communicates with the application tier which in turn
communicates with the server.
– This architecture separates user interface, business logic and data
processing, enhancing scalability and maintainability.
– Commonly used in web applications where the client (web browser)
interacts with a web server that communicates with an application
server interacts with a database server.
Advantages
– Provides much better service and fast performance.
– Structure can be scaled according to requirements without any
problem.
– Data security is much improved
Disadvantage It is quite complex due to advanced features
SERVER SYSTEM ARCHITECTURES

Server systems can be broadly categorized into two kinds:


• Transaction Servers: These servers are widely used in
relational database systems.
• Data Servers: These servers used in object-oriented database
systems.
Transaction Servers

– This is also called Query Server Systems or SQL Server Systems.


• Clients send requests to the server.
• Transactions are executed at server.
• Results are shipped back to the client.
– Requests are specified in SQL 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
Transaction Server Process Structure
Consists of multiple processes accessing data in shared memory.
Server Processes
• Receive user queries (transactions), execute them and send results
back.
• Multithreaded- allowing a single process to execute several user
queries concurrently.
• Multiple multithreaded server processes
Lock manager process
Lock grant, lock release and deadlock detection.
Database writer processes
Output modified buffer blocks back to disk on a continuous basis.
Log writer process
• Server processes simply add log records to log record buffer
• Log writer process outputs log records to stable storage.
Checkpoint Process
• Perform periodic checkpoints
Process Monitor Process
• Monitors other processes and takes recovery actions if any of the
other processes fail.
Data Servers
– Data servers in a DBMS manage data storage, retrieval and
processing.
– They ensure data security, handle concurrent access and
support transactions.
– Data servers also enable scalability, backup, recovery, logging
and monitoring, making them vital for efficient database
management.
– Used in high-speed LANs for processing power, compute
intensive task & when full back-end functionality is required.
– Used in many object-oriented database systems.
– Issues are:
❑ Page-Shipping versus Item-Shipping- pre-shipping involves all
the preparations made before the actual shipping of the
item, while item shipping focuses on the logistics of getting
the item from point A to point B
Data Servers
❑ Locking Can grant locks on requested and prefetched items with
page shipping, transaction is granted lock on whole page.
❑ Data Caching
But check that data is up-to-date before it is used (cache
coherency).Check can be done when requesting lock on data item
❑ Lock Caching
• Locks can be retained by the client system even in between
transactions.
• Transactions can acquire cached locks locally, without contacting
server.
• Server calls back locks from clients when it receives conflicting lock
requests.
• Client returns lock once no local transaction is using it.
Parallel systems
• It refer to the use of multiple processors or nodes to
perform database operations concurrently.
• This approach aims to improve the system's performance
and throughput by dividing tasks and processing them
simultaneously.
• It's particularly beneficial for handling large datasets and
complex queries.
• Parallel processing can significantly speed up tasks like data
retrieval, analysis and reporting
Advantages:
• Parallel systems in DBMS offer improved performance,
scalability, high availability, and efficient data processing.
• They balance workloads, support real-time processing,
optimize complex queries, and handle big data.
• They are cost-effective in the long run and ensure business
continuity.
Parallel systems
Disadvantages:
It include
• Complexity in setup and maintenance
• Higher initial costs
• Difficulty in debugging and monitoring
• Need for specialized hardware and software.
• Coordination among parallel processes can
also be challenging.
• In Parallel Databases, mainly there are three
architectural designs for parallel DBMS. They
are as follows:
• Shared Memory Architecture
• Shared Disk Architecture
• Shared Nothing Architecture
Parallel Database Architecture

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

• A Distributed Database Management System


(DDBMS) is a type of database management
system that manages a database spread across
multiple locations or nodes in a network.
• This distribution can be in the form of data
replication, fragmentation or a combination of
both.
• It is a centralized software system managed as if
it were all stored in single location
Distributed Database Management
Systems
• Features:
– It is used to create, retrieve, update and delete distributed
databases.
– It synchronizes the database periodically and provides
access mechanisms which is transparent to the users.
– It ensures that the data modified at any site is universally
updated.
– It is used in application are as where large volumes of data
are processed and accessed by numerous users
simultaneously.
– It is designed for heterogeneous database platforms.
– It maintains confidentiality and data integrity of the
databases.
Distributed Database Design
The methodology used for the logical design of a centralized
database applies to the design of distributed database with
three additional factors have to be considered.
Data Fragmentation:
• Determine logical units of distribution.
• The database may be broken up into logical units called fragments
which will be stored at different sites.
• Example : Tables.
Horizontal fragmentation:
• A horizontal fragment of a table is a subset of rows in it.
• It divides a table 'horizontally‘ by selecting the relevant rows and
these fragments can be assigned to different sides in distributed
system
• Example : Tilak Road branch gets the fragment where
myTable.branch='Tilak Road’
Vertical fragmentation:
• A vertical fragment of a table keeps only certain attributes of it.
• It divides a table vertically by columns.
• It is necessary to include the primary key of the table in each
vertical fragment so that full table can be reconstructed if needed.
Mixed fragmentation:
• In a mixed fragmentation, each fragment can be specified by a
SELECT-PROJECT combination of operations.
• In this case original table can be reconstructed by applying union
and natural join operations in the appropriate order.
Data Allocation:
• Each fragment has to be allocated to one or more sites, where it
will be stored.
Data Replication:
• A copy of each fragment can be maintained at several sites.
• It is the design process of deciding which fragments will be
replicated.
Advantages & Disadvantages of
Distributed Database
Advantages:
• Sharing data: users at one site able to access the data residing at some
other sites.
• Autonomy: Each site is able to retain a degree of control over data stored
locally.
• Higher system availability through redundancy: Data can be replicated at
remote sites and systems can function even if a site fails.
Disadvantages:
1. Added complexity: Required to ensure proper co-ordination among
sites.
2. Cost: Extra Software development cost. This database is more
expensive as it is complex and hence difficult to maintain.
3. Security: Greater potential for bugs.
4. Processing overhead: Even simple operations may require a large
number of communications and additional calculations to provide
uniformity in data across the sites.
5. Lack of standard: No standard rules and protocols to convert a
centralized DBMS to a large Distributed DBMS. Lack of standard
decreases the potential of Distributed DBMS.
Object-Based Databases (OODB)
• It is a database management system in which
information is represented in the form of objects as
used in object-oriented programming.
• It extends the relational database model to include
complex data types such as objects, classes and
inheritance.
• It mainly focus on objects and data which we will
stored in database instead of actions performed on
that data and the actual logic.
• It is used in many object oriented programming
languages like C++, Java, Python, SmallTalk, Ruby etc
• Examples are MongoDB, ObjectDB(Java), ZODB(
Python)
Advantages of Object-Based
Databases
• Complex data and a wider variety of data types
than MySQL data types.
• It’s easy to save and recover data quickly.
• Seamless integration with object-oriented
programming languages.
• It is easy to model advanced real-world
problems.
• Extensible with custom data types.
• Provide Object Oriented Programming features
like object, inheritance, polymorphism,
Encapsulation etc.
Disadvantages of Object-Based
Databases
• Not as widely adopted as relational databases.
• No universal data model. Theoretical foundations
and standards are lacking.
• Does not support the views.
• High complexity causes performance problems.
• Adequate security mechanisms and access rights
to objects do not exist.
• Difficult to find Object DB Developer & not
suitable for Non-Programmers
Object-Based Databases
• ObjectDB: A high-performance OODB for Java, supporting
JPA (Java Persistence API) and JDO (Java Data Objects)
standards. It's suitable for embedded and server use.
• ZODB (Zope Object Database): Used in the Zope web
application server, ZODB is an open-source OODB for
Python. It allows developers to persist Python objects.
• db4o: A lightweight and open-source OODB for Java and
.NET.
• Objectivity/DB: A commercial OODB that offers high-
performance and supports complex data models.
• Caché (InterSystems Caché): Caché also offers an object-
oriented database management system. It's used in
healthcare and financial applications.
• ObjectStore: Enterprise object oriented database
management system for C++ and JAVA
• WakandaDB: Javascript platform to develop & run mobile
or web app

You might also like