Model Ans Paper Btaic402
Model Ans Paper Btaic402
Tier-3 Architecture
The 3-tier architecture contains one more layer between the client and the
server.
In this architecture, there is no direct communication between client
and server.
Mainly, the 3-tier is used for large applications on the web.
The features of 3-tier architecture are data backup, recovery,
security, and concurrency control.
Layers
The 3-tier architecture consists of the three layers as follows −
Presentation layer − This layer is also called the client layer. The
front-end layer consists of a user interface. The main purpose is to
communicate with the application layer.
Application layer − This layer is also called the business logic layer.
It acts as a middle layer between the client and the database server
which are used to exchange partially processed data.
Database layer − In this layer the data or information is stored. This
layer performs operations like insert, update and delete to connect
with the database.
Diagram :
Partition Tolerance –
Partition tolerance means that the system can continue operating
even if the network connecting the nodes has a fault that results in
two or more partitions, where the nodes in each partition can only
communicate among each other. That means, the system continues to
function and upholds its consistency guarantees in spite of network
partitions. Network partitions are a fact of life. Distributed systems
guaranteeing partition tolerance can gracefully recover from
partitions once the partition heals.
CA(Consistency and Availability)-
The system prioritizes availability over consistency and can respond with
possibly stale data.
Example databases: Cassandra, CouchDB, Riak, Voldemort.
AP(Availability and Partition Tolerance)-
The system prioritizes availability over consistency and can respond with
possibly stale data.
The system can be distributed across multiple nodes and is designed to
operate reliably even in the face of network partitions.
Example databases: Amazon DynamoDB, Google Cloud Spanner.
CP(Consistency and Partition Tolerance)-
The system prioritizes consistency over availability and responds with the
latest updated data.
The system can be distributed across multiple nodes and is designed to
operate reliably even in the face of network partitions.
Example databases: Apache HBase, MongoDB, Redis.
In the diagram, there are four different sites, each with its own
DBMS (Database Management System). The sites are connected to each
other over a network, such as the internet, and communicate with each other
to share data and maintain consistency.
Each site has its own local database, which is managed by its local DBMS.
The local databases can be of different types, such as relational, document-
oriented, graph-based, or key-value stores, depending on the requirements
of the application.
The distributed database system uses a middleware layer that provides a
common interface to access and manage the distributed data. The
middleware layer handles the distribution of data, replication,
synchronization, and query processing across multiple databases. It also
provides mechanisms for transaction management, concurrency control, and
data security.
In a distributed database system, data is stored across multiple nodes, and
each node may have a copy of the data. This redundancy provides fault
tolerance and high availability. If one node fails or becomes unavailable, the
data can be accessed from another node.
Overall, a distributed database system allows organizations to distribute data
across multiple locations, making it available to users and applications
worldwide. It provides high performance, scalability, fault tolerance, and
data consistency, making it a popular choice for large-scale applications
C) Draw Cassandra Architecture with various components. Explain each CO4 6
component in brief
Here's a diagram that illustrates the architecture of Apache Cassandra, a
popular distributed NoSQ L database system:
Create Operations –
The create or insert operations are used to insert or add new documents in
the collection. If a collection does not exist, then it will create a new
collection in the database. You can perform, create operations using the
following methods provided by the MongoDB:
Read Operations –
The Read operations are used to retrieve documents from the collection, or
in other words, read operations are used to query a collection for a
document. You can perform read operation using the following method
provided by the MongoDB
db.collection.find()It is used to retrieve documents from the collection.
Update Operations –
The update operations are used to update or modify the existing document in
the collection. You can perform update operations using the following
methods provided by the MongoDB:
db.collection.updateOne() It is used to update a single document in the
collection that satisfy the given criteria.
db.collection.updateMany()It is used to update multiple documents in the
collection that satisfy the given criteria.
db.collection.replaceOne()It is used to replace single document in the
collection that satisfy the given criteria.
Delete Operations –
The delete operation are used to delete or remove the documents from a
collection. You can perform delete operations using the following methods
provided by the MongoDB:
db.collection.deleteOne() It is used to delete a single document from the
collection that satisfy the given criteria.
db.collection.deleteMany()It is used to delete multiple documents from the
collection that satisfy the given criteria.
*** End ***
The grid and the borders of the table will be hidden before final printing.