Curriculum 2026–27
Practice
All Revision Notes
Information TechnologyCh-16 15 min comprehensive revision
CBSE Class 10 IT (402) — Part B: Unit 3 (Database Management System)

Retrieve Data Using Query & SQL (LibreOffice Base)

Creating queries in Query Wizard and Query Design View, Structured Query Language (SQL) DML commands (SELECT, FROM, WHERE, ORDER BY, GROUP BY, HAVING), logical operators, aggregate functions (COUNT, SUM, AVG, MIN, MAX), and multi-table queries.

Quick Key Takeaways:
SQL Query Syntax: SELECT column1, column2 FROM TableName WHERE condition ORDER BY column1 ASC/DESC;
Aggregate Functions: COUNT() counts rows, SUM() calculates total, AVG() calculates mean, MIN() and MAX() identify minimum and maximum values.
1

Query Creation in Design View

Design Grid

Visual query building without manually typing SQL statements.

Query Design Steps
1. Click Queries in Database pane → Create Query in Design View...; 2. In 'Add Table' dialog, select tables and click Add; 3. In lower design grid, double-click fields to add them; 4. Set Sort order (Ascending/Descending), Visible checkbox, and Criteria expression (e.g. > 75 or LIKE 'S*').
Running the Query
Click Run Query icon (F5) on toolbar to execute and view results in upper pane. Press Ctrl+S to save query.
2

Structured Query Language (SQL) DML Commands

SQL Syntax

SQL is the standard relational query language.

Basic SELECT Query
SELECT RollNo, Name, Marks FROM tbl_Students; (Retrieves specific columns). SELECT * FROM tbl_Students; (Retrieves all columns).
Filtering with WHERE Clause
SELECT Name, City, Marks FROM tbl_Students WHERE Marks >= 90 AND City = 'Delhi';
Sorting with ORDER BY
SELECT * FROM tbl_Students ORDER BY Marks DESC, Name ASC;
Pattern Matching with LIKE
SELECT * FROM tbl_Students WHERE Name LIKE 'A%'; (Names starting with A). % represents any number of characters, _ represents single character.
Aggregate Functions & GROUP BY
SELECT Department, COUNT(*), AVG(Salary) FROM tbl_Employees GROUP BY Department HAVING AVG(Salary) > 50000;
Authentic Board Question (3 Marks)Topic: SQL Data Query Language (DQL)
Consider a table "STUDENT" with columns (RollNo, Name, Class, Marks, City). Write the standard SQL queries to: (a) Display names and marks of students scoring above 85. (b) Display all student details sorted alphabetically by Name. (c) Find the total number of students in each city.

Official CBSE Step-by-Step Marking Breakdown:

Part (a): Conditional Filter (WHERE): SELECT Name, Marks FROM STUDENT WHERE Marks > 85;
1 Mark
Part (b): Sorting Query (ORDER BY): SELECT * FROM STUDENT ORDER BY Name ASC;
1 Mark
Part (c): Grouping & Aggregate (GROUP BY): SELECT City, COUNT(*) FROM STUDENT GROUP BY City;
1 Mark
Model Student Answer (Target: Full 3/3 Marks):
(a) Query for Students Scoring Above 85:
``sql SELECT Name, Marks FROM STUDENT WHERE Marks > 85; ` **(b) Query for Alphabetical Sorting:** `sql SELECT * FROM STUDENT ORDER BY Name ASC; ` **(c) Query for City-Wise Student Count:** `sql SELECT City, COUNT(*) FROM STUDENT GROUP BY City;
Examiner Mark Deduction Traps:
Always end every SQL query with a semicolon (;). Missing semicolons can lead to deduction.
Write SQL keywords (SELECT, FROM, WHERE, ORDER BY, GROUP BY) in uppercase for industry standard readability.

High-Frequency Conceptual Doubts & FAQs

Curated answers to the most common questions asked by Class 10 students.
This chapter establishes the foundational principles, definitions, and operational workflows required for Class 10 board mastery.