0% found this document useful (0 votes)
20 views15 pages

DBMS Chap-6

The document discusses various database architectures, focusing on 2-tier and 3-tier architectures for online banking, highlighting their components, advantages, and limitations. It also covers parallel database system architectures, advantages and disadvantages of data replication, fragmentation techniques in distributed databases, and the differences between centralized and distributed database systems. Additionally, it explores partitioning techniques in I/O parallelism, benefits of NoSQL databases, and specific database systems like SQLite, along with their applications in different scenarios.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views15 pages

DBMS Chap-6

The document discusses various database architectures, focusing on 2-tier and 3-tier architectures for online banking, highlighting their components, advantages, and limitations. It also covers parallel database system architectures, advantages and disadvantages of data replication, fragmentation techniques in distributed databases, and the differences between centralized and distributed database systems. Additionally, it explores partitioning techniques in I/O parallelism, benefits of NoSQL databases, and specific database systems like SQLite, along with their applications in different scenarios.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

DBMS CHAP-6

1)Explain 2-tier and 3-tier architecture with diagram for online Banking
Database system.
In online banking systems, database architecture plays a critical role in security, scalability,
and performance.
1)2-Tier Architecture
Client-Server Model where the banking application directly interacts with the database:
[Client Interface] ↔ [Database Server]
Components:
 Client Tier: ATM interface or web browser handling user input (e.g., withdrawal
requests)
 Server Tier: Core banking database (e.g., Oracle DB) storing account balances and
transaction records
Banking Example:
 When a customer uses an ATM:
 ATM (client) sends withdrawal request directly to core banking database
 Database verifies account balance and processes transaction
 Response returns immediately to ATM
Advantages:
 Simple implementation for small-scale systems
 Faster response for single-user operations
Limitations:
 Security risks from direct database exposure
 Performance degrades with high concurrent users
 Difficult to update business rules (requires client-side changes)

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

2) 3-Tier Architecture
Layered Structure adding an intermediary application server:
[Web/Mobile App] ↔ [Application Server] ↔ [Database Server]
Components:
 Presentation Tier: Online banking portal (React/Angular UI)
 Application Tier: Java/Python servers handling fraud checks and transaction logic
 Data Tier: Secure SQL/NoSQL databases
Banking Workflow:
For a funds transfer:
 Mobile app sends request to application server
 Middle tier verifies OTP, checks fraud rules, and logs audit trail
 Cleaned request sent to core banking database
 Response routed back through middleware to user
Advantages:
 Enhanced security (no direct database access)
 Scalable handling of 10,000+ concurrent users
 Independent updates to UI or business rules
Challenges:
 Higher initial development complexity
 Potential latency from extra hop

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

2] Explain any two parallel Database System Architecture in detail

1)Parallel database architectures enhance performance by distributing data and processing


across multiple resources.
2)Two prominent architectures are Shared Memory and Shared Nothing, each with distinct
design principles and use cases.
Shared Memory Architecture
Design:
Multiple processors access a global shared memory and disk storage via an interconnection
network. Each processor has local cache to reduce shared memory access
Key Features:
 Efficient communication: Processors exchange data via shared memory (low latency).
 Moderate scalability: Suitable for SMP systems with up to 32–64 CPUs.
 Uniform data access: All processors view data as a single logical repository.
Advantages:
 Simplifies load balancing and query optimization.
 Low overhead for small-scale parallelism (e.g., banking ATMs).
Limitations:
 Memory contention: Performance degrades as processors compete for shared
resources.
 Limited scalability: Bus bandwidth restricts expansion beyond ~64 CPUs.
Use Case:
Symmetric multiprocessor (SMP) systems for mid-sized transactional databases.

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

3] Enlist the Advantages & Disadvantages of Replication


