Class Xii Cs - 10 Sample Papers
Class Xii Cs - 10 Sample Papers
Class Xii Cs - 10 Sample Papers
COMPUTER SCIENCE
Class: XII CBSE
TERM - II Max .Marks: 35
Time: 2:00 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 given for Question numbers 7, 8 and 12.
SECTION – A
This section consists of 7 Questions (1 to 7).
1. Give few applications of stack. [2]
2. Expand the following: (i) HTTP (ii) TCP [2]
3. What is Relation? Define the Relational Data model. [2]
4. An output is extracted from the database using the cursor object by giving the [2]
following statement: Mycon=cursor.fetchmany(size)
(a) How many records will be returned by fetchmany(size) method?
(b) What will be the data type of Mycon object after the given command is
executed?
5. Write the output of the queries (a) to (d) on the table, SCHOOL given below: [2]
6. (a) Which keyword is used to sort the records of a table in descending order? [1]
Page.1
7. Consider the table, CUSTOMER given below: [2]
9. (a) In SQL, write the query to display the list of tables stored in a database. [3]
(b) Sonal needs to display name of teachers, who have "O" as the third character
in their name. She wrote the following query.
But the query isn’t producing the result. Identify the problem.
He now needs to create a table named student in the database to store the
records. The table STUDENT has the following structure:
Page.2
SECTION – C
This section consists of 3 Questions (11 to 13). Each Question Carries 4
Marks
11. Write SQL queries for (a) to (d) based on the given tables. CUSTOMER and [4]
TRANSACTION.
(a) To display the details of customers whose include "Ali" in their name.
(b) To display the Amount of all transactions done in 2017 from table
Transaction.
(c) To display the last date of transaction(DOT) from the table TRANSACTION
for the customer having CNO as 103.
(d) To display CNO,CNAME and TYPE with the help of both tables where
address is not in Delhi and Bangalore.
12. (i) What do you meant by MODEM? Why is it used? [4]
(OR)
(ii) Write any two differences between twisted pair cable and coaxial cable.
Page.3
13. ABC Pvt Ltd., setting up the network in Bangalore. There are four departments [4]
named as Market, Finance, Legal and Sales.
(a) Suggest a cable layout of connections between the Departments and specify
the topology.
(b) Suggest the most suitable to place the server by giving suitable reason.
(d) The organization is planning to link its sale counter situate in various part of
the same city. Which type of network out of LAN,WAN,MAN will be formed?
Justify.
Page.4
SAMPLE PAPER - 2
COMPUTER SCIENCE
Class: XII CBSE
TERM - II Max .Marks: 35
Time: 2:00 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 given for Question numbers 7, 8 and 12.
SECTION – A
This section consists of 7 Questions (1 to 7).
1. Give any two real life applications where stacks can be used. [2]
2. (i) Expand the following: POP, TCP [2]
(ii) Which of the following communication medium, will you suggest to be
procured by the company for connecting their local office units in
Pondicherry for very effective (high speed) communication?
Telephone cable, Ethernet Cable, Optical Fibre
3. Differentiate between Primary Key and Foreign Key in RDBMS. [2]
4. A result-set is extracted from the database using the cursor object (that has been [2]
already created) by giving the following statement (Assume table contains 10
tuples).
mydata=cursor.fetchall()
(a) How many records will be returned by fetchall() method?
(b) What will be the data type of Mydata object after the given command is
executed?
5. Write the output of the queries (a) to (d) based on the table Student given below: [2]
Student
Adm Name Subject Fees Age Gender
1 JATIN MANHAS BIOLOGY 650 17 M
2 VANSH KHATRI HINDI 600 18 F
3 SIMRAN COMPUTER 600 17 F
4 ABHISHEK COMPUTER 600 16 M
5 KUNAL ECONOMICS 470 18 M
6 LALIT KALA BIOLOGY 650 18 M
7 MANISH HINDI 770 17 F
8 JAGDEEP ENGLISH 800 16 M
Page.1
7. Consider the table “Employee” as follows: [2]
Empid Empname Salary
E01 Vishal 40000
E02 Sahil 15000
E03 Sandeep 65000
E04 Yogesh 15300
(OR)
Table :Books
Book_ID Book_Name Admno
B174 Tao Te Ching 1565
B225 Republic 1472
B887 The King 6512
SECTION – B
This section consists of 3 Questions (8 to 10). Each Carries 3Marks.
8. Vignesh has created a dictionary “employee” with employee name as key and their [3]
salary as values. Write a program to perform the following operations in Python:
(a) Push the names of those employees into a stack where the salary is less than
50000
(b) Pop the elements of the stack and display those names.
(OR)
Harsha has created a list 'mylist' of 10 integers. You have to help him to create a
stack by performing the following functions in Python:
(a) Traverse each element of the list and push all those numbers into the stack
which are divisible by 3.
(b) Pop from the stack and display all the content.
9. (i) A table "Teachers" has three columns: TID, TNAME, and SUBJECT. Write a [3]
SQL Command to add a new column in this table SALARY (of Integer type).
(ii) Categories the DDL and DML Commands from the following:
Page.2
10. Rashmi needs to create a database "School" using MySQL.
After that, she needs to create a table "Labs" to keep the record of all the
laboratories in the school. The table “Labs” should have the following structure:
FIELD NAME DATA TYPE REMARKS
LABID INT PRIMARY KEY
LABNAME VARCHAR
LABATTENDANT VARCHAR
Table : ACCESSORIES
No Name Price ID
1 Mouse 600 101
2 Keyboards 670 103
3 Webcams 2000 100
4 Cables 200 101
5 LCD 6000 102
a. To display Name and Price of all the Accessories in ascending order of their
Price
b. To display Id and SName of all Shops
c. To display name of accessories whose price is less than 1000
d. To display Minimum and Maximum Price of each Name of Accessories
12. (i) Give two advantages and disadvantages of a Mesh Topology. [2]
(OR)
[2]
(ii) How is LAN different from a WAN?
Page.3
13. XYZ Ltd. is a consultancy company. The company is planning to set up their new [4]
offices in India with headquarter in Hyderabad. As a network operator, you have
to understand their requirements and suggest them the best available solutions
as per the queries submitted below. There are total 3 bocks: Conference Block,
HR Blockand Finance Block.
a. Where do you suggest installing the server of the company? Justify your
answer.
b. Which network topology should be used in this network for most efficient
communication? Draw the layout.
c. What will be the total length of cable used if we use Ring topology in this
network?
d. Where do you suggest using a Switch in this network?
Page.4
SAMPLE PAPER - 3
COMPUTER SCIENCE
Class: XII CBSE
TERM - II Max .Marks: 35
Time: 2:00 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 given for Question numbers 7, 8 and 12.
SECTION – A
This section consists of 7 Questions (1 to 7).
1. Write a function pop() which remove name from stack named "MyStack" [2]
2. (i) Expand the following- HTTP , ARPANET [2]
(ii) What is MAC address? Give example also.
3. What is the difference between Primary Key and Foreign Key? [2]
4. Explain the following results retrieval methods with examples. fetchone () [2]
rowcount .
5. Consider the following tables GAMES. Give outputs for SQL queries (i) to (iv). [2]
Table: GAMES
Page.1
7. Write SQL query to create a table ‘Inventory’ with the following structure: [2]
(OR)
(i) Write the names of most appropriate columns, which can be Considered as
candidate keys.
Avg() functions?
select count(*) from T1; and select count(C1) from T1; are giving different
10. (i) Sanghi created two tables with City as Primary Key in Table1 and Foreign key [3]
in Table2 while inserting row in Table2 Mr Sanghi is not able to enter value in
the column City. What is the possible reason for it.
(ii) The Pincode column of table 'Post' is given below:
Page.2
SECTION – C
This section consists of 3 Questions (11 to 13). Each Question Carries 4
Marks
11. Consider the following tables, TRAINER and COURSE [4]
(a) Display the Trainer Name, City & Salary in descending order of their Hiredate.
(b) To display the TNAME and CITY of Trainer who joined the Institute in the
Month of December 2001.
(c) To display TNAME, HIREDATE, CNAME, STARTDATE from tables TRAINER
and COURSE of all those courses whose FEES is less than or equal to 10000.
(d) To display number of Trainers from each city.
12. (i) Identify the type of topology on the basis of the following: [2]
(a) Since every node is directly connected to the server, a large amount of cable
is needed which increases the installation cost of the network.
(b) It has a single common data path connecting all the nodes.
[2]
(OR)
Page.3
13. Riana Medicos Centre has set up its new centre in Dubai. It has four buildings as [4]
shown in the diagram given below:
a network expert, provide the best possible answer for the following queries:
(i) Suggest the type of network established between the buildings.
(ii) Suggest the most suitable place (i.e., building) to house the server of this
Organization.
(iii) Suggest the placement of the following devices with justification:
(a) Repeater (b) Hub/Switch
(iv) Suggest a system (hardware/software) to prevent unauthorized access to or
from the network.
Page.4
SAMPLE PAPER - 4
COMPUTER SCIENCE
Class: XII CBSE
TERM - II Max .Marks: 35
Time: 2:00 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 given for Question numbers 7, 8 and 12.
SECTION – A
This section consists of 7 Questions (1 to 7).
1. Write a function Push() which takes number as argument and add in a stack [2]
"MyValue"
2. (i) Expand the following terms: (i) XML (ii) URL [2]
3. (i) Which SQL logical operator is used to compare a value with a NULL value? [2]
(ii) Which SQL logical operator is used to search for the presence of a row in a
specified table that meets a certain criterion?
4. How can one create a cursor object? Which property can be used to output the [2]
number of rows resulting from the SQL Query?
5. Consider the following table: [2]
Page.1
6. (i) Which clause limits the returned data to a row count? [1]
Page.2
SECTION – C
This section consists of 3 Questions (11 to 13). Each Question Carries 4
Marks
11. In a database there are two tables “ITEM” and “CUSTOMER” as shown below: [4]
(OR)
Page.3
13. National Skill Training Academy has for wings A, B, C, D Distance between [4]
various wings are given below:
Wing A to Wing B-100m
Wing A to Wing C-200m
Wing A to Wing D-400m
Wing B to Wing C-300m
Wing B to Wing D-100m
Wing C to Wing D-450m
Number of Computers installed at various wings are as follows:
Wing A-20
Wing B-150
Wing C-50
Wing D-25
(i) Suggest the best wired medium and the cable layout to efficiently connect
various wings of National Skill Training Academy.
(ii) Name the most suitable wing where the Server should be installed. Justify
your answer.
(iii) Suggest a device/software and its placement that would provide data security
for the Academy.
(iv) What will be needed to provide wireless Internet access to all
smartphone/laptop users in the Academy?
Page.4
SAMPLE PAPER - 5
COMPUTER SCIENCE
Class: XII CBSE
TERM - II Max .Marks: 35
Time: 2:00 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 given for Question numbers 7, 8 and 12.
SECTION – A
This section consists of 7 Questions (1 to 7).
1. What is Stack? Write any one application of Stack? [2]
2. (i) Name the device used for security of a Network. [1]
[1]
(ii) Name the connector used to connect the computer with LAN.
3. Choose correct DDL,DML,DCL and TCL commands from the following:- [2]
(i) How to show pre-existing databases. (ii) How to use a desired database.
Page.1
7. Write the answers on the basis of table PRODUCT [2]
Table: PRODUCT
Pno Pname Qty PurchaseDate
101 Pen 102 12-12-2011
102 Pencil 201 21-02-2013
103 Eraser 90 09-08-2010
109 Sharpener 90 31-08-2012
113 Clips 900 12-12-2011
(i) Write the names of most appropriate columns, which can be considered as
Primary Key in, table PRODUCT and justify your answer.
(i) Write the names of most appropriate columns, which can be considered as
Candidate Key in, table PRODUCT and justify your answer.
(ii) Write the type of key which can be given for the identical columns in table
PRODUCT and SUPPLY.
SECTION – B
This section consists of 3 Questions (8 to 10). Each Carries 3Marks.
8. Avni is trying to connect Python with MySQL for her project. Help her to write the [3]
python statement on the following:-
(i) Name the library, which should be imported to connect MySQL with Python.
(ii)Name the function, used to run SQL query in Python.
(iii) Write Python statement of connect function having the arguments values as :
Host name :192.168.11.111 User : root Password: Admin
Database : MYPROJECT
(OR)
Page.2
(i) Raju’s tutor has given instructions to write a table in MySQL as given below.
Help him to get the solution.
• Name of the relation should be Employee
• Column name with data type as :
Empid ,integer value and set constraint as Primary Key
Empname, which can hold at least 20 characters
Empdesig, which can hold at least 15 variable characters
Empsal, which can hold decimal value in the format (4,2)
9. Write a function push (student) and pop (student) to add a new student name and [3]
remove a student name from a list student, considering them to act as PUSH and
POP operations of stack Data Structure in Python.
10. Give the output of the following SQL statements using table CLUB. [3]
Table : CLUB
CID CNAME AGE GENDER SPORTS PAY DOAPP
5246 AMRITA 35 FEMALE CHESS 900 27/03/2006
4687 SHYAM 37 MALE CRICKET 1300 15/04/2004
1245 MEENA 23 FEMALE VOLLYBALL 1000 18/06/2007
1622 AMRIT 28 MALE KARATE 1000 05/09/2007
1256 KRISHNA 36 MALE CHESS 1100 15/08/2003
1720 MANJU 33 FEMALE KARATE 1250 10/04/2004
2321 VIRAT 35 MALE CRICKET 1050 30/04/2005
Page.3
SECTION – C
This section consists of 3 Questions (11 to 13). Each Question Carries 4
Marks
11. Consider the following tables BOOKS and ISSUED. Write SQL commands for the [4]
statements (i) to (iv).
Table: BOOKS
BID BNAME AUNAME PUBNAME PRICE TYPE QTY
COMP
COMP11 LET US C YASHWANT ARIHANT 350 15
UTER
GEOG
GEOG33 INDIA MAP RANJEET P ATLAS 150 20
RAPHY
HISTO
HIST66 HISTORY R BALA GAMMA 210 25
RY
WHITE COMP
COMP12 C++ VINOD DUA 330 18
BIRD UTER
TIGERWO
LITR88 DREAMS ARVIND AD 470 NOBEL 24
OD
Table: ISSUED
BID QTY_ISSUED
HIST66 10
COMP11 5
LITR88 15
(i) Display book name and author name and price of computer type books.
(ii) To increase the price of all computer books by 50.
(iii) Show the details of all books in ascending order of their prices.
(iv) To display book id, book name and quantity issued for all books which have
been issued.
12. (i) Name a network topology, which is used to maximize speed and make each [4]
computer independent of network.
(OR)
(i) What is the difference between MAC and IP address?(any two on each)
(iii) Expand the following:- (a) WLL (b) ARPANET (c) CSMA (d) DNS
Page.4
13. Polymath IT Infrastructure Limited has set up its new center in Dubai. It has four [4]
buildings as shown in the diagram given below:
Number of Computers
Accounts 25
Store 15
Packaging Unit 60
As a network expert, provide the best possible answer for the following queries:
(ii) Suggest the most suitable place (i.e. buildings) to house the server of this
organization.
(iv) Which fast and very effective wire based transmission medium should
preferably be used to connect the buildings for their web-based activities?
Page.5
SAMPLE PAPER - 6
COMPUTER SCIENCE
Class: XII CBSE
TERM - II Max .Marks: 35
Time: 2:00 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 given for Question numbers 7, 8 and 12.
SECTION – A
This section consists of 7 Questions (1 to 7).
1. (i) In stack addition or removal of elements takes place at ___ end of the list. [2]
(ii) _________ function is used to add an element in stack.
2. (i) Expand the following: (a) ARPANET (b) GPS [2]
4. Differentiate between char(n) and varchar(n) data types with respect to databases. [2]
5. Write the output of the queries (a) to (d) based on the table, PERSON given below: [2]
Page.1
7. Consider the following table SUPERVISOR: [2]
(i) Which command is used to change the name for the sid A11 into Kashyap?
(ii) Which operator is used to compare the range of values?
(OR)
Based on the table
(i) Write the degree and cardinality.
(ii) If one column named Fees added in the below given table, then write the
degree and cardinality of the table after adding.
SECTION – B
This section consists of 3 Questions (8 to 10). Each Carries 3Marks.
8. Write a function in python, PUSH(rollno) and POP() to add a new rollno and delete [3]
a rollno from a List of students, considering them to act as push and pop
operations of the Stack data structure.
(OR)
Write add(bookname) and delete method in python to add bookname and remove
bookname considering them to act as push() and pop() operations in stack.
9. Creating a database named "ASIGNMENTS": using python with MySQL [3]
connectivity.
10. Explain the concept of union between two tables, with the help of appropriate [3]
example.
SECTION – C
This section consists of 3 Questions (11 to 13). Each Question Carries 4
Marks
11. Write queries for (i) to (iv) which are based on the tables. [4]
Page.2
(i) To display CNO, CNAME, TRAVELDATE from the table TRAVEL in descending
order of CNO.
(ii) To display the CNAME of all customers from the table TRAVEL who are
travelling by vehicle with code Vo1 or Vo2.
(iii) To display the CNO and CNAME of those customers from the table TRAVEL
who travelled between '2015-12-31' and '2015-05-01'.
iv) To display all the details from table TRAVEL for the customers, who have travel
distance more than 120 KM in ascending order of NOP.
12. (i) Write two advantages and disadvantages of Ring topology. [4]
(OR)
(ii) (a) Write the four protocols used in Email. (b) Define web browser.
Page.3
(i) Which will be the most appropriate block where TTC should plan to install the
server?
(ii) Draw a block to block cable layout to connect all the buildings in the most
(iii) What will be the best possible connectivity out of the following, you will
suggest to connect the new setup of offices in Bangalore with its London
based office?
(iv) Which of the following device will be suggested by you to connect each
Page.4
SAMPLE PAPER - 7
COMPUTER SCIENCE
Class: XII CBSE
TERM - II Max .Marks: 35
Time: 2:00 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 given for Question numbers 7, 8 and 12.
SECTION – A
This section consists of 7 Questions (1 to 7).
1. Write the two operations and their exceptions in stack. [2]
2. (i) Expand the following : NIC, ISP [2]
(ii) Arrange the following in the increasing order : Mbps, Kbps, Tbps, Gbps
3. Which datatype out of Char and Varchar will you prefer for storing contact [2]
Number (mobile number)? Why?
4. Rearrange the following steps in connecting SQL with python: [2]
1. Create a database object, say mydb, using connect () function by passing
username and password.
2. Execute SQL statement using the created cursor object (mycur).
3. Import the library mysql.connector
4. Create a cursor object, mycur, for the created database object(mydb) for
reserving a temporary work area in the system memory for storing the part of
the active database.
5. Write the output of the queries (a) to (d) based on the table, Course given below: [2]
Table : Course
Page.1
7. Consider the following tables MUSIC and DANCE: [2]
For Example:
If the sample Content of the list is as follows:
N=[-2, 131,-34, 56, 21, -379, 98, -22, 35, 38]
Page.2
9. (i)A table, PRODUCT has been created in a database with the following fields: [3]
PRODUCTCODE, DESCRIPTION, QTY, PRICE
Give the SQL command to increase the length of DESCRIPTION to 25
characters.
(ii) Categorize following commands into DATE Function and NUMERIC function
NOW(), POWER(), DAY(), ROUND()
10. Deepa has to create a database named COMPANY in MYSQL. [3]
She now needs to create a table named EMPLOYEE in the database to store
their details. The table EMPLOYEE has the following structure:
Field Name Data Type Remarks
EMPNO characters 5 Unique
ENAME characters upto 15
DEPARTMENT characters upto 15
JOB characters upto 10
SALARY integer
Help her to complete the task by suggesting appropriate SQL commands.
SECTION – C
This section consists of 3 Questions (11 to 13). Each Question Carries 4
Marks
11. (a) Differentiate between the terms Domain Name and URL in context of web [4]
services. Also write one example of each to illustrate the difference.
(OR)
The following is a 32 bit binary number usually represented as 4 decimal values,
each representing 8 bits, in the range 0 to 255 (known as octets) separated by
decimal points. 140.179.220.200 What is it? What is its importance?
Page.3
12. Write SQL statements for the following queries (i) to (v) based on the relations [4]
CUSTOMER and TRANSACTION given below :
(a) To display all information about the CUSTOMERs whose NAME starts with
'A'.
(d) To display CUSTOMER NAME and their respective INTEREST for all
CUSTOMERs where INTEREST is calculated as 8% of BALANCE.
Page.4
13. A school library is connecting computers in its units in a LAN. The library has 3 [4]
units as shown in the diagram below :
3. Circulation Unit : For issue and return of books for teachers and students
Circulation Unit - 15
Teachers Unit - 10
Students Unit – 10
(a) Suggest the most suitable place (i.e. the Unit name) to install the server of this
Library with a suitable reason.
(b) Suggest an ideal layout for connecting these Units for a wired connectivity.
(c) Which device will you suggest to be installed and where should it be placed to
(d) The university is planning to connect library with school Principal’s computer
which is in his office at a distance of 50 metres. Which type of network out of
LAN, MAN or WAN will be used for the network ? Justify your answer.
Page.5
(i) Which will be the most appropriate block where TTC should plan to install the
server?
(ii) Draw a block to block cable layout to connect all the buildings in the most
(iii) What will be the best possible connectivity out of the following, you will
suggest to connect the new setup of offices in Bangalore with its London
based office?
(iv) Which of the following device will be suggested by you to connect each
Page.6
SAMPLE PAPER - 8
COMPUTER SCIENCE
Class: XII CBSE
TERM - II Max .Marks: 35
Time: 2:00 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 given for Question numbers 7, 8 and 12.
SECTION – A
This section consists of 7 Questions (1 to 7).
1. Write the name of the operations that can be applied on stacks. Also write the [2]
name of functions that are used to perform the task.
2. (i) Expand the following terms: (a) MAC (b) TCP/IP [2]
(ii) Which device is used to convert the analog signal to digital and vice versa.
3. Differentiate between Primary key and Foreign Key. [2]
4. Explain any two methods through which we can extract records from a result set. [2]
5. Write the output of the queries (i) to (iv) based on the table Employee given below: [2]
Ecode Name Salary Job City
E1 Ritu Jain 50000 Manager Delhi
E2 Vikas Verma 45000 Executive Jaipur
E3 Raja 30000 Clerk Delhi
E4 Leena 45000 Manager Bangalore
E5 Shikha 50000 Accountant Kanpur
(i) SELECT ECODE,NAME,MAX(SALARY) FROM EMP WHERE CITY=’DELHI’;
(ii) SELECT NAME,JOB FROM EMP WHERE SALARY BETWEEN 40000 AND
50000;
(iii) SELECT AVG(SALARY) FROM EMP WHERE JOB IN ('MANAGER',
'CLERK','EXCUTIVE');
(iv) SELECT SUM(SALARY) FROM EMP WHERE NAME LIKE '%A';
6. (i) Write a command to delete all rows from the table 'Student'. [2]
(ii) Which type of join is depicted in the following SQL statement?
SELECT P.PNO,P.NAME,PR.PRICE FROM PRODUCT P,PRICE PR WHERE
P.PNO=PR.PNO;
7. Consider the following table Employee with the following records: [2]
Ecode Name Desig Sgrade DOJ
101 Sneha Executive S01 2003-03-23
102 Ravi HEAD-IT S02 2010-02-12
103 Sunita Receptionist S03 2009-06-20
108 Ravi Kumar GM S04 2006-08-11
107 Priyam Head-IT S05 2004-12-29
(i) In the above table Employee, Identify which of the two columns are uniquely
identified each row? Which key can be made with these columns?
Page.1
(ii) What is the Cardinality and degree of the employee table?
(OR)
Consider the table Salary and answer the following questions:
Sno Sgrade Salary
1 S01 28000
2 S02 45000
3 S03 25000
4 S04 90000
5 S05 50000
(i) How can we access records from both the tables Employee and Salary?
(ii) How many rows and columns will be there after the Cartesian products of
these two tables.
SECTION – B
This section consists of 3 Questions (8 to 10). Each Carries 3Marks.
8. Write a function in Python, MakePush(Package) & MakePop(Package) to add a [3]
new package & delete a package from a list of package description using stack
data structure & its operation.
(OR)
Write a function in Python, Push(Package) and Pop(Package) to add details of
employee contain information (Empid,Ename and Salary) in the form of tuple in
Package and delete a Package from a List of Package Description, considering
them to act as Push and Pop operations of the Stack data structure.
9. (i) Sonal needs to display name of the teachers, who have "O" as the third [1]
character in their name. She wrote the following query:
"SELECT NAME FROM TEACHER WHERE NAME="$$O?"; But, query isn’t
producing the result. Identify the problem.
Page.2
SECTION – C
This section consists of 3 Questions (11 to 13). Each Question Carries 4
Marks
11. Write SQL queries (i) to (iv) based on the tables Watches & Sale. [4]
TABLE: WATCHES
Watchid Watch_Name Price Type Qty_Store
W001 High Time 10000 Unisex 100
W002 Life Time 15000 Ladies 150
W003 Wave 20000 Gents 200
W004 High Fashion 7000 Unisex 250
W004 Golden Time 25000 Gents 100
TABLE: SALE
Watchid Qty_Sold Quarter
W001 10 1
W003 5 1
W002 20 2
W003 10 2
W001 15 3
W002 20 3
W005 10 3
W003 15 4
(i) To display all the details of those watches whose name ends with 'TIME'.
(ii) To display Watche’s name and price of those watches which have price
range in between 5000-15000.
(iii) To display total quantity in store unisex type watches.
(iv) To display watch name and their quantity sold in first quarter.
Page.3
12. Write any two differences between Star and Tree topology of network? [4]
(OR)
What is web hosting? What are its various categories?
13. Multipurpose Public School, Bengaluru is setting up the network between its [4]
Different wings of school campus. There are 4 wings named SENIOR(S),
JUNIOR(R), ADMIN (A) and HOSTEL (H).
Page.4
SAMPLE PAPER - 9
COMPUTER SCIENCE [NC]
3. Which two constraints when applied together will produce a Primary Key [2]
constraint?
4. Rearrange the following steps in connecting SQL with python: [2]
1. Execute SQL statement using the created cursor object (mycur).
2. Create a database object, say mydb, using connect() function by passing
username and password.
3. Create a cursor object, mycur, for the created database object(mydb) for
reserving a temporary work area in the system memory for storing the part of
the active database.
4. Import the library mysql.connector
5. Write the output of the queries (a) to (d) based on the table, given below: [2]
Page.1
7. Consider the following tables MUSIC and DANCE: [2]
Page.2
10. Abinaya has to create a database named SCHOOL in MYSQL. She now needs to [3]
create a table named MARKS in the database to store the MARKS of various
subjects. The table MARKS has the following structure:
Field Name Data Type Remarks
Subject characters upto 25 Unique
Type characters upto 15
Marks_obtained integer
Max_Marks integer
Status 1 character
Help her to complete the task by suggesting appropriate SQL commands.
SECTION – C
This section consists of 3 Questions (11 to 13). Each Question Carries 4
Marks
11. (i) Define the following terms : (a) Router (b) Gateway [2]
(OR)
Give two advantages and two disadvantages of Fibre-optic cable.
(ii) What is data communication? What are the main components of data [2]
communication?
12. Write queries (a) to (d) based on the table SALESPERSON AND ITEM given below : [4]
(i) To display the CODE and NAME of all SALESPERSON having "I7" Item Type
Code from the table SALESPERSON.
Page.3
13. Go-Fast corporation is a Hyderabad based company, which is planning to set up [4]
training campuses in various cities in next 3 years. Their first campus is coming
up in Pune. At Pune campus, they are planning to have 4 different blocks for HR,
Web Design Training, Programming Training and Hardware Training. Each block
has number of computers, which are required to be connected in a network for
communication, data and resource sharing.
As a network consultant of this company, you have to suggest the best network
related solutions for them for issues/problems raised in (i) to (iv), keeping in mind
the distances between various blocks/locations and other given parameters.
(i) Suggest the most appropriate block/location to house the SERVER in the
PUNE Campus (out of the 4 blocks) to get the best and effective connectivity.
Justify your answer.
(ii) Which kind of network (PAN/LAN/WAN) will be formed if the Pune campus is
connected to its head office in Hyderabad?
(iii) Suggest the best wired medium and draw the cable layout (Block to Block) to
efficiently connect various Blocks within the PUNE campus.
(iv) Which fast and very effective wireless transmission medium should preferably
be used to connect the head office at Hyderabad with the PUNE campus?
*********************************************ALL THE BEST*****************************************
Page.4
SAMPLE PAPER - 10
COMPUTER SCIENCE
Class: XII CBSE
TERM - II Max .Marks: 35
Time: 2:00 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 given for Question numbers 7, 8 and 12.
SECTION – A
This section consists of 7 Questions (1 to 7).
1. Write the two operations and their exceptions in stack. [2]
Page.1
7. Consider the following tables MUSIC and DANCE: [2]
Ajay has a list containing integers. You need to help him 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 all positive numbers into a stack.
• Pop and display the content of the stack.
For Example:
If the sample Content of the list is as follows:
N=[-2, 131,-34, 56, 21, -379, 98, -22, 35, 38]
Sample Output of the code should be: 38 35 98 21 56 131
9. (i)A table, PRODUCT has been created in a database with the following fields: (1) [2]
PRODUCTCODE, DESCRIPTION, QTY, PRICE Give the SQL command to
increase the length of DESCRIPTION to 25 characters.
Page.2
(ii) Categorize following commands into DATE Function and NUMERIC function [1]
NOW(), POWER(), DAY(), ROUND()
10. Deepa has to create a database named COMPANY in MYSQL. She now needs to [3]
create a table named EMPLOYEE in the database to store their details. The table
EMPLOYEE has the following structure:
Field Name Data Type Remarks
EMPNO characters 5 Unique
ENAME characters upto 15
DEPARTMENT characters upto 15
JOB characters upto 10
SALARY integer
Help her to complete the task by suggesting appropriate SQL commands.
SECTION – C
This section consists of 3 Questions (11 to 13). Each Question Carries 4
Marks
11. Write SQL statements for the following queries (i) to (v) based on the relations [2]
CUSTOMER and TRANSACTION given below :
(a) To display all information about the CUSTOMERs whose NAME starts with
'A'.
(b) To display the NAME and BALANCE of Female CUSTOMERs
(with GENDER as'F') whose TRANSACTION Date (TDATE) is in the year 2019.
(c) To display the total number of CUSTOMERs for each GENDER.
(d) To display CUSTOMER NAME and their respective INTEREST for all
CUSTOMERs where INTEREST is calculated as 8% of BALANCE.
12. (a) Differentiate between the terms Domain Name and URL in context of web [4]
services. Also write one example of each to illustrate the difference.
(OR)
Page.3
The following is a 32 bit binary number usually represented as 4 decimal values,
each representing 8 bits, in the range 0 to 255 (known as octets) separated by
decimal points: 140.179.220.200 What is it? What is its importance?
(b) Suggest an ideal layout for connecting these Units for a wired connectivity.
(c) Which device will you suggest to be installed and where should it be placed to
provide Internet connectivity to all the Units ?
(d) The university is planning to connect library with school Principal’s computer
which is in his office at a distance of 50 metres. Which type of network out of
LAN, MAN or WAN will be used for the network? Justify your answer.
Page.4