A deadlock occurs when two or more transactions wait for resources held by each other, creating a circular wait condition that prevents progress.
Q.2Hard
Which of the following best describes eventual consistency in distributed databases?
Answer: B
Eventual consistency is a model in NoSQL and distributed systems where updates propagate asynchronously, achieving consistency over time rather than immediately.
Q.3Hard
In network protocols, which layer does TCP/IP operate at?
Answer: C
TCP operates at Layer 4 (Transport) and IP at Layer 3 (Network) in the OSI model. Together they form the TCP/IP protocol suite.
Q.4Hard
What is the primary vulnerability addressed by SQL injection prevention techniques like parameterized queries?
Answer: B
Parameterized queries prevent SQL injection by separating query structure from data, ensuring user input cannot be interpreted as executable code.
Q.5Hard
In the context of graph databases, what is the primary advantage over relational databases for relationship-heavy queries?
Answer: B
Graph databases excel at querying relationships with O(1) traversal time, whereas relational databases require expensive JOIN operations for similar queries.
Advertisement
Q.6Hard
What does CAP theorem state in distributed systems?
Answer: A
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).
Q.7Hard
In cybersecurity, what is a zero-day vulnerability?
Answer: A
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.
Q.8Hard
What does BASE model in NoSQL stand for?
Answer: A
BASE is an alternative to ACID, prioritizing availability and partition tolerance. It accepts temporary inconsistencies that resolve eventually (eventual consistency).
Q.9Hard
In database replication, what is the primary difference between synchronous and asynchronous replication?
Answer: C
Synchronous replication waits for replicas to acknowledge writes (safer but slower), while asynchronous replication doesn't wait (faster but less safe).
Q.10Hard
Which of the following best describes a distributed transaction and its challenges in microservices architecture?
Answer: B
Distributed transactions in microservices require mechanisms like Saga pattern or Two-Phase Commit to maintain consistency across services.
Q.11Hard
In cybersecurity, what is SQL injection and why is it a critical vulnerability in 2024?
Answer: A
SQL injection allows attackers to insert malicious SQL code through application inputs, remaining a critical OWASP Top 10 vulnerability despite awareness.
Q.12Hard
What is the primary advantage of using GraphQL over traditional REST APIs in modern application architecture?
Answer: B
GraphQL's query language enables clients to specify exact data requirements, eliminating over-fetching and under-fetching issues common in REST.
Q.13Hard
In a B-tree of order m, what is the maximum number of keys that a non-root node can contain?
Answer: C
A B-tree of order m can have at most 2m-1 keys in any node and minimum m-1 keys in non-root nodes.
Q.14Hard
In database normalization, what does the Boyce-Codd Normal Form (BCNF) address that 3NF might miss?
Answer: B
BCNF handles edge cases in 3NF where anomalies can occur with composite candidate keys where determinants are not candidate keys themselves.
Q.15Hard
In distributed systems, what is a consensus algorithm primarily used for?
Answer: B
Consensus algorithms (like Raft, Paxos) enable distributed systems to reliably agree on state even with node failures.
Q.16Hard
What is the primary challenge of implementing ACID properties in distributed databases?
Answer: B
The CAP theorem shows it's impossible to guarantee all three: Consistency, Availability, and Partition tolerance simultaneously.
Q.17Hard
In AI/ML, what is the role of activation functions in neural networks?
In a sharded database architecture deployed on cloud infrastructure, which of the following represents the most critical challenge that must be addressed?
Answer: A
Shard key selection determines data distribution and performance. Poor shard key choices lead to hotspots, uneven load distribution, and performance degradation across the sharded cluster.