Advantages of Replication
1) High Data Availability: Replication ensures that data is accessible even if one server
or node fails, minimizing downtime and supporting business continuity.
2) Improved Disaster Recovery: By maintaining multiple copies of data in different
locations, organizations can quickly recover from hardware failures, data corruption,
or disasters.
3) Enhanced Performance and Low Latency: Users can access data from the nearest
replica, reducing network latency and improving response times, especially in
distributed systems.
4) Scalability: Replication allows organizations to scale their systems horizontally,
handling more users and larger datasets without performance degradation.
5) Load Balancing: Distributing read operations across replicas reduces the load on the
primary server, optimizing resource utilization and improving overall system
performance.
6) Data Security and Protection: Replication provides redundancy, reducing the risk of
data loss and enhancing data security by storing backups in multiple locations.
7) Ease of Access and Analytics: Replicated data can be accessed more easily for
analytics and reporting without impacting the performance of the primary database.
Disadvantages of Replication
1) Increased Storage Costs: Maintaining multiple copies of data requires more storage
space, leading to higher costs, especially as data volumes grow.
2) Complexity in Management: Setting up and managing replication can be complex,
requiring careful planning, skilled personnel, and ongoing maintenance.
3) Data Consistency Challenges: Keeping all replicas synchronized and up-to-date is
difficult, especially in distributed environments, leading to potential data
inconsistencies and conflicts.
4) Higher Bandwidth Requirements: Replicating data across multiple locations
consumes significant network bandwidth, which can strain resources and increase
operational costs.
5) Potential Security Risks: Replicating data to remote or multiple servers can expose it
to unauthorized access or cyber threats if not properly secured.
6) Performance Overheads: Write operations may become slower due to the need to
update multiple replicas, and network lag can further impact performance.
7) Maintenance and Operational Costs: Ongoing monitoring, troubleshooting, and
updating of replication systems require dedicated resources and can increase
operational expenses

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

4] What are different data fragmentation techniques in distributed


databases?
Horizontal Fragmentation
 Divides a table into subsets of rows (tuples) based on conditions or predicates.
 Each fragment contains only some rows from the original table.
 Fragments are distributed across different sites.
 Supports parallel processing and enhances access speed.
 Data is stored close to the location where it is frequently used.
 Types:
1) Primary: Based on predicates of the same table.
2) Derived: Based on predicates of another related table.
Vertical Fragmentation
 Splits a table into subsets of columns (attributes).
 Each fragment includes a primary key to allow rejoining of fragments.
 Improves data privacy by limiting attribute exposure.
 Optimizes access by retrieving only necessary attributes at specific sites.
 Original table can be reconstructed using join operations.
Hybrid (Mixed) Fragmentation
 Combines horizontal and vertical fragmentation techniques.
 Fragmentation can be applied in either order (horizontal → vertical or vice versa).
 Allows fine-grained and flexible distribution of data.
 Original table is reconstructed using union and join operations.
Benefits of Fragmentation
 Enhances performance in distributed systems.
 Reduces data transfer costs.
 Improves data locality for site-specific queries.

5] Write a short note on Centralized and Distributed Database Systems.

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

Centralized Database Systems:


1) All data is stored and maintained at a single central location, typically on a mainframe
or server.
2) Users access the database through a network such as LAN or WAN, sending requests
to the central server.
3) Advantages include maximized data integrity, minimal data redundancy, stronger
security due to centralized control, easier data portability, and simpler administration.
4) Disadvantages include potential bottlenecks due to all access going through one
location, slower access if the network is slow, reduced efficiency with many
simultaneous users, and a single point of failure risking total data loss if the central
system fails.
5) Commonly used in organizations like banks, colleges, and small companies where
centralized control is feasible and desirable.
Distributed Database Systems:
1) Data is stored across multiple physical locations or nodes, which may be
geographically dispersed.
2) Each site manages its own data and can process queries locally, with coordination
among sites to maintain consistency.
3) Advantages include improved reliability and availability (no single point of failure),
better performance through local data access, and scalability by adding more nodes.
4) Challenges include complexity in managing data consistency, higher communication
overhead, and more complicated security and administration.
5) Suitable for large-scale, geographically distributed applications requiring high
availability and fault tolerance.

6] Explain need of partitioning techniques used in I/O parallelism. Explain


techniques in detail.

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

1)Partitioning techniques are essential in I/O parallelism to improve the efficiency and speed
of data retrieval and processing in parallel database systems.
2)By dividing data across multiple disks or processors, these techniques enable simultaneous
input/output operations, reducing bottlenecks and enhancing overall system throughput.
Need for Partitioning in I/O Parallelism
 Reduce I/O Bottlenecks: Partitioning distributes data across multiple disks, allowing
parallel access and reducing the time to read or write large datasets.
 Improve Query Performance: Parallel I/O enables multiple processors to work on
different data partitions simultaneously, speeding up query execution.
 Load Balancing: Even distribution of data prevents any single disk or processor from
becoming a performance bottleneck.
 Scalability: Partitioning supports scaling by adding more disks or processors, which
