DBMS Chap-6
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)
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
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:
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.
3. High Performance
Optimized for read/write speed, making them suitable for real-time applications.
Can handle large volumes of data with low latency.
Zero Configuration
Requires no installation or configuration—just include the SQLite library to use it.
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.
Cross-Platform Support
Works on Windows, Linux, MacOS, and other platforms.
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:
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
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.