Home Subjects Computer Knowledge

Computer Knowledge

Programming, networking, database and OS questions

94 Q 2 Topics Take Mock Test
Advertisement
Difficulty: All Easy Medium Hard 21–30 of 94
Topics in Computer Knowledge
All C Programming 200 Database/SQL 100
Q.21 Easy Database/SQL
In cybersecurity, what is the primary purpose of a firewall?
A Control incoming and outgoing network traffic based on rules
B Encrypt all data transmitted
C Detect viruses and malware
D Manage user authentication
Correct Answer:  A. Control incoming and outgoing network traffic based on rules
EXPLANATION

Firewalls filter traffic based on security policies. While they provide protection, encryption is separate, antivirus is different, and authentication is handled by other systems.

Test
Q.22 Easy Database/SQL
In cloud computing, what does IaaS stand for?
A Infrastructure as a Service
B Integration as a Service
C Intelligent as a Service
D Internal as a Service
Correct Answer:  A. Infrastructure as a Service
EXPLANATION

IaaS provides virtualized computing resources over the internet (AWS EC2, Azure VMs). PaaS and SaaS are higher-level abstractions.

Test
Q.23 Easy Database/SQL
What is the time complexity of searching in a balanced binary search tree?
A O(log n)
B O(n)
C O(n log n)
D O(1)
Correct Answer:  A. O(log n)
EXPLANATION

Balanced BSTs (AVL, Red-Black) maintain O(log n) search time by keeping height logarithmic. Unbalanced trees degrade to O(n) in worst case.

Test
Q.24 Easy Database/SQL
In SQL, which JOIN returns only matching records from both tables?
A INNER JOIN
B LEFT JOIN
C FULL OUTER JOIN
D CROSS JOIN
Correct Answer:  A. INNER JOIN
EXPLANATION

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.

Test
Q.25 Easy Database/SQL
What does ACID stand for in database transactions?
A Atomicity, Consistency, Isolation, Durability
B Availability, Consistency, Integrity, Distribution
C Atomicity, Concurrency, Isolation, Data
D Authorization, Consistency, Integration, Durability
Correct Answer:  A. Atomicity, Consistency, Isolation, Durability
EXPLANATION

ACID properties ensure reliable database transactions: Atomicity (all-or-nothing), Consistency (valid state), Isolation (concurrent independence), and Durability (permanent storage).

Test
Q.26 Easy Database/SQL
Which of the following is a non-relational database designed for handling unstructured data at scale?
A MongoDB
B PostgreSQL
C Oracle Database
D MySQL
Correct Answer:  A. MongoDB
EXPLANATION

MongoDB is a NoSQL document database that handles unstructured and semi-structured data efficiently, unlike relational databases like PostgreSQL, Oracle, and MySQL.

Test
Q.27 Easy Database/SQL
What does the acronym ACID stand for in database transactions?
A Atomicity, Consistency, Isolation, Durability
B Access, Control, Integration, Distribution
C Accuracy, Completeness, Integrity, Detection
D Authorization, Concurrency, Indexing, Duration
Correct Answer:  A. Atomicity, Consistency, Isolation, Durability
EXPLANATION

ACID properties ensure reliable database transactions: Atomicity (all-or-nothing), Consistency (valid state), Isolation (concurrent independence), Durability (permanent storage).

Test
Q.28 Easy Database/SQL
Which of the following is NOT a characteristic of a relational database?
A Uses tables with rows and columns
B Enforces ACID properties
C Supports unstructured data storage by default
D Uses primary keys for unique identification
Correct Answer:  C. Supports unstructured data storage by default
EXPLANATION

Relational databases store structured data in tables. Unstructured data is typically stored in NoSQL or document databases.

Test
Q.29 Easy Database/SQL
In a hash table, what is the primary cause of collision?
A Two different keys hashing to the same index
B Insufficient memory allocation
C Poor sorting algorithm
D Network latency issues
Correct Answer:  A. Two different keys hashing to the same index
EXPLANATION

Hash collisions occur when two different keys hash to the same table index. Resolution techniques include chaining and open addressing.

Test
Q.30 Easy Database/SQL
Which SQL command is used to remove a table structure along with its data?
A DELETE
B DROP
C TRUNCATE
D REMOVE
Correct Answer:  B. DROP
EXPLANATION

DROP removes the entire table structure and data. DELETE removes only data. TRUNCATE removes data but is faster than DELETE.

Test
IGET
IGET AI
Online · Exam prep assistant
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