By: Prof. Dr. Fazal Rehman | Last updated: September 23, 2024
Which consistency model ensures that all operations on a distributed database are executed in a way that all nodes see the same state of the database at any given time?
a) Eventual Consistency
b) Strong Consistency
c) Causal Consistency
d) Read-Your-Writes ConsistencyAnswer: b) Strong Consistency
What does ‘eventual consistency’ mean in a distributed system?
a) All nodes will have the same data at all times
b) Data changes will eventually propagate to all nodes, but consistency is not guaranteed at all times
c) Every read will return the most recent write
d) All nodes see the updates immediatelyAnswer: b) Data changes will eventually propagate to all nodes, but consistency is not guaranteed at all times
Which consistency model allows operations to be seen in a way that respects the order in which they were issued?
a) Strong Consistency
b) Causal Consistency
c) Read-Your-Writes Consistency
d) LinearizabilityAnswer: b) Causal Consistency
In which consistency model does a read always return the latest write by the same user?
a) Eventual Consistency
b) Causal Consistency
c) Read-Your-Writes Consistency
d) Session ConsistencyAnswer: c) Read-Your-Writes Consistency
Which of the following protocols is used to achieve linearizability in a distributed system?
a) Two-Phase Commit Protocol
b) Paxos Protocol
c) Raft Protocol
d) Quorum ProtocolAnswer: b) Paxos Protocol
What does the ‘Two-Phase Commit Protocol’ ensure in a distributed transaction system?
a) All nodes will see updates immediately
b) Transactions are committed or aborted across all participating nodes atomically
c) Data consistency is maintained across multiple databases
d) Read operations are always consistentAnswer: b) Transactions are committed or aborted across all participating nodes atomically
Which consistency model is designed to ensure that reads reflect the most recent writes and is often used in systems requiring strong consistency guarantees?
a) Eventual Consistency
b) Session Consistency
c) Linearizability
d) Causal ConsistencyAnswer: c) Linearizability
What does the ‘Quorum Protocol’ in distributed systems aim to achieve?
a) Strong consistency by requiring a majority of nodes to agree on read and write operations
b) Eventual consistency by propagating updates eventually to all nodes
c) Causal consistency by ordering operations based on causality
d) Read-Your-Writes consistency by ensuring a user sees their own writes immediatelyAnswer: a) Strong consistency by requiring a majority of nodes to agree on read and write operations
Which of the following is a key characteristic of ‘Session Consistency’?
a) Ensures consistency across different user sessions
b) Ensures that a user will see the updates they have made in the same session
c) Guarantees strong consistency across all sessions
d) Provides eventual consistency across all sessionsAnswer: b) Ensures that a user will see the updates they have made in the same session
In the context of distributed databases, what does ‘read repair’ typically involve?
a) Ensuring all replicas are updated with the most recent write
b) Repairing data that is corrupted
c) Fixing inconsistencies discovered during read operations
d) Implementing backup and recovery proceduresAnswer: c) Fixing inconsistencies discovered during read operations
Which consistency model allows for temporary inconsistencies as long as all updates are eventually propagated and all operations respect the causality?
a) Causal Consistency
b) Strong Consistency
c) Eventual Consistency
d) LinearizabilityAnswer: a) Causal Consistency
What is the main purpose of the ‘Raft Protocol’ in distributed systems?
a) To ensure strong consistency across all nodes
b) To achieve consensus among distributed nodes for replicated logs
c) To handle data fragmentation
d) To encrypt data during transmissionAnswer: b) To achieve consensus among distributed nodes for replicated logs
Which of the following protocols is specifically designed to handle network partitions and recover from failures while maintaining consistency?
a) Paxos Protocol
b) Two-Phase Commit Protocol
c) Raft Protocol
d) Quorum ProtocolAnswer: a) Paxos Protocol
In distributed databases, what does ‘write quorum’ refer to?
a) The minimum number of nodes required to acknowledge a write operation for it to be considered successful
b) The maximum number of nodes that can participate in a transaction
c) The number of nodes required to read data successfully
d) The process of distributing data across nodesAnswer: a) The minimum number of nodes required to acknowledge a write operation for it to be considered successful
What is ‘read quorum’ in the context of distributed databases?
a) The minimum number of nodes that must respond to a read request to ensure consistency
b) The maximum number of nodes that can participate in a read operation
c) The process of replicating data across multiple nodes
d) The number of nodes required to commit a transactionAnswer: a) The minimum number of nodes that must respond to a read request to ensure consistency