( Best 100+ ) DBMS MCQ

by Mr. DJ

DBMS MCQ

What is a Database?

A database is a collection of related data which represents some aspect of the real world. A database system is designed to be built and populated with data for a certain task.

What is DBMS?

Database Management System (DBMS) is a software for storing and retrieving users’ data while considering appropriate security measures. It consists of a group of programs which manipulate the database. The DBMS accepts the request for data from an application and instructs the operating system to provide the specific data. In large systems, a DBMS helps users and other third-party software to store and retrieve data.

DBMS allows users to create their own databases as per their requirement. The term “DBMS” includes the user of the database and other application programs. It provides an interface between the data and the software application.

In this section, we are going to cover some of the basic questions based on DBMS, which are frequently asked during an interview. Here we will try to cover almost all the topics related to DBMS.

DBMS MCQ

11) Which of the following SQL command mentioned below is used to create a table, delete the table, and alter the table?
A. DML(Data manipulating language)
B. DDL(Data definition language)
C. DQL(Data query language)
D. Relational Schema

Answer: b
Explanation: DDL command is the right choice because the DML command is used to make any changes in the database, DQL is used to retrieve any information from the database, and relational schema is the structure of relation.

12) If we want to remove some information from the database, then which of the following SQL command should we perform?
A. DML
B. TCL
C. DCL
D. DDL

Answer: a
Explanation: Whenever we need to make any changes like INSERT, DELETE, UPDATE in the database, then we need to perform the DML command.

13) SELECT * FROM student;
Which of the following option is suitable for the given statement?
A. DML
B. DQL
C. DDL
D. DDL

Answer: b
Explanation: SELECT is used to fetch values from the database

14) CREATE TABLE student (name VARCHAR (10), id INTEGER)
Choose the correct option for the given statement.
A. DDL
B. DML
C. DQL
D. TCL

Answer: a
Explanation: CREATE command is used to build a table in the database.

15) To delete all the rows from a table, we need to apply the…… command.
A. Truncate
B. Remove
C. Drop table
D. Delete

Answer: a
Explanation: Truncate is used to delete complete data without removing the table structure.

16) Which of the following command is used to delete a table from the database?
A. DROP
B. DELETE
C. TRUNCATE
D. REMOVE

Answer: a
Explanation: The DROP command is used to remove the table from the database, DELETE is used to remove one or more rows from a table in the database.

17) DELETE FROM X
What does the above statement mean?
A. Delete table
B. Delete row
C. Delete fields
D. Remove entry x

Answer: d
Explanation: The DELETE command removes the table entries.

18) The basic data type of SQL varchar(n) has ….. length Unicode characters, and char(n) has …… length Unicode characters.
A. Fixed, Variable
B. Fixed, Fixed
C. Variable, Variable
D. Variable, Fixed

Answer: d
Explanation: The storage required for the char and varchar variable is different. Char() has a static allocation of space, whereas varchar() has a dynamic allocation of space. So the length of varchar() will vary according to the specified string.

19) Which of the following command is used to display any values from the database?
A. SELECT
B. INSERT
C. DELETE
D. TRUNCATE

Answer: a
Explanation: SELECT command is used to fetch values from the table. The syntax for the SELECT command is SELECT * FROM table_name;

20) _________statement returns only distinct values from the table.
A. Different
B. Distinct
C. None
D. All

Answer: b
Explanation: The table column may contain duplicate values. If we need the unique value from any column, we need to apply a distinct command. The syntax for the distinct command is:

You may also like

Leave a Comment