Find the CBSE Class 12 Informatics Practices MySQL Worksheet right below. We offer detailed and printable Class 12 Informatics Practices worksheets for MySQL, updated for the 2026-27 term. Each resource matches official syllabus rules from NCERT, CBSE, and KVS to support effective student revision.
Chapter-wise Worksheet for Class 12 Informatics Practices MySQL
Every student in Class 12 can use this Informatics Practices practice paper to review MySQL. Complete with important questions and solutions, regular self-testing will boost your confidence and improve your grades in school assessments and final tests.
Class 12 Informatics Practices MySQL Worksheet with Answers
Q1. a) Raju wants to change the schema of the table “ STUDENT ” which already exists in the database. Which command he will use.
1 b) Neha is not able to enter the details of students born after ‘ 30-Mar-2007’. Which constraint might be specified when the table was created.
1 c) What is the purpose of the following query. 1 SELECT COUNT(*) FROM ELECTION GROUP BY city.
d) What is the role of UNIQUE constraint? How is PRIMARY KEY constraint differ from UNIQUE key constraint.
2 e) What is the significant of ORDER BY command in SQL query.
2 f) ActivityName and ParticipantNo of table ACTIVITY given below 2 Activity Name ParticipantNo Relay 100X 4 16 High Jump 10 Shot Put 12 Long Jump 12 Discuss Throw 10 Based on this information, find the output of the following queries.
a) SELECT COUNT( DISTINCT ParticipantNo) FROM ACTIVITY;
b) SELECT ActivityName FROM ACTIVITY WHERE ActivityName LIKE ‘%p’;'
g) A table Employee in a database has a 4 columns and 2 rows in it. What is cardinality and degree if 3 more columns are added in the table? 1 Q2. A)Write an SQL query to create following table ‘ Supplier’ with following descriptions. 2 Table : Supplier Field Type Constraint Supp_id Varchar(5) Primary Key Supp_Name Varchar(20) Not Null City Varchar(20) Order_No Integer(10) Foreign key with reference to Order_No column in Order table Supp_Amount Decimal(6,2) Minimum 10000 b) In database there are two tables “Student” and “Stream” as below : Table: Student Sid Sname age Strid 1 Roondy 10 1 2 Joseph 12 1 3 Trinchu 14 2 4 Prithlon 11 3 5 Ahol 10 2
Q. Create the following tables with the following constraints and values.
Table : TicketDetails
| Field Name | Datatype | Size | Constraint |
| Tcode | Char | 5 | Primary Key |
| Name | Varchar | 20 | Not Null |
| Tickets | Int | 2 | Default 0 |
| Acode | Char | 4 |
Q. Add the following values to the above table
| Tcode | Name | Tickets | Acode |
| S001 | Meena | 7 | A01 |
| S002 | Vani | 5 | A02 |
| S003 | Meena | 9 | A03 |
| S004 | Rhea | 3 | A04 |
| S005 | Suraj | 1 | A05 |
Table : AgentDetails
| Field Name | Datatype | Size | Constraint |
| Acode | Char | 4 | |
| AName | Varchar | 20 |
Add the following values to the above table
| Acode | AName |
| A01 | Mr. Robin |
| A02 | Mr. Ayush |
| A03 | Mr. Trilok |
| A04 | Mr. John |
Q. To display Tcode,Name and Aname of all the records where the number of tickets sold is more than 5.
Q. To list out Name, Tickets,A_code and Aname for all the Agent Details.
Q. To list out all the Acode, Aname and corresponding Tcode where Aname ends with ‘k’.
Q. To Total number of tickets booked by each customer.
Q. To display total number of tickets booked by agent “Mr. Ayush”.
Q1. Create the Table Emp with the following constraints:
| Field Name | Data Type | Size | Constraint |
| ID | Int | 2 | Primary Key |
| Name | Varchar | 20 | Not Null |
| Age | Int | 3 | |
| Address | Char | 40 | |
| Salary | Int | 7 | |
| Phone | Char | 15 |
Q2. Add the following records to the above table “Emp” and Write commands in SQL
| ID | NAME | AGE | ADDRESS | SALARY | PHONE |
| 1 | Siddharth | 25 | A-4, Ashok Vihar, Delhi | 62000 | 98110766656 |
| 2 | Chavi | 23 | B-21, Model Town, Mumbai | 71000 | 99113423989 |
| 3 | Karan | 26 | KC-24, North Avenue, Bhopal | 65000 | 98105393578 |
| 4 | Raunaq | 22 | A-152, Gomti Nagar, Lucknow | 89000 | 99101393576 |
| 5 | Kunal | 27 | B-5/45, Uday Park, Delhi | 80000 | 97653455654 |
| 6 | Karan | 25 | A-Block,AMT Vihar,Chennai | 94000 | 945287653241 |
| 7 | Paul | 25 | S-25,BLB Appts, Bangalore | 75000 | 988765442312 |
1. To display list of all employees below 25 years old.
2. To list names and respective salaries in descending order of salary.
3. To count the number of employees with names starting with ‘K’
4. To list names and addresses of those persons who have ‘Delhi’ in their address.
5. To list out all the employees whose salary is in between 70000 and 80000.
6. Count number of employees based on their age group.
7. To list out all the employee names whose phone number starts with ‘99’.
8. To display all the details of employee whose salary is above 85000.
9. To display all the employee names whose name contains the character ‘a’ anywhere.
Find the output:
1.select name from emp where sal=select max(sal) from emp;
2. select length(name) from emp where salary >82000;
3. select 9* 4 from emp where id>6;
4. select Left(address,4) from emp where id <3;
5. select mid(name,2,3) from emp where address like ‘%delhi%’;
Question. Raju wants to change the schema of the table “ STUDENT ” which already exists in the database. Which command he will use.
Answer: He will use the ALTER TABLE command.
Question. Neha is not able to enter the details of students born after ‘ 30-Mar-2007’. Which constraint might be specified when the table was created.
Answer: A CHECK constraint (specifically restricting the date of birth to be less than or equal to '30-Mar-2007', such as CHECK (DOB <= '2007-03-30')) might be specified on the date of birth column when the table was created.
Question. What is the purpose of the following query.
SELECT COUNT(*) FROM ELECTION GROUP BY city.
Answer: The purpose of this query is to find and display the number of records (such as voters or candidates) in the ELECTION table for each city, grouping the results by the city column.
Question. What is the role of UNIQUE constraint? How is PRIMARY KEY constraint differ from UNIQUE key constraint.
Answer: The role of the UNIQUE constraint is to ensure that all values in a column or set of columns are distinct (no duplicate values are allowed in that column).
The differences between a PRIMARY KEY constraint and a UNIQUE key constraint are:
1. A table can have only one PRIMARY KEY, whereas it can have multiple UNIQUE key constraints.
2. A PRIMARY KEY column cannot contain NULL values, whereas a UNIQUE key column can contain NULL values (depending on the database system, usually one or more NULL values are allowed).
Question. What is the significant of ORDER BY command in SQL query.
Answer: The ORDER BY command is used to sort the result set of a query in ascending (ASC) or descending (DESC) order based on one or more columns. By default, the sorting is done in ascending order.
ActivityName and ParticipantNo of table ACTIVITY given below:
| ActivityName | ParticipantNo |
|---|---|
| Relay 100X 4 | 16 |
| High Jump | 10 |
| Shot Put | 12 |
| Long Jump | 12 |
| Discuss Throw | 10 |
Question. Based on this information, find the output of the query:
SELECT COUNT( DISTINCT ParticipantNo) FROM ACTIVITY;
Answer:
| COUNT( DISTINCT ParticipantNo) |
|---|
| 3 |
Question. Based on this information, find the output of the query:
SELECT ActivityName FROM ACTIVITY WHERE ActivityName LIKE ‘%p’;
Answer:
| ActivityName |
|---|
| High Jump |
| Long Jump |
Question. A table Employee in a database has a 4 columns and 2 rows in it. What is cardinality and degree if 3 more columns are added in the table?
Answer: If 3 more columns are added to the table:
- Cardinality (number of rows) remains unchanged, which is 2.
- Degree (number of columns) becomes \( 4 + 3 = 7 \).
Question. Write an SQL query to create following table ‘ Supplier’ with following descriptions.
Table : Supplier
| Field | Type | Constraint |
|---|---|---|
| Supp_id | Varchar(5) | Primary Key |
| Supp_Name | Varchar(20) | Not Null |
| City | Varchar(20) | |
| Order_No | Integer(10) | Foreign key with reference to Order_No column in Order table |
| Supp_Amount | Decimal(6,2) | Minimum 10000 |
Answer:
CREATE TABLE Supplier (
Supp_id Varchar(5) PRIMARY KEY,
Supp_Name Varchar(20) NOT NULL,
City Varchar(20),
Order_No Integer(10),
Supp_Amount Decimal(6,2) CHECK (Supp_Amount >= 10000),
FOREIGN KEY (Order_No) REFERENCES `Order`(Order_No)
);
In database there are two tables “Student” and “Stream” as below :
Table: Student
| Sid | Sname | age | Strid |
|---|---|---|---|
| 1 | Roondy | 10 | 1 |
| 2 | Joseph | 12 | 1 |
| 3 | Trinchu | 14 | 2 |
| 4 | Prithlon | 11 | 3 |
| 5 | Ahol | 10 | 2 |
Table : Stream
| StrId | Name |
|---|---|
| 1 | Eng |
| 2 | Com |
| 3 | Sci |
| 4 | Hum |
Question. What is the name of primary key in both tables?
Answer:
- In the Student table, the primary key is Sid.
- In the Stream table, the primary key is StrId.
Question. What is the cardinality and degree of stream table?
Answer: For the Stream table:
- Cardinality (number of rows) = 4
- Degree (number of columns) = 2
Consider the following two tables STUDENT and LIBRARY as follows.
Table : STUDENT
| St_Id. | St_Name | Stream | Class | Book_Issue |
|---|---|---|---|---|
| 101 | Karan | Science | 12B | C103 |
| 202 | Divakar | Commerce | 11C | C104 |
| 305 | Divya | Commerce | 12C | C102 |
| 406 | Arun | Humanities | 12C | C101 |
| 501 | Sabina | Science | 12A | C105 |
Table : LIBRARY
| BookNo. | Title | Author | Pub | Issue_Date |
|---|---|---|---|---|
| C101 | Data Structure | Lipschtz | McGraw | 10-Dec-2009 |
| C102 | Computer Studies | French | Galgotia | 15-Oct-2010 |
| C103 | Advanced Pascal | Schildt | McGraw | 20-Jan-2009 |
| C104 | Dbase dummies | Palmer | PustakMAHAL | 8-Sep-2009 |
| C105 | MasteringC++ | Gurewich | BPB | 23-Nov-2009 |
Question. Write a SQL query to display student name,stream book issue and date of issue for each student.
Answer:
SELECT STUDENT.St_Name, STUDENT.Stream, STUDENT.Book_Issue, LIBRARY.Issue_Date
FROM STUDENT, LIBRARY
WHERE STUDENT.Book_Issue = LIBRARY.BookNo;
Question. Write a SQL query to display totalNumber of students in each stream.
Answer:
SELECT Stream, COUNT(*) AS totalNumber
FROM STUDENT
GROUP BY Stream;
Question. Find the output for the query:
SELECT St_Id,St_Name,Stream,Title,Issue_date
FROM STUDENT,LIBRARY WHERE STUDENT.Book_Issue=LIBRARY.BookNo
ORDER BY St_Name.
Answer:
| St_Id | St_Name | Stream | Title | Issue_date |
|---|---|---|---|---|
| 406 | Arun | Humanities | Data Structure | 10-Dec-2009 |
| 202 | Divakar | Commerce | Dbase dummies | 8-Sep-2009 |
| 305 | Divya | Commerce | Computer Studies | 15-Oct-2010 |
| 101 | Karan | Science | Advanced Pascal | 20-Jan-2009 |
| 501 | Sabina | Science | MasteringC++ | 23-Nov-2009 |
Question. What is Back end? Explain its functions.
Answer: The back end refers to the database server or application tier that manages, stores, and processes data, executing operations behind the scenes. It remains hidden from the end user.
Functions of Back end:
1. Data Management: Efficient storage, retrieval, and updates of structured or unstructured data.
2. Data Integrity & Concurrency Control: Ensures transactional safety (ACID properties), enforces check and key constraints, and manages simultaneous access by multiple users.
3. Data Security: Manages authentication, authorization, and roles to secure sensitive data from unauthorized access.
Question. How has our society benefited from e-commerce? Mention any two points?
Answer:
1. Convenience and Flexibility: Consumers can buy products and services 24/7 from any location without needing to visit physical stores.
2. Greater Choice and Comparison: Users have access to a global marketplace, allowing them to compare products, reviews, and prices across different brands instantly.
Question. What controls would you suggest for following types of inputs?
(i) To display some information
(ii) Enter password
(iii) To choose more than one subject from a set of subjects.
(iv) To enter multiline text
Answer:
(i) To display some information: Label (e.g., JLabel)
(ii) Enter password: Password Field (e.g., JPasswordField)
(iii) To choose more than one subject: Check Box (e.g., JCheckBox)
(iv) To enter multiline text: Text Area (e.g., JTextArea)
Free study material for Informatics Practices
Informatics Practices Class 12 Curriculum Worksheets: MySQL
Assessment Overview: MySQL Practice Material
Tackle your school exams with confidence by working through the practice questions for MySQL outlined above. Developed by professional instructors to match modern 2026 framework standards set by CBSE for Class 12, these assignments bridge classroom learning and testing. Consistent daily practice ensures a solid conceptual foundation in Informatics Practices for all Class 12 learners.
Step-by-Step Solutions for Class 12 Informatics Practices
These exercises draw directly from the authorized NCERT book for Class 12 Informatics Practices to maintain academic accuracy. Evaluating your finished work against our expert solutions helps you master the formal answer-writing standards expected in CBSE exams. Explore the accompanying MCQ sets for Informatics Practices to ensure full preparation across all chapter concepts.
Class 12 Exam Preparation Strategy
Regular practice of this Class 12 Informatics Practices study material helps you to be familiar with the most regularly asked exam topics. If you find any topic in MySQL difficult then you can refer to our NCERT solutions for Class 12 Informatics Practices. All revision sheets and printable assignments on studiestoday.com are free and updated to help students get better scores in their school examinations.
FAQs
You can download the latest chapter-wise printable worksheets for Class 12 Informatics Practices MySQL for free from StudiesToday.com. These have been made as per the latest CBSE curriculum for this academic year.
Yes, Class 12 Informatics Practices worksheets for MySQL focus on activity-based learning and also competency-style questions. This helps students to apply theoretical knowledge to practical scenarios.
Yes, we have provided solved worksheets for Class 12 Informatics Practices MySQL to help students verify their answers instantly.
Yes, our Class 12 Informatics Practices test sheets are mobile-friendly PDFs and can be printed by teachers for classroom.
For MySQL, regular practice with our worksheets will improve question-handling speed and help students understand all technical terms and diagrams.