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?
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.
Q.8Easy
What does ACID stand for in database transactions?
In SQL, which JOIN returns only matching records from both tables?
Answer: A
INNER JOIN returns only rows with matching values in both tables. LEFT JOIN includes unmatched left table rows, FULL OUTER JOIN includes all rows, and CROSS JOIN produces Cartesian product.
Q.10Easy
What is the time complexity of searching in a balanced binary search tree?
Answer: A
Balanced BSTs (AVL, Red-Black) maintain O(log n) search time by keeping height logarithmic. Unbalanced trees degrade to O(n) in worst case.
Q.11Easy
In cloud computing, what does IaaS stand for?
Answer: A
IaaS provides virtualized computing resources over the internet (AWS EC2, Azure VMs). PaaS and SaaS are higher-level abstractions.
Q.12Easy
In cybersecurity, what is the primary purpose of a firewall?
Answer: A
Firewalls filter traffic based on security policies. While they provide protection, encryption is separate, antivirus is different, and authentication is handled by other systems.
Q.13Easy
Which of the following is a ACID property that ensures all or nothing transaction execution?
Answer: A
Atomicity ensures that a transaction is treated as a single unit - either all operations complete or none do.
Q.14Easy
What is the primary advantage of using INNER JOIN over OUTER JOIN in SQL?
Answer: B
INNER JOIN returns only rows that have matching values in both tables, making queries more efficient for specific requirements.
Q.15Easy
In a relational database, what does normalization primarily aim to eliminate?
Answer: B
Normalization removes data redundancy and prevents update, insertion, and deletion anomalies through organized table structures.
Q.16Easy
Which algorithm has O(n log n) time complexity and is preferred for large datasets in modern databases?
Answer: B
Merge Sort maintains O(n log n) complexity in all cases and is stable, making it ideal for sorting large datasets.
Q.17Easy
What is the primary purpose of indexing in databases?
Answer: B
Indexes create a faster lookup structure similar to a book's index, enabling rapid data retrieval without full table scans.
Q.18Easy
In the OSI model, which layer is responsible for routing and logical addressing?
Answer: C
The Network Layer (Layer 3) handles routing, IP addressing, and logical path determination for data packets.
Q.19Easy
What is the main disadvantage of using a linked list compared to arrays?
Answer: A
Linked lists require extra memory for storing pointers/references in each node, making them memory-inefficient compared to arrays.
Q.20Easy
In AWS, what does the term 'Auto Scaling' primarily ensure?
Answer: B
AWS Auto Scaling automatically adjusts the number of EC2 instances based on demand metrics like CPU utilization or network traffic.