SQL MCQ Class 12
- Which of the following is not an SQL command?
a. Create Database
b. Create Table
c. Create Query
d. Show Table
Show Answer
c. Create Query
- A table can have __ foreign keys
a. 1
b. 2
c. Many
d. Depends on RDBMS
Show Answer
c. Many
- In which of the following case DML is not executed?
a. When new record is added
b. When existing record is modified
c. When existing attribute is modified
d. When records are deleted
Show Answer
c. When existing attribute is modified
- Which is the correct difference between Primary key and Foreign key?
a. A table can have multiple primary key and single foreign key
b. A primary key cannot ignore NULL value but Foreign key can
c. A Primary key can have duplicate data but foreign key does not
d. None of the above
Show Answer
b. A primary key cannot ignore NULL value but Foreign key can
- in SQL ‘FROM’ clause is used to
a. Define source table name while retrieving records
b. Define Column name while retrieving records
c. Define Criteria while retrieving records
d. Define values while inserting records
Show Answer
a. Define source table name while retrieving records
- Which if the following is not an SQL aggregate function?
a. Avg
b. Max
c. Count
d. All are aggregate function
Show Answer
d. All are aggregate function
- SQL stands for
a. Structured Question Language
b. Structured Query Language
c. Super Query Language
d. System Query Language
Show Answer
b. Structured Query Language
- Which of the following is not true about DDL ?
a. The retrieval of information stored in database
b. The creation of schema object in database
c. The deletion of schema object
d. All are not True
Show Answer
a. The retrieval of information stored in database
- DELETE FROM Book where Price <= 2000;
is a _________type of statement
a. DDL
b. DML
c. DCL
d. None
Show Answer
b. DML
- A table can not have more than one UNIQUE keys.
a. True
b. False
c. Depends upon Primary key
d. Depends upon RDBMS
Show Answer
b. False
- For given table ‘emp’ with following columns
eno, ename, sal, dept, designation
Select correct statement to display all records of ‘emp’ in descending order of ename and within ascending order of dept.
a. SELECT * FROM emp ORDER BY ename, dept DESC;
b. SELECT * FROM emp ORDER BY ename, ORDER BY dept DESC;
c. SELECT * FROM emp ORDER BY ename DESC, dept;
d. SELECT * FROM emp WHERE ORDER BY ename, dept DESC;
Show Answer
c. SELECT * FROM emp ORDER BY ename DESC, dept;
- Which of the following is not an SQL Constraint?
a. IS NULL
b. Primary Key
c. Default
d. Check
Show Answer
a. IS NULL
- Select correct SQL statement to increase price of books by 10% in book table.
a. UPDATE book SET price = price0.1;
b. UPDATE book SET price = price + price0.1;
c. UPDATE book WHERE price = price0.1;
d. UPDATE book WHERE price = price + price0.1;
Show Answer
b. UPDATE book SET price = price + price0.1;
Database Management System MCQ (Multiple Choice Questions)
1. What is the full form of DBMS?
a) Data of Binary Management System
b) Database Management System
c) Database Management Service
d) Data Backup Management System
View Answer
Answer: b
Explanation: DBMS is abbreviated as Database Management System. Database Management System stores the data and allows authorized users to manipulate and modify the data.
2. What is a database?
a) Organized collection of information that cannot be accessed, updated, and managed
b) Collection of data or information without organizing
c) Organized collection of data or information that can be accessed, updated, and managed
d) Organized collection of data that cannot be updated
View Answer
Answer: c
Explanation: It is defined as an organized collection of data or information for easy access, updating, and management in a computer.
3. What is DBMS?
a) DBMS is a collection of queries
b) DBMS is a high-level language
c) DBMS is a programming language
d) DBMS stores, modifies and retrieves data
View Answer
Answer: d
Explanation: DBMS is nothing but a storehouse wherein the authorized user can create a database to store, modify or retrieve the organized data in the table. It can be modified or retrieved by users who have access to DBMS only.
4. Who created the first DBMS?
a) Edgar Frank Codd
b) Charles Bachman
c) Charles Babbage
d) Sharon B. Codd
View Answer
Answer: b
Explanation: Charles Bachman along with his team invented the first DBMS known as Integrated Data Store (IDS).
5. Which type of data can be stored in the database?
a) Image oriented data
b) Text, files containing data
c) Data in the form of audio or video
d) All of the above
View Answer
Answer: d
Explanation: The reason for creating the database management system was to store large data and these data can be of any form image, text, audio, or video files, etc. DBMS allows the users to store and access the data of any format.
advertisement
6. In which of the following formats data is stored in the database management system?
a) Image
b) Text
c) Table
d) Graph
View Answer
Answer: c
Explanation: The data is stored in a table format intended to manage the storage of data and manipulate stored data to generate information.
7. Which of the following is not a type of database?
a) Hierarchical
b) Network
c) Distributed
d) Decentralized
View Answer
Answer: d
Explanation: Different types are:
1) Centralized
2) Distributed
3) Relational
4) NoSQL
5) Cloud
6) Object-oriented
7) Hierarchical
8) Network
8. Which of the following is not an example of DBMS?
a) MySQL
b) Microsoft Acess
c) IBM DB2
d) Google
View Answer
Answer: d
Explanation: MySQL, Microsoft Access, IBM DB2 are database management systems while Google is a search engine. MySQL is a Linux-based database management system, Microsoft Access is a tool that is a part of Microsoft Office used to store data, IBM DB2 is a database management system developed by IBM. Google’s Bigtable is the database that runs Google’s Internet search, Google Maps, YouTube, Gmail, and other products.
9. Which of the following is a feature of DBMS?
a) Minimum Duplication and Redundancy of Data
b) High Level of Security
c) Single-user Access only
d) Support ACID Property
View Answer
Answer: c
Explanation: The important features of a database management system are:
1) Minimum Duplication and Redundancy of Data
2) High Level of Security
3) Mulitple-user Access
4) Support ACID Property
10. Which of the following is a feature of the database?
a) No-backup for the data stored
b) User interface provided
c) Lack of Authentication
d) Store data in multiple locations
View Answer
Answer: b
Explanation: The important features are:
1) Provides backup for the data stored by the user and the user can retrieve the data whenever required.
2) Provides User-interface to access the data.
3) Only authorized users can access the stored data.
4) Data is stored in one central location but multiple authorized users can access the data.
11. Which of the following is not a function of the database?
a) Managing stored data
b) Manipulating data
c) Security for stored data
d) Analysing code
View Answer
Answer: d
Explanation: It allows authorized users to update, store, manipulate, or access data. Since data is stored in table format it is easy to access the data and perform the required functions. It also removes duplicate and redundant data.
12. Which of the following is a function of the DBMS?
a) Storing data
b) Providing multi-users access control
c) Data Integrity
d) All of the above
View Answer
Answer: d
Explanation: The purpose of creating DBMS was to store the data. The data stored in the database management system can be can accessed by multiple users if the access is provided. The data stored will be accurate and complete hence providing data integrity
Discover more from EduGrown School
Subscribe to get the latest posts sent to your email.