KENDRIYA VIDYALAYA SANGATHAN, CHENNAI REGION
REVISION TEST – TERM II – 2021 - 22
SUB: COMPUTER SCIENCE (083) MAX MARKS: 35
CLASS: XII TIME: 2 Hrs.
General Instructions
The question paper is divided into 3 sections – A, B and C
Section A, consists of 7 questions (1-7). Each question carries 2 marks.
Section B, consists of 3 questions (8-10). Each question carries 3 marks.
Section C, consists of 3 questions (11-13). Each question carries 4 marks.
Internal choices have been given for question numbers 7, 8 and 12
Section - A
Each question carries 2 marks
Q. Part Question Marks
No No
.
1. What do you mean by push and pop operations on stack? (2)
2. (i) Expand the following: (1)
FTP, TCP/IP
(ii) Arrange the following wired medium of transmission in the decreasing order (1)
of their speed:
Coaxial Cable, Twisted Pair Cable, Optical Fibre Cable.
3. Differentiate between delete and drop table Commands in SQL. (2)
4. Consider the SQL table Product given below, predict the output of the (2)
following code in Python:
Table: Product
pno pname price supid
101 pen 10 222
102 pencil 10 333
103 eraser 5 222
import mysql.connector as m
con=m.connect(host='localhost',user='root',passwd='kvcbe',database='12a')
cur=con.cursor()
cur.execute('select *from product')
d=cur.fetchmany(2)
print(d)
print(type(d))
1
5. Write the output of the queries (a) to (d) based on the table, Staff given below: (2)
Table: Staff
Id Name DOJ Dept Gender Exp
1 Aman 12-01-2006 Finance M 15
2 Dima 03-05-2016 Personnel F 5
3 Christin 15-11-2009 Sales F 12
a
4 Shem 20-12-2006 Sales M 15
5 Roshan 13-10-2013 Finance M 8
6 Danish 11-09-2013 Personnel M 8
7 Habeena 16-08-2011 Sales F 10
(a) Select avg(exp) from staff where gender = ‘F’;
(b) Select min(doj) from staff;
(c) Select *from staff where gender!=’M’ and dept like ‘_ _ _ _ _’;
(d) Select name, doj from staff where dept not in (‘Finance’,’Sales’);
6. (i) Give SQL Command to display the information about a table, like column (1)
names, data type and constraints on column name.
(ii) Give one point of difference between unique and primary key constraints. (1)
7. Consider the following tables: (2)
Table: Supplier
supid sname city
111 S and Co Mumbai
222 TTT Chennai
333 AAX Cbe
Table: Product
pno pname price supid
101 pen 10 222
102 pencil 10 333
103 eraser 5 222
(a) Find the Degree and Cardinality of the Cartesian product of the
Supplier and Product relations.
(b) Identify the foreign key in the given tables, also mention in which table
it is appearing as a foreign key?
OR
Find output:
(a) select *from product p, supplier s where p.supid=s.supid;
(b) select *from product natural join supplier;
2
Section - B
Each question carries 3 marks
8. Rajiv has created a dictionary containing employee names and their salaries as (3)
key value pairs of 6 employees.
Write a program, with separate user defined functions to perform the following
operations:
● Push the keys (employee name) of the dictionary into a stack, where the
corresponding value (salary) is less than 85000.
● Pop and display the content of the stack.
For example:
If the sample content of the dictionary is as follows:
Emp={"Ajay":76000, "Jyothi":150000, "David":89000, "Remya":65000,
"Karthika":90000, "Vijay":82000}
The output from the program should be:
Vijay Remya Ajay
OR
Aruna has a list containing temperatures of 10 cities. You need to help her
create a program with separate user defined functions to perform the following
operations based on this list.
● Traverse the content of the list and push the negative temperatures into a
stack.
● Pop and display the content of the stack.
For Example:
If the sample Content of the list is as follows:
T=[-9, 3, 31, -6, 12, 19, -2, 15, -5, 38]
Sample Output of the code should be:
-5 -2 -6 -9
9. (i) A table, Book has been created in a database with the following fields: (1)
BookId, BookName, AuthorName, Price
Give the SQL command to add primary key constraint to the BookId field of
Book table.
(ii) Differentiate between DDL and DML commands. Give one example for each. (2)
10. Dileep has to create a database named Company in MYSQL. (3)
He now needs to create a table named Employee in the database to store the
records of employees in the company. The table Employee has the following
structure:
Table: Employee
Field Name Data type Remarks
Empid integer of size 5 Primary Key
Empname character of size 25 Not null
Design character of size 15 Unique
Salary floating point
DOB date
Help him to complete the task by suggesting appropriate SQL commands.
3
Section - C
Each question carries 4 marks
11. Write queries (a) to (d) based on the relations Car and Customer given (4)
below:
Table: Car
Ccode Cname Manufacturer Colour Capacity Charges
201 Triber Renault Yellow 7 1000
203 Altroz Tata Black 5 1500
208 Innova Toyota Silver 8 3000
209 Harrier Tata White 6 2000
212 Duster Renault Red 6 2500
217 Ertiga Suzuki Grey 7 2300
Table: Customer
Custcode Custname Ccode
101 Gopinath 201
102 Ashok 203
103 Harshini 209
104 Vishnu 212
(a) To display the manufacturer and count of records under each
manufacturer where two or more records are there.
(b) To display the cname and respective custname of each car with seating
capacity is more than five.
(c) To display the car details in the decreasing order of their seating
capacity.
(d) To display the total number of manufacturers without duplicates.
12. (i) Give two advantages and two disadvantages of tree topology. (2)
OR
Define the following terms: website ,web browser
(ii) Explain any one switching technique. (2)
13. Excel Public School, Coimbatore is setting up the network between its (4)
different wings of school campus. There are 4 wings namely SENIOR(S),
JUNIOR (J), ADMIN (A) and HOSTEL (H).
4
Distances between various wings are given below:
Wing A to Wing S 100m
Wing A to Wing J 200m
Wing A to Wing H 400m
Wing S to Wing J 300m
Wing S to Wing H 100m
Wing J to Wing H 450m
Number of Computers installed at various wings are as follows:
Wings Number of Computers
Wing A 20
Wing S 150
Wing J 50
Wing H 25
(a) Suggest the best-wired medium and mention the topology or
layout to connect various wings of Excel Public School,
Coimbatore.
(b) Name the most suitable wing to house the server. Justify your
answer.
(c) Suggest placement of HUB/SWITCH in the network of the
School.
(d) Suggest a device that can provide wireless Internet access to all
smartphone/laptop users in the campus of Excel Public School,
Coimbatore.