can handle larger data volumes and more complex queries efficiently.
 Fault Tolerance: Data partitioning can improve reliability by isolating failures to
specific partitions without affecting the entire system.
Partitioning Techniques in Detail
1. Round-Robin Partitioning
 Tuples are distributed evenly and cyclically across all disks.
 The ith tuple is assigned to disk imodn, where n is the number of disks.
 Simple to implement and ensures uniform data distribution.
 However, it does not consider data values, so related tuples may be scattered, which
can affect query performance involving specific attribute values.
2. Hash Partitioning

3. Range Partitioning
 Data is partitioned based on ranges of attribute values.
 A partitioning vector [v0,v1,vn−2] defines the boundaries for each partition.
 Tuples with attribute values falling within a range are stored on the corresponding
disk. Useful for range queries and ordered data access, but may lead to skew if data is
not uniformly distributed.

7] State which database system architecture you will prefer for following
application- support your answer with brief explanation:

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

i) Railway Reservation System


1. Preferred Architecture: Centralized Relational Database System with Multi-
Channel Access and API Integration
2. Handles complex transactions (bookings, cancellations, schedules, pricing).
3. Centralized relational database ensures ACID compliance (Atomicity, Consistency,
Isolation, Durability).
4. Multi-channel access (web, kiosks, travel agencies) with API integration.
5. Supports real-time updates and consistent data across all platforms.
6. Manages entities with relationships: trains, stations, carriages, schedules, bookings.
7. Modules: Booking engine, admin extranet, third-party OTA integration.
8. Ensures data integrity, reliability, and transaction consistency.

ii) Search Engine


1. Preferred Architecture: Distributed Sharded Search Engine Architecture
2. Designed for high scalability and availability.
3. Data is sharded (divided into parts) and distributed across multiple servers.
4. Enables parallel processing of queries and indexing.
5. Supports real-time or near real-time indexing.
6. Allows independent scaling of indexing and search components.
7. Facilitates fast querying, efficient resource usage, and quick node addition/removal.
8. Results from shards are merged efficiently for fast responses.

iii) College Admission System


1. Preferred Architecture: Web-Based Cloud-Hosted Database System with Modular
Subsystems
2. Web-based system for user-friendly access by students and parents.
3. Modular design with subsystems (application form, status tracking, notifications,
tours).
4. Cloud-hosted for scalability, availability, and reliability.
5. Supports secure data storage and easy integration with front-end interfaces.
6. Real-time data updates and automation of admission processes.
7. Enables remote access, load handling during peak times, and data security.

8] What are the benefits of NOSQL databases.


1. Scalability

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

NoSQL databases are designed for horizontal scaling, meaning you can add more servers to
handle increased load.
Ideal for big data and high-traffic applications.

2. Flexibility in Data Models


Supports varied data formats: key-value, document, column-family, and graph.
Allows schema-less data, meaning you can store unstructured or semi-structured data without
predefined schemas.

3. High Performance
Optimized for read/write speed, making them suitable for real-time applications.
Can handle large volumes of data with low latency.

4. Easy to Handle Big Data


Efficiently stores and manages large-scale datasets.
Works well with distributed data processing systems like Hadoop and Spark.

5. High Availability and Fault Tolerance


Built-in replication and failover features ensure continuous availability.
Designed for distributed environments, reducing the risk of single-point failure.

9] Write a note on SQL Lite database.


Lightweight Database Engine

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

SQLite is a serverless, self-contained, and lightweight relational database engine.


Embedded in Application
It is embedded directly into the application; no separate server process is required.

Zero Configuration
Requires no installation or configuration—just include the SQLite library to use it.

Single Database File


All data (tables, indexes, etc.) is stored in a single cross-platform file.

ACID Compliant
Ensures Atomicity, Consistency, Isolation, and Durability for reliable transactions.
Used in Mobile and Embedded Systems
Commonly used in Android apps, iOS apps, IoT devices, and browsers.

Open Source and Free


SQLite is open-source software and free for commercial and private use.
Supports Standard SQL Syntax
Implements a large subset of the SQL92 standard.
Ideal for Small to Medium Applications
Best suited for local storage and applications that don't require client-server architecture.

Cross-Platform Support
Works on Windows, Linux, MacOS, and other platforms.

10] Explain the following:


1. Internet Databases

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

Databases that are connected to and accessible over the internet.


