MySQL Revision Worksheet 1
MySQL Revision Worksheet 1
INFORMATICS PRACTICES
Grade 12 (2025-’26)
Chapter 3 – Review of Database Concepts and SQL
Worksheet 1
1. What does SQL stand for? What is MySQL?
2. Write two examples of DBMS software.
3. What is the relationship between SQL and MySQL ?
4. Write the command to create a new database “School”.
5. If a database "Employee" exists, which MySQL command helps you to start working in that
database?
6. Write MySQL command will be used to open an already existing database "LIBRARY".
7. Suggest Archana suitable command for the following purpose:
(i) To display the list of the database already existing in MySQL.
(ii) To use the database named City.
(iii) To remove the pre-existing database named Clients.
8. Write the command to display the name of the active database.
9. Write an SQL query to create the table 'Menu' with the following structure:
10. In a Student table, out of Roll Number, Name, Address which column can be set as Primary
key and why?
11. Ms. Mirana wants to remove the entire content of a table "BACKUP" along with its structure
to release the storage space. What MySQL statement should she use?
12. Write one similarity and one difference between CHAR and VARCHAR data types.
13. Saumya had previously created a table named ‘Product’ in a database using MySQL. Later
on she forgot the table structure. Suggest her suitable MySQL command through which she
can check the structure of the already created table.
14. Roli wants to list the names of all the tables in her database named ‘Gadgets’. Which
command (s) she should use to get the desired result.
15. Name the SQL commands used to :
(i) Physically delete a table from the database.
(ii) Display the structure of a table.
Page 1 of 4
16. An attribute A of datatype varchar(20) has the value “Amit” . The attribute B of datatype
char(20) has value ”Karanita” . How many characters are occupied in attribute A ? How many
characters are occupied in attribute B?
17. Write one similarity and one difference between UNIQUE and PRIMARY KEY constraints.
18. Mrs. Sharma is the class teacher of Class ‘XII’. She wants to create a table ‘Student’ to store
details of her class.
(i) Which of the following can be the attributes of Student table?
(a) RollNo (b) “Amit” (c) Name (d) 25
(ii) Name the Primary key of the table ‘Student’. State reason for choosing it.
19. Write SQL query to create a table ‘Player’ with the following structure:
20. Anita has created the following table with the name ‘Orders’.
(i) What is the data type of columns OrderId and OrderDate in the table Orders?
(ii) Anita is now trying to insert the following row:
33. With respect to a databases, a column in a relation is also known as a/an _________.
(i) attribute (ii) record (iii) domain (iv) tuple
34. _____ command is used to modify records in the MySQL table.
(i) ALTER (ii) UPDATE (iii) MODIFY (iv) SELECT
Page 3 of 4
35. Which of the following is not a valid MySQL data type?
(i) Int (ii) Boolean (iii) Char (iv) Date
36. The purpose of distinct clause in a SQL statement is to:
(i) show all the rows in a column of table (ii) show all duplicate values in a column
(iii) remove all duplicate values in a column (iv) sort all the results based on a column
37. Write an SQL query to fetch all records from a table named employees.
38. Which operator is used to compare a value with a specified list of values?
(i) BETWEEN (ii) IN (iii) LIKE (iv) OR
39. To remove duplicate rows from the results of an SQL SELECT statement, the ________
included.
40. An Alternate key can be defined as:
(i) An attribute which is a primary key (ii) An attribute which is not a primary key
(iii) A candidate key (iv) An attribute which is a foreign key
41. For which attribute fixed length string is suitable?
(i) Salary (ii) City (iii) Gender (iv) Age
42. The ___________ clause is used to arrange records of a table in a sorted manner.
43. A table can have a maximum of _____________ primary key(s).
44. A key that links multiple tables is called a ______________.
45. The full form of DDL is ____________ and DML is _____________.
46. The ___________ clause is used to filter records based on a condition
47. Consider the STOCK table:
Page 4 of 4