Which normal form eliminates transitive dependencies in a database table?
Answer: A
3NF removes transitive dependencies where a non-key attribute depends on another non-key attribute. BCNF is stricter but 3NF is the standard answer for eliminating transitive dependencies.
Q.2Easy
What is the time complexity of a binary search algorithm on a sorted array?
Answer: B
Binary search divides the search space in half with each iteration, resulting in logarithmic time complexity O(log n).
Q.3Easy
Which SQL command is used to remove a table structure along with its data?
Answer: B
DROP removes the entire table structure and data. DELETE removes only data. TRUNCATE removes data but is faster than DELETE.
Q.4Easy
In a hash table, what is the primary cause of collision?
Answer: A
Hash collisions occur when two different keys hash to the same table index. Resolution techniques include chaining and open addressing.
Q.5Easy
Which of the following is NOT a characteristic of a relational database?
Answer: C
Relational databases store structured data in tables. Unstructured data is typically stored in NoSQL or document databases.
Advertisement
Q.6Easy
What does the acronym ACID stand for in database transactions?
Indexes speed up data retrieval by creating optimized lookup structures, reducing the number of disk accesses needed to find data.
Q.11Medium
In cybersecurity, what does encryption primarily protect against?
Answer: C
Encryption converts data into unreadable format, protecting it from unauthorized access during transmission and storage.
Q.12Medium
Which sorting algorithm has the best average-case time complexity?
Answer: B
Merge Sort and Quick Sort have O(n log n) average complexity. Merge Sort guarantees this; Quick Sort can degrade to O(n²) in worst case.
Q.13Medium
What is the primary function of a query optimizer in a DBMS?
Answer: B
The query optimizer analyzes different execution strategies and selects the one with minimal resource consumption and execution time.
Q.14Medium
In machine learning basics, what is the purpose of training data in AI models?
Answer: B
Training data is used to teach AI models to recognize patterns. Test data evaluates accuracy; validation data prevents overfitting.
Q.15Hard
What is a deadlock in database management?
Answer: A
A deadlock occurs when two or more transactions wait for resources held by each other, creating a circular wait condition that prevents progress.
Q.16Hard
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.17Hard
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.18Hard
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.19Hard
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.
Q.20Easy
Which of the following is a non-relational database designed for handling unstructured data at scale?
Answer: A
MongoDB is a NoSQL document database that handles unstructured and semi-structured data efficiently, unlike relational databases like PostgreSQL, Oracle, and MySQL.