Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

KENDRIYA VIDYALAYA SANGATHAN SAMPLE PAPER

CLASS XI INFORMATICS PRACTICES


PERIODIC TEST - 2 EXAMINATION 2021-22
Time Duration: 90 minutes Maximum Marks: 40
----------------------------------------------------------------------------------------------------------------------------------
General Instructions
1. This question paper is divided into three sections A,B and C
2. Section A is of 16 marks
3. Section B is of 12 marks
4. Section C is of 12 marks
SECTION ‘A’

1. Consider a table ‘emp’ as given below. 8

empno ename job mgr hiredate sal comm deptno


7369 SMITH CLERK 7902 1993-06-13 8000.00 0.00 20
7499 ALLEN SALESMAN 7698 1998-08-15 16000.00 300.00 30
7521 WARD SALESMAN 7698 1996-03-26 12500.00 500.00 30
7566 JONES MANAGER 7839 1995-10-31 29750.00 20
7698 BLAKE MANAGER 7839 1992-06-11 28500.00 30
7782 CLARK MANAGER 7839 1993-05-14 24500.00 10
7788 SCOTT ANALYST 7566 1996-03-05 30000.00 20
7839 KING PRESIDENT 1990-06-09 50000.00 0.00 10
7844 TURNER SALESMAN 7698 1995-06-04 15000.00 0.00 30
7876 ADAMS CLERK 7788 1999-06-04 11000.00 20
7900 JAMES CLERK 7698 2000-06-23 9500.00 30
7934 MILLER CLERK 7782 2000-01-21 13000.00 10
7902 FORD ANALYST 7566 1997-12-05 30000.00 20
7654 MARTIN SALESMAN 7698 1998-12-05 12500.00 1400.00 30

Write SQL queries for the following


i) Display all the records from ‘emp’ table.
ii) Display ‘empno’ and ‘ename’ of all employees from table ‘emp’
iii) Display ename, sal and sal added with comm from table ‘emp’
iv) Write a query to display employee name, salary, and department no who are not
getting commission from table ‘emp’.
v) List all department numbers in ‘emp’ table
vi) List the details of those employees who have names containing four characters
(letters).
vii) List the details of all employees whose annual salary is between 25000 – 40000.
viii) Show the names of all employees in alphabetical order.

2. Differentiate between DDL and DML commands. 2

3. Write commands for the following 2


i) To create a database ‘INVENTORY’.
ii) To remove a database ‘STORE’.
iii) To see the list of databases.
iv) To set ‘SCHOOL’ as current database.

1
4. Consider the following table ‘BOOK’ and write output of the given queries 2

BookID Title Author Price


1111 VB John 500
2222 Java Ram 200
3333 Python Naresh 300
4444 SQL Mukesh 600
i) SELECT SUM(PRICE) FROM BOOK WHERE PRICE <400;
ii) SELECT MIN(PRICE) FROM BOOK;
iii) SELECT MAX(PRICE) FROM BOOK;
iv) SELECT AVG(PRICE) FROM BOOK;

5. Consider the following table ‘CITY’ and write output of the given queries 2

CITYCODE CITYNAME
200 Jabalpur
110 Anuppur
275 Chhindwara
230 Balaghat
174 Dewas
i) SELECT * FROM CITY ORDER BY CITYNAME;
ii) SELECT * FROM CITY ORDER BY CITYCODE DESC;

SECTION ‘B’
6. Differentiate between 6
a) Primary Key and Foreign Key
b) Degree and Cardinality of a relation
c) NOT NULL constraint and UNIQUE constraint

7. Write SQL command to create a table ‘TEACHER’ with the following specifications 3
Name of Attributes Data Type Size Constraint
TeacherID INT 5 Primary Key
TName VARCHAR 30
Age INT 2
Department VARCHAR 30
Salary FLOAT

8. Consider a table ‘ITEM’ with the attributes (ItemCode, ItemName). Write SQL command 3
to:
i) Add new column ‘ItemPrice’ with data type ‘int’.
ii) Show a description of table ‘ITEM’
iii) Remove the column ‘ItemName’.

SECTION ‘C’
9. Differentiate between 4
i) DROP TABLE and DELETE command in SQL
ii) CHAR and VARCHAR data type in SQL

10. Explain 4
i) How we can insert a record in a table using SQL command? Give example.
2
ii) What is the use of ‘update’ command in SQL? Give example.

11. Consider the following table ‘CUSTOMER’ and write output of SQL queries for (i) to (iv) 4

CustomerID CustomerName CustomerAge CustomerCity


1234 Gagandeep 56 Durg
2345 Ravindra 48 Indore
4567 Hemraj 37 Balaghat
5678 Bhojpal 44 Jabalpur
6789 Shivram 61 Indore

(i) SELECT CustomerName, CustomerAge


FROM CUSTOMER
WHERE CustomerAge >45;

(ii) SELECT CustomerName, CustomerCity


FROM CUSTOMER
WHERE CustomerCity LIKE 'B%';

(iii) SELECT * FROM CUSTOMER WHERE CustomerCity='Indore';

(iv) SELECT distinct CustomerCity from CUSTOMER;

You might also like