Database Management System (DBMS) MCQs

Computer

Database Management System (DBMS) MCQs

Practice DBMS MCQs covering database, data, information, DBMS, RDBMS and SQL basics with answers and explanations.

278
Total Questions

Practice Questions

Page 14 of 14
Question #261
Which condition-tester returns TRUE if a subquery returns one or more records, and FALSE if the subquery returns no rows?
A. EXISTS
B. IN
C. ANY
D. ALL

Correct Answer: Option A


Explanation:
The EXISTS operator is used to test for the presence of any records in a subquery, returning TRUE as soon as a single matching row is encountered.

This question belongs to: Computer Database Management System (DBMS)
Question #262
The intentional process of introducing redundant data into a normalized database structure to optimize read query performance is called what?
A. Denormalization
B. Decomposition
C. Fragmentation
D. Normalization

Correct Answer: Option A


Explanation:
Denormalization is a strategy applied to normalized databases where redundant data is selectively added to speed up complex read queries by minimizing costly table joins.

This question belongs to: Computer Database Management System (DBMS)
Question #263
Which type of database storage anomaly occurs when adding new data to a table is blocked because other unrelated data is missing?
A. Deletion Anomaly
B. Insertion Anomaly
C. Update Anomaly
D. Modification Anomaly

Correct Answer: Option B


Explanation:
An Insertion Anomaly occurs when certain facts cannot be recorded in a database table without falsely manufacturing or requiring the presence of other unrelated facts.

This question belongs to: Computer Database Management System (DBMS)
Question #264
What type of anomaly occurs when deleting a row inadvertently destroys other independent, valuable historical facts from the database?
A. Insertion Anomaly
B. Projection Anomaly
C. Selection Anomaly
D. Deletion Anomaly

Correct Answer: Option D


Explanation:
A Deletion Anomaly occurs when the deletion of a specific data record unintentionally deletes other distinct, unrelated information that should have been preserved.

This question belongs to: Computer Database Management System (DBMS)
Question #265
Which database anomaly describes the necessity to update the exact same data value in multiple independent rows, creating a risk of data inconsistency?
A. Update Anomaly
B. Structural Anomaly
C. Insertion Anomaly
D. Selection Anomaly

Correct Answer: Option A


Explanation:
An Update Anomaly occurs when data is redundantly duplicated across rows, requiring changes to be made to every copy, risking inconsistencies if any row is missed.

This question belongs to: Computer Database Management System (DBMS)
Question #266
Which clause is used to assign a temporary alias name to a column or table in an SQL statement for better readability?
A. WITH
B. USING
C. LIKE
D. AS

Correct Answer: Option D


Explanation:
The AS keyword is used to assign a temporary alias name to an expression, column, or table within an SQL statement query execution context.

This question belongs to: Computer Database Management System (DBMS)
Question #267
What kind of lock allows multiple concurrent transactions to read a database row simultaneously but blocks any transaction from writing to it?
A. Intent Lock
B. Deadlock
C. Shared Lock
D. Exclusive Lock

Correct Answer: Option C


Explanation:
A Shared Lock (S-lock) permits concurrent transactions to read a resource but prevents any modification operations until the lock is released.

This question belongs to: Computer Database Management System (DBMS)
Question #268
Which type of lock prevents other concurrent transactions from obtaining any form of lock on the same row, securing exclusive read and write access?
A. Shared Lock
B. Static Lock
C. Implicit Lock
D. Exclusive Lock

Correct Answer: Option D


Explanation:
An Exclusive Lock (X-lock) blocks all other locks, ensuring that only the transaction holding the lock can modify or read the protected resource.

This question belongs to: Computer Database Management System (DBMS)
Question #269
What is the situation called when two or more transactions are permanently blocked, each waiting for a lock held by the other transaction to be released?
A. Concurrency
B. Deadlock
C. Isolation failure
D. Starvation

Correct Answer: Option B


