How is replication control achieved in ddbmswhat is cap


Part 1: 180 - 200 word response to the discussion. Need a substantive responsive post with references.

Question: What is CAP Theorem in Distributed Systems? How is it different from ACID in Relational DBMS?

Discussion:CAP (Consistency, Availability, Partition)Theorem deals with the penalties incurred with scaled hardware that handles additional loads. According to Robert Greiner, "The CAP Theorem states that, in a distributed system (a collection of interconnected nodes that share data.), you can only have two out of the three guarantees across a write/read pair: consistency, availability, and partition tolerance (Greiner, 2014)."

Consistency is the concept that a read will return the most recent write.

Availability is that a working node will operate on time without error.

Partition Tolerance is that the system will be able to handle network partitions.

Due to network failures you need partition tolerance. Ensuring partition tolerance will either affect consistency or availability. Choosing consistency will eventually force sacrifices in availability. The partitioned system will need time to ensure the data being read was correctly processed. Choosing availability maybe an option when the process can afford to work with data that can be updated from the network at a later time.

ACID in a relational DBMS includes the following (What is the relation between SQL, NoSQL, the CAP theorem and ACID? - Quora, 2017):

Atomicity - All changes in a transaction must take place or the transaction is voided.

Consistency - All database rules such as data types, constraints, etc. must be followed or the transaction will not commit.

Isolation - A transaction in progress is isolated from other transactions until it is completed.

Durability - A committed transaction is stored and protected.

ACID is generally used in SQL whereas it is not generally used in NoSQL. Distributed database systems must use CAP requirements and ACID are set of requirements that a database can use for data quality.

Part 2: 180 - 200 word response to the discussion. Need a substantive responsive post with references.

Question: How is Replication Control achieved in DDBMS?

Discussion: Database replication is the frequent electronic copying data from a database in one computer or server to a database in another so that all users share the same level of information.

The result is a distributed database in which users can access data relevant to their tasks without interfering with the work of others. The implementation of database replication for the purpose of eliminating data ambiguity or inconsistency among users is known as normalization.

Database replication can be done in at least three different ways:

Snapshot replication: Data on one server is simply copied to another server, or to another database on the same server.

Merging replication: Data from two or more databases is combined into a single database.

Transactional replication: Users receive full initial copies of the database and then receive periodic updates as data changes.

There is one master site and ‘N' slave sites. A master algorithm runs at the master site to detect conflicts. A copy of slave algorithm runs at each slave site. The overall algorithm executes in the following two phases -

Transaction acceptance/rejection phase - When a transaction enters the transaction monitor of a slave site, the slave site sends a request to the master site.

The master site checks for conflicts. If there aren't any conflicts, the master sends an "ACK+" message to the slave site which then starts the transaction application phase. Otherwise, the master sends an "ACK-" message to the slave which then rejects the transaction.

Transaction application phase - Upon entering this phase, the slave site where transaction has entered broadcasts a request to all slaves for executing the transaction.

On receiving the requests, the peer slaves execute the transaction and send an "ACK" to the requesting slave on completion. After the requesting slave has received "ACK" messages from all its peers, it sends a "DONE" message to the master site. The master understands that the transaction has been completed and removes it from the pending queue.

Solution Preview :

Prepared by a verified Expert
Database Management System: How is replication control achieved in ddbmswhat is cap
Reference No:- TGS02656340

Now Priced at $15 (50% Discount)

Recommended (98%)

Rated (4.3/5)