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 13 of 14
Question #241
Which normal form is stricter than 3NF and is often described as a configuration where every determinant must be a candidate key?
A. Boyce-Codd Normal Form (BCNF)
B. 5NF
C. 4NF
D. 2NF

Correct Answer: Option A


Explanation:
Boyce-Codd Normal Form (BCNF) is a stronger version of 3NF. A relation is in BCNF if, for every non-trivial functional dependency X -> Y, X is a candidate key.

This question belongs to: Computer Database Management System (DBMS)
Question #242
Which type of JOIN returns all matching rows from both tables, plus all unmatched rows from the left table with NULL values filled in for the right table columns?
A. Inner Join
B. Left Outer Join
C. Full Outer Join
D. Right Outer Join

Correct Answer: Option B


Explanation:
A Left Outer Join preserves all records from the left table, matching them with right table records when possible, or inserting NULL values if no match is found.

This question belongs to: Computer Database Management System (DBMS)
Question #243
Which type of JOIN combines all rows from the left table and all rows from the right table, filling in NULLs wherever a match is missing on either side?
A. Inner Join
B. Natural Join
C. Cross Join
D. Full Outer Join

Correct Answer: Option D


Explanation:
A Full Outer Join combines the behavior of both Left and Right Outer Joins, returning all rows from both tables and applying NULL values where matches do not exist.

This question belongs to: Computer Database Management System (DBMS)
Question #244
What type of join produces a Cartesian product, matching every single row of the first table with every single row of the second table?
A. Cross Join
B. Natural Join
C. Inner Join
D. Left Join

Correct Answer: Option A


Explanation:
A Cross Join returns the Cartesian product of the two tables, multiplying the total number of rows from the first table by the number of rows in the second table.

This question belongs to: Computer Database Management System (DBMS)
Question #245
Which operator is used to combine the distinct result sets of two or more SELECT queries into a single output, automatically filtering out duplicate rows?
A. UNION ALL
B. UNION
C. EXCEPT
D. INTERSECT

Correct Answer: Option B


Explanation:
The UNION operator merges the result sets of two queries, removing any duplicate records. UNION ALL performs a similar merge but retains duplicates.

This question belongs to: Computer Database Management System (DBMS)
Question #246
Which SQL set operator combines the output of two queries but preserves all duplicate rows without filtering them?
A. MINUS
B. UNION ALL
C. UNION
D. INTERSECT

Correct Answer: Option B


Explanation:
UNION ALL appends the results of multiple SELECT queries together without performing any deduplication, making it faster than UNION.

This question belongs to: Computer Database Management System (DBMS)
Question #247
Which SQL operator returns only the rows that are common and present in the outputs of both executing SELECT queries?
A. JOIN
B. INTERSECT
C. UNION
D. EXCEPT / MINUS

Correct Answer: Option B


Explanation:
The INTERSECT operator returns only the distinct rows that appear in the result sets of both SELECT statements.

This question belongs to: Computer Database Management System (DBMS)
Question #248
What does a database constraint called a 'CHECK' constraint do?
A. It verifies user authentication passwords.
B. It automatically links tables together.
C. It checks if the database server is running safely.
D. It limits the range of values that can be placed in a column based on a specific condition.

Correct Answer: Option D


Explanation:
A CHECK constraint enforces domain integrity by limiting the values accepted by a column to only those that satisfy a specified Boolean predicate.

This question belongs to: Computer Database Management System (DBMS)
Question #249
Which concept represents a temporary workspace in memory used by database engines to fetch, manipulate, and navigate through query rows one at a time?
A. View
B. Cursor
C. Trigger
D. Index

Correct Answer: Option B


Explanation:
A Cursor is a database control structure that allows an application or script to traverse over the records of a query result set row by row.

This question belongs to: Computer Database Management System (DBMS)
Question #250
Which of the following database concepts deals with grouping a set of SQL statements into a single logical unit of execution?
A. Normalization
B. Indexing
C. View definition
D. Transaction

Correct Answer: Option D


Explanation:
A Transaction is a sequence of one or more SQL operations treated as a single, indivisible unit of work that must either succeed completely or fail completely.

