Computer Knowledge — Database/SQL
Aptitude · Reasoning · English · CS — Corporate & Campus Interview Prep
100 Questions 5 Topics Take Test
Advertisement
Showing 61–70 of 100 questions in Database/SQL
Q.61 Hard Database/SQL
In a B-tree of order m, what is the maximum number of keys that a non-root node can contain?
A m-1
B m
C 2m-1
D 2m
Correct Answer:  C. 2m-1
Explanation:

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.

Take Test
Q.62 Medium Database/SQL
Which of the following is a correct SQL syntax for creating an index on multiple columns?
A CREATE INDEX idx_name ON table_name (col1, col2);
B CREATE UNIQUE INDEX idx_name ON table_name (col1, col2);
C CREATE INDEX idx_name ON table_name COLUMNS (col1, col2);
D Both A and B are correct
Correct Answer:  D. Both A and B are correct
Explanation:

Both syntaxes are valid in SQL. The first creates a composite index, while the second creates a unique composite index.

Take Test
Q.63 Easy Database/SQL
What is the main disadvantage of using a linked list compared to arrays?
A Linked lists use more memory due to pointers
B Linked lists have O(1) insertion at beginning
C Linked lists cannot be sorted
D Linked lists have cache locality issues
Correct Answer:  A. Linked lists use more memory due to pointers
Explanation:

Linked lists require extra memory for storing pointers/references in each node, making them memory-inefficient compared to arrays.

Take Test
Q.64 Easy Database/SQL
In AWS, what does the term 'Auto Scaling' primarily ensure?
A Automatic backup of databases
B Automatic adjustment of compute capacity based on demand
C Automatic encryption of data
D Automatic software updates
Correct Answer:  B. Automatic adjustment of compute capacity based on demand
Explanation:

AWS Auto Scaling automatically adjusts the number of EC2 instances based on demand metrics like CPU utilization or network traffic.

Take Test
Q.65 Medium Database/SQL
Which sorting algorithm has the best average-case time complexity for randomly distributed data?
A Bubble Sort - O(n²)
B Quick Sort - O(n log n)
C Insertion Sort - O(n²)
D Selection Sort - O(n²)
Correct Answer:  B. Quick Sort - O(n log n)
Explanation:

Quick Sort has O(n log n) average-case complexity, making it most efficient for random data. Though worst-case is O(n²), randomized pivot selection minimizes this risk.

Take Test
Advertisement
Q.66 Medium Database/SQL
What does ACID compliance in databases ensure?
A Data is always encrypted
B Atomicity, Consistency, Isolation, and Durability of transactions
C Automatic data compression
D Asynchronous data backup
Correct Answer:  B. Atomicity, Consistency, Isolation, and Durability of transactions
Explanation:

ACID is a fundamental database property: Atomicity (all-or-nothing), Consistency (valid state), Isolation (concurrent independence), Durability (permanent after commit).

Take Test
Q.67 Easy Database/SQL
What is the primary function of a hash table data structure?
A To maintain sorted data
B To provide O(1) average-case lookup time using hash functions
C To implement tree traversal
D To perform recursive function calls
Correct Answer:  B. To provide O(1) average-case lookup time using hash functions
Explanation:

Hash tables use hash functions to map keys to indices, providing O(1) average-case lookup, insertion, and deletion operations.

Take Test
Q.68 Medium Database/SQL
Which cloud service model provides pre-configured application environments?
A IaaS (Infrastructure as a Service)
B PaaS (Platform as a Service)
C SaaS (Software as a Service)
D DaaS (Database as a Service)
Correct Answer:  B. PaaS (Platform as a Service)
Explanation:

PaaS provides a complete development and deployment environment in the cloud, including pre-configured tools and frameworks.

Take Test
Q.69 Easy Database/SQL
What is the time complexity of the binary search algorithm on a sorted array?
A O(n)
B O(log n)
C O(n log n)
D O(n²)
Correct Answer:  B. O(log n)
Explanation:

Binary search divides the search space in half with each iteration, resulting in O(log n) time complexity on sorted data.

Take Test
Q.70 Hard Database/SQL
In database normalization, what does the Boyce-Codd Normal Form (BCNF) address that 3NF might miss?
A Elimination of multivalued dependencies
B Removal of anomalies from composite candidate keys
C Prevention of circular foreign keys
D Ensuring data type consistency
Correct Answer:  B. Removal of anomalies from composite candidate keys
Explanation:

BCNF handles edge cases in 3NF where anomalies can occur with composite candidate keys where determinants are not candidate keys themselves.

Take Test
IGET
iget AI
Online · Ask anything about exams
Hi! 👋 I'm your iget AI assistant.

Ask me anything about exam prep, MCQ solutions, study tips, or strategies! 🎯
UPSC strategy SSC CGL syllabus Improve aptitude NEET Biology tips