Showing 51–60 of 100 questions
in Database/SQL
In cloud computing, what does the term 'eventual consistency' refer to?
A
Data is immediately consistent across all nodes
B
Data will become consistent across distributed systems after some time
C
Consistency checks are performed eventually
D
Cloud systems never achieve consistency
Correct Answer:
B. Data will become consistent across distributed systems after some time
Explanation:
Eventual consistency in cloud systems means that data replicas will converge to the same state after all updates have propagated.
What is the primary benefit of containerization technology like Docker in modern application deployment?
A
Reduces application performance
B
Ensures consistency between development and production environments
C
Eliminates the need for databases
D
Automatically handles all security patches
Correct Answer:
B. Ensures consistency between development and production environments
Explanation:
Docker containers package applications with dependencies, ensuring identical execution across different environments.
In machine learning, what is a confusion matrix primarily used for?
A
To train neural networks
B
To evaluate classification model performance
C
To normalize feature scaling
D
To generate random datasets
Correct Answer:
B. To evaluate classification model performance
Explanation:
A confusion matrix shows True Positives, True Negatives, False Positives, and False Negatives, enabling comprehensive evaluation of classification accuracy.
Which encryption standard is currently recommended for securing data in transit over networks?
A
DES
B
MD5
C
TLS 1.3
D
SHA-1
Correct Answer:
C. TLS 1.3
Explanation:
TLS 1.3 is the latest, most secure protocol standard for encrypting data in transit, replacing older protocols like SSL and TLS 1.2.
What is the time complexity of searching an element in a balanced Binary Search Tree?
A
O(n)
B
O(n log n)
C
O(log n)
D
O(1)
Correct Answer:
C. O(log n)
Explanation:
A balanced BST maintains O(log n) search complexity by keeping the tree height logarithmic relative to node count.
In database replication, what is the primary difference between synchronous and asynchronous replication?
A
Synchronous is always faster
B
Asynchronous waits for replica confirmation; Synchronous does not
C
Synchronous waits for replica confirmation; Asynchronous does not
D
Both 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).
Which of the following best describes a distributed transaction and its challenges in microservices architecture?
A
Transactions that execute only on primary databases
B
Transactions spanning multiple services requiring coordination and handling failures
C
Transactions that cannot be executed in microservices
D
Local transactions that never require coordination
Correct Answer:
B. Transactions spanning multiple services requiring coordination and handling failures
Explanation:
Distributed transactions in microservices require mechanisms like Saga pattern or Two-Phase Commit to maintain consistency across services.
In cybersecurity, what is SQL injection and why is it a critical vulnerability in 2024?
A
Injecting SQL commands to execute unauthorized database operations
B
A performance optimization technique
C
A method to improve database security
D
An outdated vulnerability no longer relevant
Correct Answer:
A. Injecting SQL commands to execute unauthorized database operations
Explanation:
SQL injection allows attackers to insert malicious SQL code through application inputs, remaining a critical OWASP Top 10 vulnerability despite awareness.
What is the primary advantage of using GraphQL over traditional REST APIs in modern application architecture?
A
GraphQL always provides better performance
B
GraphQL allows clients to request only required data fields, reducing over-fetching
C
GraphQL eliminates the need for databases
D
REST APIs are completely replaced by GraphQL
Correct Answer:
B. GraphQL allows clients to request only required data fields, reducing over-fetching
Explanation:
GraphQL's query language enables clients to specify exact data requirements, eliminating over-fetching and under-fetching issues common in REST.
What is the normal form that ensures no partial dependencies exist in a relation?
A
Third Normal Form (3NF)
B
Boyce-Codd Normal Form (BCNF)
C
Second Normal Form (2NF)
D
First Normal Form (1NF)
Correct Answer:
C. Second Normal Form (2NF)
Explanation:
2NF eliminates partial dependencies where non-key attributes depend on part of a composite key. 3NF further eliminates transitive dependencies.