This question belongs to: Computer Database Management System (DBMS)
Question #251
What happens when a database transaction triggers a 'COMMIT' statement?
A. The transaction pauses temporarily.
B. The transaction is aborted and wiped.
C. All changes made by the transaction are made permanent on disk storage.
D. The database structure is dropped.

Correct Answer: Option C


Explanation:
Executing a COMMIT statement instructs the database engine to save all data updates performed during the transaction permanently into physical storage.

This question belongs to: Computer Database Management System (DBMS)
Question #252
Which of the following describes a precompiled collection of SQL statements stored on the database server that can be executed repeatedly by name?
A. Trigger
B. Cursor
C. View
D. Stored Procedure

Correct Answer: Option D


Explanation:
A Stored Procedure is a precompiled group of SQL statements and optional control-of-flow code stored in the database server, enhancing execution speed and security.

This question belongs to: Computer Database Management System (DBMS)
Question #253
In the relational model, what is the term used to describe the header or definition of a table specifying its name and attributes?
A. Relation Instance
B. Relation Card
C. Relation Domain
D. Relation Schema

Correct Answer: Option D


Explanation:
A Relation Schema defines the structure of a relation, specifying its name and the list of attributes along with their data types.

This question belongs to: Computer Database Management System (DBMS)
Question #254
The actual collection of data tuples stored in a table at any specific point in time is called a what?
A. Relation Degree
B. Relation Instance
C. Relation Domain
D. Relation Schema

Correct Answer: Option B


Explanation:
A Relation Instance is the specific collection of data rows (tuples) present in a table at a given moment. It changes frequently as data is modified.

This question belongs to: Computer Database Management System (DBMS)
Question #255
Which constraint ensures that every value in a specific column is unique across all rows in that table, but still permits a NULL value?
A. PRIMARY KEY
B. FOREIGN KEY
C. CHECK
D. UNIQUE

Correct Answer: Option D


Explanation:
The UNIQUE constraint prevents duplicate entries in a column. Unlike a Primary Key, a UNIQUE constraint typically allows one or more rows to store NULL values depending on the database engine.

This question belongs to: Computer Database Management System (DBMS)
Question #256
Which SQL keyword is used within a SELECT query to filter records matching a specified pattern using wildcards?
A. LIKE
B. EXISTS
C. IN
D. BETWEEN

Correct Answer: Option A


Explanation:
The LIKE operator is specifically used in a WHERE clause to perform pattern matching on string columns using wildcards (% and _).

This question belongs to: Computer Database Management System (DBMS)
Question #257
Which operator allows you to specify a range of values to filter query results, including the specified start and end endpoints?
A. WITHIN
B. LIKE
C. BETWEEN
D. IN

Correct Answer: Option C


Explanation:
The BETWEEN operator selects values within a specific inclusive range. It is shorthand for a combination of greater-than-or-equal-to and less-than-or-equal-to conditions.

This question belongs to: Computer Database Management System (DBMS)
Question #258
Which SQL operator allows you to check if a column value matches any item contained within a comma-separated list of explicit values?
A. IN
B. LIKE
C. EXISTS
D. BETWEEN

Correct Answer: Option A


Explanation:
The IN operator allows you to specify multiple literal values or a subquery inside a WHERE clause, testing if an attribute matches any element in the list.

This question belongs to: Computer Database Management System (DBMS)
Question #259
What is a subquery in database terminology?
A. An error log file.
B. A query that executes after the main query terminates.
C. A nested SQL query placed completely inside another outer query statement.
D. A query that runs on a backup server.

Correct Answer: Option C


Explanation:
A subquery (or nested query) is an inner SQL SELECT statement embedded within an outer statement (such as a WHERE, FROM, or SELECT clause).

This question belongs to: Computer Database Management System (DBMS)
Question #260
Which type of subquery executes once for each row evaluated by the outer query, depending on values provided by the outer statement?
A. Scalar Subquery
B. Independent Subquery
C. Static Subquery
D. Correlated Subquery

Correct Answer: Option D


Explanation:
A Correlated Subquery is an inner query that references columns from the outer query, meaning it must be executed repeatedly for each row evaluated by the outer query.

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