DBMS MCQ
Table of Contents
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.
31) SELECT * FROM employee JOIN takes USING (id);
The above query is equivalent to:
A. SELECT * FROM employee LEFT JOIN takes USING (id);
B. SELECT * FROM employee RIGHT JOIN takes USING (id);
C. SELECT * FROM employee INNER JOIN takes USING (id);
D. All of the mentioned above
Answer: c
Explanation: We can also write JOIN instead of INNER JOIN. JOIN is the same as INNER JOIN.
32) Which set operation is used to return the common row from relation?
A. Union
B. Union all
C. Intersect
D. Minus
Answer: c
Explanation: The intersect operation combines two SELECT statements and returns the common rows from both the SELECT statement.
33) Which set operation should be used with the SELECT statements to eliminate duplicate rows?
A. Union
B. Union all
C. Intersect
D. Minus
Answer: a
Explanation: The union operation eliminates the duplicate rows from its result set.
34) If we want to retain all duplicates, we must write_______in place of union.
A. Union all
B. Intersect
C. Minus
D. All of the above
Answer: a
Explanation: Union all returns the result without removing duplicate rows.
35) Which of the following makes the transaction permanent in the database?
A. Commit
B. Rollback
C. Flashback
D. View
Answer: a
Explanation: Commit operation is used to save the work permanently in the database.
36) In which state, a transaction executes all its operations successfully?
A. Active
B. Committed
C. Partially committed
D. Aborted
Answer: b
Explanation: A complete transaction is always committed.
37) Which of the following is used to preserve the order of the operation?
A. Schedule
B. Atomicity
C. Active state
D. None of the above
Answer: a
Explanation: A series of operations from one transaction to another transaction is known as a schedule, which is used to preserve the order of the operation in each of the individual transactions.
38) _______will undo all statements up to commit?
A. Rollback
B. Commit
C. Partially committed
D. Abort
Answer: a
Explanation: The rollback operation is used to undo the work done.
39) OLAP stands for
A. Online analytical processing
B. Online analysis processing
C. Online transaction processing
D. Online aggregate processing
Answer: a
Explanation: OLAP is the manipulation of information to support decision making.
40) In which normal form multi-valued attribute, composite attribute and their combination are not allowed?
A. First Normal Form (1NF)
B. Second Normal Form (2NF)
C. Third Normal Form (3NF)
D. Fourth Normal Form (4NF)
Answer: a
Explanation: The first normal form is used to eliminate duplicate values, and an attribute of a table cannot hold multiple values.