Home Subjects Computer Knowledge Database/SQL

Computer Knowledge
Database/SQL

Programming, networking, database and OS questions

100 Q 2 Topics Take Test
Advertisement
Difficulty: All Easy Medium Hard 81–90 of 100
Topics in Computer Knowledge
All C Programming 200 Database/SQL 100
Q.81 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.

Take Test
Q.82 Hard Database/SQL
In the context of graph databases, what is the primary advantage over relational databases for relationship-heavy queries?
A Lower storage requirements
B Faster execution of complex relationship traversals
C Better support for unstructured data
D Superior ACID compliance
Correct Answer:  B. Faster execution of complex relationship traversals
EXPLANATION

Graph databases excel at querying relationships with O(1) traversal time, whereas relational databases require expensive JOIN operations for similar queries.

Take Test
Q.83 Hard Database/SQL
What is the primary vulnerability addressed by SQL injection prevention techniques like parameterized queries?
A Buffer overflow attacks
B Injection of malicious SQL code into database queries
C Man-in-the-middle attacks
D DDoS attacks on database server
Correct Answer:  B. Injection of malicious SQL code into database queries
EXPLANATION

Parameterized queries prevent SQL injection by separating query structure from data, ensuring user input cannot be interpreted as executable code.

Take Test
Q.84 Hard Database/SQL
In network protocols, which layer does TCP/IP operate at?
A Physical Layer
B Data Link Layer
C Transport and Network Layers
D Application Layer only
Correct Answer:  C. Transport and Network Layers
EXPLANATION

TCP operates at Layer 4 (Transport) and IP at Layer 3 (Network) in the OSI model. Together they form the TCP/IP protocol suite.

Take Test
Q.85 Hard Database/SQL
Which of the following best describes eventual consistency in distributed databases?
A All nodes have identical data at all times
B Data will be consistent across all nodes eventually, not immediately
C Data consistency is never achieved
D Only primary nodes maintain consistency
Correct Answer:  B. Data will be consistent across all nodes eventually, not immediately
EXPLANATION

Eventual consistency is a model in NoSQL and distributed systems where updates propagate asynchronously, achieving consistency over time rather than immediately.

Take Test
Q.86 Hard Database/SQL
What is a deadlock in database management?
A A situation where transactions block indefinitely waiting for each other
B Loss of database connection
C Unauthorized access to database
D Corruption of data files
Correct Answer:  A. A situation where transactions block indefinitely waiting for each other
EXPLANATION

A deadlock occurs when two or more transactions wait for resources held by each other, creating a circular wait condition that prevents progress.

Take Test
Q.87 Medium Database/SQL
In machine learning basics, what is the purpose of training data in AI models?
A To test the final model accuracy
B To teach the model patterns and make predictions
C To validate model security
D To encrypt sensitive information
Correct Answer:  B. To teach the model patterns and make predictions
EXPLANATION

Training data is used to teach AI models to recognize patterns. Test data evaluates accuracy; validation data prevents overfitting.

Take Test
Q.88 Medium Database/SQL
What is the primary function of a query optimizer in a DBMS?
A Compile SQL queries into machine code
B Determine the most efficient execution plan for queries
C Encrypt sensitive data in queries
D Validate SQL syntax errors
Correct Answer:  B. Determine the most efficient execution plan for queries
EXPLANATION

The query optimizer analyzes different execution strategies and selects the one with minimal resource consumption and execution time.

Take Test
Q.89 Medium Database/SQL
Which sorting algorithm has the best average-case time complexity?
A Bubble Sort - O(n²)
B Merge Sort - O(n log n)
C Insertion Sort - O(n²)
D Selection Sort - O(n²)
Correct Answer:  B. Merge Sort - O(n log n)
EXPLANATION

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.

Take Test
Q.90 Medium Database/SQL
In cybersecurity, what does encryption primarily protect against?
A Physical theft of devices
B SQL injection attacks
C Unauthorized access to data during transmission
D Database schema changes
Correct Answer:  C. Unauthorized access to data during transmission
EXPLANATION

Encryption converts data into unreadable format, protecting it from unauthorized access during transmission and storage.

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