Database Management System Questions and Answers
DBMS Multiple Choice Questions with Answers
- Question: Which of the following is not a type of database model?
- A) Relational
- B) Hierarchical
- C) Sequential
- D) Network
- Answer: C) Sequential
- Question: What is the primary key in a relational database?
- A) A key that uniquely identifies each row in a table
- B) A key that is used to sort data in a table
- C) A key that is used to create relationships between tables
- D) A key that is used for indexing purposes
- Answer: A) A key that uniquely identifies each row in a table
- Question: Which SQL command is used to retrieve data from a database?
- A) SELECT
- B) UPDATE
- C) DELETE
- D) INSERT
- Answer: A) SELECT
- Question: In a relational database, a foreign key is used to:
- A) Create a link between two tables
- B) Ensure data integrity
- C) Establish a primary key
- D) Sort data in a table
- Answer: A) Create a link between two tables
- Question: Which of the following is not a data manipulation command in SQL?
- A) INSERT
- B) CREATE
- C) UPDATE
- D) DELETE
- Answer: B) CREATE
- Question: Which of the following is not a SQL aggregate function?
- A) SUM
- B) AVG
- C) ADD
- D) COUNT
- Answer: C) ADD
- Question: In a relational database, a table is also known as:
- A) Tuple
- B) Entity
- C) Attribute
- D) Relation
- Answer: D) Relation
- Question: Which of the following is not a component of ACID properties in DBMS?
- A) Atomicity
- B) Consistency
- C) Isolation
- D) Durability
- Answer: C) Isolation
- Question: Which SQL command is used to add a new column to an existing table?
- A) ALTER TABLE
- B) CREATE TABLE
- C) ADD COLUMN
- D) UPDATE TABLE
- Answer: A) ALTER TABLE
- Question: Which of the following is used to enforce referential integrity in a relational database?
- A) Foreign key constraints
- B) Primary key constraints
- C) Check constraints
- D) Unique constraints
- Answer: A) Foreign key constraints
- Question: Which of the following is true about a DBMS?
- A) It is hardware-independent
- B) It is only used for storing data
- C) It does not support transaction management
- D) It cannot enforce data integrity constraints
- Answer: A) It is hardware-independent
- Question: Which SQL command is used to delete a table from a database?
- A) DELETE
- B) DROP
- C) TRUNCATE
- D) REMOVE
- Answer: B) DROP
- Question: What does DDL stand for in the context of a database?
- A) Data Definition Language
- B) Data Description Language
- C) Database Definition Language
- D) Database Description Language
- Answer: A) Data Definition Language
- Question: Which of the following is an example of a NoSQL database?
- A) MySQL
- B) Oracle
- C) MongoDB
- D) SQL Server
- Answer: C) MongoDB
- Question: What is a view in a database?
- A) A virtual table based on the result of a SELECT query
- B) A physical table that stores data permanently
- C) A table used for temporary storage
- D) A table that contains metadata about other tables
- Answer: A) A virtual table based on the result of a SELECT query
- Question: Which SQL command is used to change the data in a database?
- A) UPDATE
- B) MODIFY
- C) ALTER
- D) CHANGE
- Answer: A) UPDATE
- Question: What does OLAP stand for in the context of databases?
- A) Online Application Processing
- B) Online Analytical Processing
- C) Offline Application Processing
- D) Offline Analytical Processing
- Answer: B) Online Analytical Processing
- Question: Which of the following is not a type of database index?
- A) B-tree index
- B) Hash index
- C) Tree index
- D) Sequence index
- Answer: D) Sequence index
- Question: What is the purpose of a transaction in a database?
- A) To perform data manipulation operations
- B) To store metadata about the database
- C) To ensure data consistency and integrity
- D) To manage database connections
- Answer: C) To ensure data consistency and integrity
- Question: Which SQL command is used to retrieve unique rows from a table?
- A) UNIQUE
- B) DISTINCT
- C) UNIQUE_ROWS
- D) DISTINCT_ROWS
- Answer: B) DISTINCT