In a sharded database architecture deployed on cloud infrastructure, which of the following represents the most critical challenge that must be addressed?
AShard key selection and distribution skew
BImplementing full-text search across shards
CEliminating all network latency between shards
DConverting all queries to read-only operations
Correct Answer:
A. Shard key selection and distribution skew
EXPLANATION
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.
Which of the following represents a vulnerability in SQL query construction that can be exploited through malicious user input, and can be prevented using parameterized queries?
ABuffer overflow attacks
BCross-site scripting (XSS)
CSQL injection attacks
DDistributed denial of service (DDoS)
Correct Answer:
C. SQL injection attacks
EXPLANATION
SQL injection occurs when untrusted input is concatenated into SQL queries. Parameterized queries/prepared statements separate code from data, preventing attackers from modifying query logic.
Which of the following SQL query optimization techniques is most effective when dealing with large fact tables in a data warehouse environment?
AUsing UNION instead of UNION ALL
BMaterialized views and denormalization
CIncreasing the number of JOINs in queries
DUsing correlated subqueries for filtering
Correct Answer:
B. Materialized views and denormalization
EXPLANATION
Data warehouses use materialized views to pre-aggregate data and strategic denormalization for faster analytical queries. These techniques significantly improve performance on large fact tables.
In database indexing, which type of index structure provides the best average-case performance for range queries in modern database systems?
AHash Index
BB+ Tree Index
CBitmap Index
DFull-text Index
Correct Answer:
B. B+ Tree Index
EXPLANATION
B+ Tree indexes maintain sorted order and support efficient range queries, point queries, and prefix searches. Hash indexes are faster for exact matches but cannot handle range queries efficiently.
Which of the following is a characteristic of NoSQL databases that makes them suitable for handling big data in cloud environments?
AStrict ACID compliance across all nodes
BHorizontal scalability and schema-less design
CRequirement for predefined schemas before insertion
DComplex JOIN operations for data retrieval
Correct Answer:
B. Horizontal scalability and schema-less design
EXPLANATION
NoSQL databases like MongoDB and Cassandra are designed for horizontal scaling and flexible schemas, making them ideal for cloud-based big data applications with varying data structures.
In a relational database, which normal form eliminates partial dependencies and is considered essential for most practical database designs?
ASecond Normal Form (2NF)
BThird Normal Form (3NF)
CBoyce-Codd Normal Form (BCNF)
DFourth Normal Form (4NF)
Correct Answer:
B. Third Normal Form (3NF)
EXPLANATION
3NF eliminates partial and transitive dependencies, making it the standard for practical database design. BCNF is stricter but 3NF is the most commonly implemented normalization form.