Which of the following best describes eventual consistency in distributed databases?
AAll nodes have identical data at all times
BData will be consistent across all nodes eventually, not immediately
CData consistency is never achieved
DOnly primary nodes maintain consistency
Correct Answer:
B. Data will be consistent across all nodes eventually, not immediately
Explanation:
Eventual consistency is a model in NoSQL and distributed systems where updates propagate asynchronously, achieving consistency over time rather than immediately.
In the context of graph databases, what is the primary advantage over relational databases for relationship-heavy queries?
ALower storage requirements
BFaster execution of complex relationship traversals
CBetter support for unstructured data
DSuperior ACID compliance
Correct Answer:
B. Faster execution of complex relationship traversals
Explanation:
Graph databases excel at querying relationships with O(1) traversal time, whereas relational databases require expensive JOIN operations for similar queries.
What does CAP theorem state in distributed systems?
AA system can guarantee at most 2 of 3: Consistency, Availability, Partition tolerance
BAll distributed systems must be Consistent, Available, and Partition-tolerant
CConsistency requires Availability and Partitions
DAvailability is always achieved in partitioned systems
Correct Answer:
A. A system can guarantee at most 2 of 3: Consistency, Availability, Partition tolerance
Explanation:
CAP theorem (Brewer's theorem) states distributed systems must choose 2 of 3 properties: strong consistency (C), continuous availability (A), or tolerance to network partitions (P).
In cybersecurity, what is a zero-day vulnerability?
AA security flaw unknown to vendors with no patch available
BA vulnerability found on the first day of software release
CA virus that activates at midnight
DA type of brute-force attack
Correct Answer:
A. A security flaw unknown to vendors with no patch available
Explanation:
Zero-day vulnerabilities are previously unknown exploits with no patch. They're extremely dangerous because users have no defense until vendors develop and release fixes.
Correct Answer:
A. Basically Available, Soft state, Eventually consistent
Explanation:
BASE is an alternative to ACID, prioritizing availability and partition tolerance. It accepts temporary inconsistencies that resolve eventually (eventual consistency).
In database replication, what is the primary difference between synchronous and asynchronous replication?
ASynchronous is always faster
BAsynchronous waits for replica confirmation; Synchronous does not
CSynchronous waits for replica confirmation; Asynchronous does not
DBoth have identical performance characteristics
Correct Answer:
C. Synchronous waits for replica confirmation; Asynchronous does not
Explanation:
Synchronous replication waits for replicas to acknowledge writes (safer but slower), while asynchronous replication doesn't wait (faster but less safe).