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 9 of 14
Question #161
What is the role of the 'WHERE' clause in an UPDATE statement?
A. To sort the results
B. To specify the new values
C. To join tables
D. To specify which rows to update

Correct Answer: Option D


Explanation:
The WHERE clause in UPDATE identifies the rows that will be updated. Without it, all rows would be updated.

This question belongs to: Computer Database Management System (DBMS)
Question #162
Which of the following is a true statement about indexes?
A. Indexes always improve performance
B. Indexes cannot be created on views
C. Indexes are only used for primary keys
D. Indexes improve the speed of SELECT queries but can slow down INSERT, UPDATE, and DELETE operations

Correct Answer: Option D


Explanation:
Indexes speed up data retrieval but require additional maintenance during data modifications, which can slow down DML operations.

This question belongs to: Computer Database Management System (DBMS)
Question #163
What is a data mart?
A. A backup technique
B. A subset of a data warehouse focused on a specific business unit or function
C. A query language
D. A type of database

Correct Answer: Option B


Explanation:
A data mart is a specialized data warehouse for a specific department, team, or subject area.

This question belongs to: Computer Database Management System (DBMS)
Question #164
Which of the following is a valid SQL string function?
A. All of the above
B. CONCAT
C. SUBSTRING
D. REPLACE

Correct Answer: Option A


Explanation:
SUBSTRING, CONCAT, and REPLACE are common string functions in SQL.

This question belongs to: Computer Database Management System (DBMS)
Question #165
What is the purpose of the SQL 'NULL' value?
A. To represent empty string
B. To represent zero
C. To represent missing or unknown data
D. To represent an error

Correct Answer: Option C


Explanation:
NULL is a special marker indicating that a value is unknown or missing, not the same as zero or empty string.

This question belongs to: Computer Database Management System (DBMS)
Question #166
In SQL, how do you check if a value is NOT NULL?
A. IS NULL
B. != NULL
C. NOT NULL
D. IS NOT NULL

Correct Answer: Option D


Explanation:
IS NOT NULL is the correct operator to test for non-NULL values.

This question belongs to: Computer Database Management System (DBMS)
Question #167
What is a composite index?
A. An index on multiple columns
B. An index that is a primary key
C. An index on a single column
D. An index on a view

Correct Answer: Option A


Explanation:
A composite index is created on two or more columns, often used to speed up queries that filter on those columns.

This question belongs to: Computer Database Management System (DBMS)
Question #168
Which of the following is a valid SQL statement to add a primary key to an existing table?
A. ADD PRIMARY KEY ON table_name (column_name);
B. Both A and C
C. ALTER TABLE table_name ADD CONSTRAINT pk_name PRIMARY KEY (column_name);
D. ALTER TABLE table_name ADD PRIMARY KEY (column_name);

Correct Answer: Option B


Explanation:
Both syntaxes are valid: ADD PRIMARY KEY (column) and ADD CONSTRAINT ... PRIMARY KEY (column).

This question belongs to: Computer Database Management System (DBMS)
Question #169
What is a database cursor?
A. A backup file
B. A control structure that enables traversal over rows in a result set
C. A type of index
D. A user account

Correct Answer: Option B


Explanation:
A cursor allows row-by-row processing of query results, often used in procedural extensions of SQL.

This question belongs to: Computer Database Management System (DBMS)
Question #170
Which of the following is a property of a well-designed database?
A. Ease of data maintenance
B. Support for efficient data retrieval
C. Avoidance of data redundancy
D. All of the above

Correct Answer: Option D


Explanation:
Good database design aims to minimize redundancy, simplify maintenance, and provide efficient access.

This question belongs to: Computer Database Management System (DBMS)
Question #171
What is the purpose of the SQL 'IN' operator?
A. To check if a value is null
B. To check if a value is between two values
C. To join tables
D. To check if a value matches any value in a list

Correct Answer: Option D


Explanation:
IN is used to test membership in a set of values.

This question belongs to: Computer Database Management System (DBMS)
Question #172
Which of the following is a valid SQL numeric function?
A. ROUND
B. All of the above
C. FLOOR
D. CEILING

Correct Answer: Option B


Explanation:
ROUND, CEILING, and FLOOR are common mathematical functions in SQL.

This question belongs to: Computer Database Management System (DBMS)
Question #173
What is the difference between a database and a database management system?
A. Database is a file; DBMS is a table
B. DBMS is the data; database is the software
C. They are the same
D. A database is the data; DBMS is the software that manages it

Correct Answer: Option D


Explanation:
A database is a collection of structured data, while a DBMS is the software used to interact with and manage that data.

This question belongs to: Computer Database Management System (DBMS)
Question #174
Which of the following is a valid SQL statement to create a view?
A. Both A and B
B. CREATE VIEW view_name AS SELECT ...;
C. CREATE VIEW view_name (columns) AS SELECT ...;
D. Neither

Correct Answer: Option A


Explanation:
Both syntaxes are valid: CREATE VIEW view_name AS SELECT ... and with column aliases.

This question belongs to: Computer Database Management System (DBMS)
Question #175
What is the purpose of a database index?
A. To enforce uniqueness
B. To speed up data retrieval operations
C. To define relationships
D. To store large objects

Correct Answer: Option B


Explanation:
Indexes are primarily used to improve the speed of data retrieval, particularly for search queries.

This question belongs to: Computer Database Management System (DBMS)
Question #176
Which of the following is a feature of SQL?
A. It is used to define, manipulate, and control data
B. All of the above
C. It is a declarative language
D. It is the standard language for relational databases

Correct Answer: Option B


Explanation:
SQL is a declarative language used for defining, manipulating, and controlling data in relational databases.

This question belongs to: Computer Database Management System (DBMS)
Question #177
Which of the following represents raw, unorganized, and unprocessed facts that lack contextual meaning?
A. Metadata
B. Data
C. Knowledge
D. Information

Correct Answer: Option B


Explanation:
Data refers to raw, unorganized, and unprocessed facts, figures, or symbols that do not convey a specific meaning on their own. When data is processed and organized, it becomes information.

This question belongs to: Computer Database Management System (DBMS)
Question #178
Data that has been processed, organized, structured, or presented in a given context to make it useful is known as what?
A. Information
B. Field
C. Raw facts
D. Database

Correct Answer: Option A


Explanation:
Information is data that has been processed, structured, or organized in a meaningful way to provide context and utility to the user.

This question belongs to: Computer Database Management System (DBMS)
Question #179
What is 'data about data' commonly referred to in a Database Management System?
A. Hyper-data
B. Sub-data
C. Directory
D. Metadata

Correct Answer: Option D


Explanation:
Metadata is defined as data about data. It describes the structure, constraints, data types, and properties of the actual data stored in a database.

This question belongs to: Computer Database Management System (DBMS)
Question #180
Which software utility serves as an interface between an application program and the physical database files?
A. Linker
B. Database Management System (DBMS)
C. Operating System
D. Compiler

Correct Answer: Option B


Explanation:
A Database Management System (DBMS) acts as an interface between application software and the underlying physical database, managing data storage, retrieval, and updates.

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