XII CS Edited
XII CS Edited
CLASS: XII
FULL MARKS: 35 TIME: 2Hrs
General Instructions:
1. Please read the instructions carefully.
2. The question paper is divided into 3 sections – A, B and C.
3. Section A, consists of 7 questions (1-7). Each question carries 2 marks.
4. Section B, consists of 3 questions (8-10). Each question carries 3 marks.
5. Section C, consists of 3 questions (11-13). Each question carries 4 marks.
Section-A
Each question carries 2 marks
1. What is stack? Name and describe any two basic operations on stack. [2]
2. (i) Expand the following terms: [1]
GPRS, CDMA
(ii) Name any two wired and two wireless mediums of transmission. [1]
3. Differentiate between DDL and DML commands. [2]
4. A resultset is extracted from the database using the cursor object (that
has been already created) by giving the following statement. [2]
data=cursor.fetchall()
(a) What does fetchall() function return?
(b) What do you mean by the term cursor?
5. Write the output of the queries (a) to (d) based on the table Worker given
below: [2]
Table: Worker
(a) SELECT SUM (SALARY) FROM WORKER WHERE SALARY > 100000;
(b) SELECT MIN(JOINING_DATE) FROM WORKER;
(c) SELECT * FROM WORKER WHERE FIRST_NAME LIKE “V%”;
(d) SELECT DEPARTMENT FROM WORKER GROUP BY DEPARTMENT;
6. (i) Write the SQL query to display the structure/schema of the table. [1]
(ii) Give one difference between equi-join and natural join. [1]
Section-B
Each question carries 3 marks
8. Amit has created a dictionary containing names and ages as key : value
pairs of 5 students. Write a program with user-defined functions to
perform the following operations: [3]
• Push the keys (Name of the students) of the dictionary in to a
stack where the corresponding value (Age) is greater than 45.
• Pop and display the content of the stack.
For example,
If the sample content of the dictionary is as follows:
D={“A”:55, “B”:60, “C”:44, “D”:40, “E”:50}
The output of the program should be:
E, B, A
9. (i) A table STUDENT has been created in a database with the following fields:
S_ID, S_Name, DOB, Age
Give the SQL command to change the data type of DOB into date type. [1]
(ii) What is the use of SAVEPOINT statement? Differentiate between
COMMIT and ROLLBACK commands.
[2]
10. Nisha has created a database named “SCHOOL” in my MySQL. She now needs to
create a table name “TEACHER” in the database to store the records of teachers
across the globe. The table “TEACHER” has the following structure: [3]
Table: Teacher
Field Name Data Type Remarks
T_ID CHAR (5) Primary key
T_NAME CHAR (30)
SUBJECT CHAR (20) Unique constraint
SALARY DECIMAL(7,2) Check salary>20000
DEPARTMENT CHAR (30) Default value - NA
AGE INTEGER
CONTACT INTEGER Not null
Section-C
Each question carries 4 marks
11. Write SQL queries for (i) to (iv) which are based on the following tables. [4]
Table :VEHICLE
V05 SUV 30
V04 CAR 18
Note: PERKM is Freight Charges per kilometer.
Table : TRAVEL
12. Give two advantages and two disadvantages of Ring topology. [4]
OR
Define the following terms:
(i) Suggest the network type (out of LAN, MAN, WAN) for connecting each of the
following set of their offices.
(a) Head Office and Tech Office
(b) Head Office and Coimbatore Office
(ii) Which device will you suggest to be procured by the company for connecting
all computers within each of their offices out of the following devices?
(a) Modem (b) Telephone (c) Switch/Hub
(iii) Which of the following communication media will you suggest to be procured
by the company for connecting their local offices in New Delhi for very effective
and fast communication?
(a) Ethernet cable (b) Optical fiber (c) Telephone cable
(iv) Suggest the cable/wiring layout for connecting the company’s local offices
located in New Delhi. Also, suggest an effective method/technology for
connecting the company’s regional offices at Kolkata, Coimbatore and
Ahmedabad.