Explanation:
A Deadlock occurs when two or more transactions are stuck in a circular dependency, each waiting for resources locked by the other, preventing progress.

This question belongs to: Computer Database Management System (DBMS)
Question #270
Which operator in SQL is used to exclude specific data records from a search based on a collection of negative criteria?
A. MINUS
B. REMOVE
C. NOT IN
D. EXCEPT

Correct Answer: Option C


Explanation:
The NOT IN operator filters the query results to exclude records whose values match any element within the provided list or subquery.

This question belongs to: Computer Database Management System (DBMS)
Question #271
Which data model uses objects, classes, and inheritance features, mirroring concepts from object-oriented programming?
A. Relational Data Model
B. Network Data Model
C. Object-Oriented Data Model
D. Flat Data Model

Correct Answer: Option C


Explanation:
The Object-Oriented Data Model integrates object-oriented programming languages directly with databases, storing data as objects with attributes and methods.

This question belongs to: Computer Database Management System (DBMS)
Question #272
Which SQL component is used to specify a fallback default value for a column when no value is provided during an insert operation?
A. NOT NULL
B. CHECK
C. DEFAULT
D. UNIQUE

Correct Answer: Option C


Explanation:
The DEFAULT constraint assigns a predefined default value to a column when an INSERT statement does not explicitly provide a value for that column.

This question belongs to: Computer Database Management System (DBMS)
Question #273
Which of the following describes an 'Entity' in database terms?
A. A line connecting tables.
B. An action or method inside code.
C. A physical server rack.
D. A real-world object or concept that is distinguishable from other objects and about which data is stored.

Correct Answer: Option D


Explanation:
An Entity is a distinguishable real-world object, place, person, or concept captured within a database schema (e.g., Customer, Product).

This question belongs to: Computer Database Management System (DBMS)
Question #274
What is a 'foreign key' constraint specifically designed to prevent?
A. Slow search execution times.
B. Unauthorized login attempts to the database.
C. The use of duplicate data values within the primary key column.
D. Actions that would destroy links or introduce invalid references between tables.

Correct Answer: Option D


Explanation:
A Foreign Key constraint enforces referential integrity, preventing updates or deletions that would leave orphaned child records pointing to non-existent parent rows.

This question belongs to: Computer Database Management System (DBMS)
Question #275
Which of the following commands is a Data Manipulation Language (DML) statement?
A. UPDATE
B. RENAME
C. TRUNCATE
D. COMMENT

Correct Answer: Option A


Explanation:
UPDATE is a DML statement because it is used to modify existing data values within rows of a database table, rather than modifying the structural schema.

This question belongs to: Computer Database Management System (DBMS)
Question #276
Which statement about primary keys in a relational database table is completely true?
A. A table can contain at most one primary key.
B. A table can have multiple distinct primary keys.
C. Primary keys must always be numeric integers.
D. A primary key column can accept a single NULL value.

Correct Answer: Option A


Explanation:
A relational database table can have exactly one primary key constraint defined, which uniquely identifies each record and strictly forbids NULLs.

This question belongs to: Computer Database Management System (DBMS)
Question #277
What type of join returns all rows from the right table, paired with matching records from the left table, or filling in NULL values if no match is found?
A. Inner Join
B. Left Outer Join
C. Right Outer Join
D. Full Join

Correct Answer: Option C


Explanation:
A Right Outer Join retains all rows from the right table, pairing them with matching left table entries or supplying NULL values if matches do not exist.

This question belongs to: Computer Database Management System (DBMS)
Question #278
Which SQL statement is used to delete an existing view from the database catalog?
A. REMOVE VIEW
B. CLEAR VIEW
C. DELETE VIEW
D. DROP VIEW

Correct Answer: Option D


Explanation:
Because a View is a database structural object, it is removed from the database schema using the DDL command 'DROP VIEW'.

This question belongs to: Computer Database Management System (DBMS)