Explanation:
Used in web-based applications like e-commerce, social media, and online banking.
Allow users to perform operations like data entry, updates, and retrieval through web
browsers or APIs.
Examples: MySQL, PostgreSQL, MongoDB hosted on web servers.
Requires security measures like encryption and authentication due to internet access.
Enables remote access and real-time data sharing.

2. Mobile Databases
Databases designed to work on mobile devices such as smartphones and tablets.
Explanation:
Supports offline data storage and syncing when the device reconnects to the internet.
Optimized for low power consumption and limited storage.
Used in apps like note-taking, health trackers, and offline forms.
Examples: SQLite, Realm, Firebase Realtime Database (for sync).
Must support data consistency, security, and fast access on mobile hardware.

3. Cloud Database
Databases that are hosted and managed in a cloud environment (like AWS, Azure, or Google
Cloud).
Explanation:
Provides on-demand access, scalability, and pay-as-you-use pricing.
Can be relational (e.g., Amazon RDS) or NoSQL (e.g., Firebase, DynamoDB).
Supports high availability, automatic backups, and disaster recovery.
Ideal for enterprise applications, SaaS platforms, and big data solutions.
Enables global accessibility and collaboration from anywhere.

4. SQLite Databases
Definition:

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

A lightweight, embedded, serverless relational database system


Explanation:
Stores the entire database in a single file on the device.
Requires no installation or configuration.
Popular in mobile apps (e.g., Android), browsers, and small applications.
Supports ACID transactions and standard SQL syntax.
Ideal for applications that need local storage without a full database server.

11] Explain XQuery FLWOR Expressions.


XQuery FLWOR expressions are a powerful construct used to query and transform XML
data, analogous to SQL SELECT statements. The acronym FLWOR stands for For, Let,
Where, Order by, Return, which are the main clauses that compose the expression:
 For: Iterates over a sequence of items (nodes or atomic values), binding each item to
a variable. This is similar to the FROM clause in SQL.
 Let: Binds the result of an expression to a variable without iteration, allowing reuse of
values within the query.
 Where: Filters the items based on a condition, similar to the WHERE clause in SQL.
 Order by: Sorts the items according to specified criteria, supporting ascending or
descending order.
 Return: Specifies what to output for each item that passes the filters; this clause is
mandatory and produces the final result sequence

12] With a suitable diagram, explain Centralized and Client-Server


Architectures.

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

Centralized Architecture
1)In a centralized architecture, the entire database is stored and managed on a single central
server or mainframe.
2)All client machines (users) connect directly to this central server to access or manipulate
the data.
Characteristics:
All data is stored at one location.
The server handles all database management functions, including query processing and
transaction management.
Clients are typically terminals or computers that send requests to the central server.
Simple to manage and secure since data is centralized.
Can become a bottleneck as all requests funnel through one server.

Client-Server Architecture

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

1)In a client-server architecture, the database is stored on a central server, but the processing
is divided between clients and the server.
2)Clients run application programs that interact with the server, which manages the database.
Characteristics:
The server manages the database and handles query processing.
Clients handle user interface and application logic
Supports multiple clients connecting simultaneously.
More scalable and fault-tolerant than centralized architecture.
Can be implemented as two-tier (client and server) or three-tier (client, application server,
database server).
Enables distribution of workload and better resource utilization.

SIDDHANT COLLEGE OF ENGINEERING


DBMS CHAP-6

13] With a proper diagram, explain the architecture of Distributed


Databases.

Distributed DBMS (DDBMS):


Acts as a central controller that manages data distributed across multiple databases (DDBMS
1, 2, 3).
Ensures data consistency, access control, and query processing across sites.
Local and Global Users:
Local user: Accesses only their local database (e.g., DDBMS 1).
Global users: Can access data from multiple databases across the distributed system.
Multiple DDBMS Nodes:
The system includes several DDBMS components (DDBMS 1, 2, 3), each managing its own
local database.
These are physically separated but logically connected through the DDBMS.
Global Schema:
Defines a unified logical view of the entire distributed database.
Hides the complexity of data distribution from users.
Data Distribution Transparency:
Users interact with the system as if it's a single database, even though data is spread out.
The DDBMS handles location, replication, and fragmentation transparently.
Benefits:
Improved reliability and availability – even if one node fails, others can function.
Faster local access for local users.
Scalability – easy to add more databases or sites.

SIDDHANT COLLEGE OF ENGINEERING

You might also like