Class Xii Cs - 10 Sample Papers

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

SAMPLE PAPER 1

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]

(a) SELECT MAX(EXPERIENCE) FROM SCHOOL;

(b) SELECT TEACHER FROM SCHOOL WHERE EXPERIENCE>12 ORDER BY


TEACHER;

(c) SELECT SUM(PERIODS) FROM SCHOOL WHERE SUBJECT LIKE("E%");

(d) SELECT SUBJECT FROM SCHOOL WHERE PERIODS<25 AND


EXPERIENCE>15;

6. (a) Which keyword is used to sort the records of a table in descending order? [1]

(b) What is a database connection? [1]

Page.1
7. Consider the table, CUSTOMER given below: [2]

(a) Identify the degree and cardinality of the above table.


(b) Which field should be made the primary key?
(OR)
(a) Identify the candidate key(s) from the table CUSTOMER.
(b) Which command is used to add new column into the table CUSTOMER.
SECTION – B
This section consists of 3 Questions (8 to 10). Each Carries 3Marks.
8. Write a Program to print a string in reverse order, using stack. [3]
(OR)

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.

SELECT NAME FROM TEACHER WHERE NAME="**O?"

But the query isn’t producing the result. Identify the problem.

10. Sahil has to create a database named KNOWLEDGE in MYSQL.

He now needs to create a table named student in the database to store the
records. The table STUDENT has the following structure:

Help him to complete the task by suggesting appropriate SQL commands.

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)

Identify the type of topology from the following:

(a) Each node can have an arbitrary number of child nodes.

(b) Each node is connected with Hub through independent cables.

(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.

(c) Suggest the placement of (i) MODEM (ii) HUB/SWITCH.

(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.

*********************************************ALL THE BEST*****************************************

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

(a) SELECT Name FROM Student WHERE Name LIKE "J%";


(b) SELECT Adm, Age FROM Student WHERE Subject = "BIOLOGY";
(c) SELECT MAX(Fees), Name FROM Student;
(d) SELECT Name, Age FROM Student WHERE Subject = "Hindi" AND
Fees > 650;
6. (i) Write the SQL Command to display all the rows from a table. [1]
(ii) If there are ‘m’ rows in table-1 and ‘n’ rows in table-2, then how many rows
will be present in the Cartesian product of both the tables? [1]

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

a. Identify the Degree and Cardinality of the table Employee given.


b. Which field should be made the primary key in the given table Employee?
Justify.

(OR)

a. Define the Degree and Cardinality of a table.


b. Consider the following tables “Students” and “Books”. Identify the Foreign
key from the given tables. Justify your answer.
Table :Student
Admno Name
1565 UPEN
1324 KUNAL
1472 VIPIN
6512 VEER

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:

DROP, ALTER, SELECT, DELETE, INSERT, UPDATE

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

Help Rashmi to complete the specified task by suggesting appropriate MySQL


Queries.
SECTION – C
This section consists of 3 Questions (11 to 13). Each Question Carries 4
Marks
11. Write queries (a) to (d) based on the tables SHOP and ACCESSORIES given [4]
below:
Table :SHOP
ID SNAME AREA
100 Chaudhary & Sons GK
101 Sharma Tech CP
102 Gupta Bros. Punjabi Bagh
103 Mehta Textiles Vigyan Vihar

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)

Explain the following terms: SMTP, Telnet

[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.

Block to Block distance (in metres)


FROM TO DISTANCE
HR Conference 75
HR Finance 135
Conference Finance 88

No. of computers to be installed


Block Computers
HR 130
Finance 20
Conference 70

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?

*********************************************ALL THE BEST*****************************************

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

(i) SELECT COUNT(DISTINCT Number) FROM GAMES;


(ii) SELECT MAX(ScheduleDate),MIN(ScheduleDate) FROM GAMES;
(iii) SELECT SUM(PrizeMoney) FROM GAMES;
(iv) SELECT * FROM GAMES WHERE PrizeMoney>12000;
6. i) Which keyword is used to remove duplicate records from relation? [1]
ii) A table "Design" in a database has 5 columns and 2 records. What is the degree
and cardinality of this table? [1]

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.

(ii) What is the degree and cardinality of the above table?


SECTION – B
This section consists of 3 Questions (8 to 10). Each Carries 3Marks.
8. Write a function in Python PUSH_IN(L), where L is a list of numbers. From this [3]
list, push all even numbers into a stack which is implemented by using another
list.
(OR)
Write a function in Python POP_OUT(Stk), where Stk is a stack implemented
by a list of numbers. The function returns the value which is deleted/popped
from the stack.
9. (i) Why is it not allowed to give string and date type argument for Sum() and [3]

Avg() functions?

(ii) There is column C1 in a table T1.The following two statements:

select count(*) from T1; and select count(C1) from T1; are giving different

output. What may be the possible reason?

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:

Find the output of the following:


(i) SELECT Pincode from Post where Pincode LIKE " %1" ;
(ii) SELECT Pincode from Post where Pincode LIKE " 0%"

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]

(ii) Define the following: (a)RJ-45 (b)Ethernet

(OR)

What is protocol? Name 2 commonly used protocols.

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.

*********************************************ALL THE BEST*****************************************

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]

(ii) Which is the transmission medium for TV remotes?

Infrared, Coaxial cable, Optical fibre, Microwave, Ethernet cable.

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]

(a) SELECT Sum(Price) FROM store_items WHERE GST in ("Cat1", "Cat2");


(b) SELECT count(Distinct Item_Brand) FROM store_items;
(c) SELECT Item_Name FROM store_items where Unit Like "d%";
(d) SELECT * FROM store_items WHERE Price>=200 AND Item_Brand!="None";

Page.1
6. (i) Which clause limits the returned data to a row count? [1]

(ii) What is an equi join? [1]


7. Consider the table, Store_Items given below: [2]

(a) Identify the candidate keys of the table.


(b) Which field should be made the primary key? Justify your answer.
SECTION – B
This section consists of 3 Questions (8 to 10). Each Carries 3Marks.
8. Write a program to create a Stack of Student records contains Roll, Name and [3]
Percentage mark. Perform the following:
(a) Display the details of Second Topper Student
(b) Insert a new Record to a Stack
(c) Remove the student details scored less than 90% and display Stack
(OR)
Alam has a list containing 10 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 the even 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=[12, 13, 34, 56, 21, 79, 98, 22, 35, 38]
Sample Output of the code should be: 38 22 98 56 34 12
9. (i) Write down the command to extract some data from the table Members present [3]
in the database 'Society' using Python and MYSQL interface.
(ii) What is the use of GROUP BY clause? How are they useful?
10. The database Maven Admin already has a table DEPARTMENTS, write the SQL [3]
statements to add a table named HR_jobs with the following structure.
Field Data Type Remarks
JOB_ID VARCHAR(10) PRIMARY KEY
JOB_TITLE VARCHAR(35) NOT NULL
DEPT_ID VARCHAR(10) FOREIGN KEY (DEPT_ID IN DEPARTEMENTS
TABLE)
EXP INT
MIN_SAL DECIMAL(6,0)
MAX_SAL DECIMAL(6,0)

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]

Write the command in SQL queries for the following:


(i) To display the details of Items whose Price is in the range of 40 and 95(Both
values included)
(ii) To display the CustomerName, City from table Customer and ItemName and
Price from table Item, with their corresponding matching ID.
(iii) To increase the price of all the products by 50.
(iv) To display the CustomerName of customer table whose city name start with
'N'.
12. (i) What are five Components of Data Communication? [4]

(ii) Differentiate between a Hub and a Switch.

(OR)

(i) Define the following terms: Bandwidth, IP address

(ii) How are Radio Waves and Microwaves different?

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?

*********************************************ALL THE BEST*****************************************

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]

INSERT INTO, SELECT, COMMIT, GRANT, SAVEPOINT, REVOKE,


ROLLBACK, CREATE, UPDATE, DELETE,ALTER,ADD

4. Define Constraints in data base with suitable example. [2]

5. Write SQL commands on the basis of table HOSPITAL [2]


Table: HOSPITAL
P_No Name Age Department Dateofadmin Fee
1256 Arpit 62 Surgery 21/01/06 300
8790 Zayana 18 ENT 12/12/05 250
1254 Kareem 68 Orthopedic 19/02/06 450
1300 Abhilash 26 Surgery 24/11/06 300
1824 Dhanya 24 ENT 20/10/06 350

(i) To add a new column as Address of type characters in table HOSPITAL.


(ii) Create a new table named PDATA having column Name, Age, Department and
fee from existing table HOSPITAL.
6. Arvind is learning MySQL for managing different databases and tables for his [2]
Python based application/software. Tell him the SQL commands for the
Following:-

(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.

(ii)What is the degree and cardinality of the table PRODUCT?


OR
Table: SUPPLY
Cname Pno Qtysold
M/S Rajeev Enterprises 101 50
M/S Vinod Fittings 102 100
M/S Pooja Traders 103 30
M/S Jagat Suppliers 109 60
M/S New Raj Enterprises 113 630

(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

(i) SELECT CNAME FROM CLUB WHERE SPORTS="CHESS";


(ii) SELECT NAME,AGE, FROM CLUB WHERE AGE BETWEEN 25 AND 35;
(iii) SELECT COUNT(DISTINCT SPORTS) FROM CLUB;
(iv) SELECT MIN(AGE) FROM CLUB WHERE GENDER="FEMALE";
(v) SELECT SUM(PAY) FROM CLUB WHERE DOAPP<"30/04/2005";
(vi) SELECT CNAME,AGE FROM CLUB WHERE GENDER="MALE" ORDER BY
AGE DESC;

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.

(ii) Suggest a switching technique in which the information is transferred using


Store and Forward mechanism.

(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:

Distances between various buildings are as follows:


Accounts to Research Lab 55 m
Accounts to Store 150 m
Store to Packaging Unit 160 m
Packaging Unit to Research Lab 60 m
Accounts to Packaging Unit 125 m
Store to Research Lab 180 m

Number of Computers
Accounts 25

Research Lab 100

Store 15
Packaging Unit 60
As a network expert, provide the best possible answer for the following queries:

(i) Suggest a cable layout of connections between the buildings.

(ii) Suggest the most suitable place (i.e. buildings) to house the server of this
organization.

(iii) Suggest the placement of the following device with justification:

(a) Repeater (b) Hub/Switch

(iv) Which fast and very effective wire based transmission medium should
preferably be used to connect the buildings for their web-based activities?

*********************************************ALL THE BEST*****************************************

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]

(ii) Define Gateway.

3. (i) Name some basic MySQL SQL elements. [2]

(ii) What is the full form of SQL?

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]

(a) SELECT ENAME,JOB FROM PERSON;


(b) SELECT ENAME FROM PERSON ENAME LIKE ‘%A’;
(c) SELECT MIN(SALARY) FROM PERSON;
(d) SELECT ENAME,SALARY+500 FROM PERSON
6. (i) CREATE TABLE MIDEXAM(SNO INT,SNAME VARCHAR(15),CS_MARK INT); [2]

What type of statement is this?

(ii) In SQL, which command is used to change a table’s structure

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)

Write about 4G networks.

(ii) (a) Write the four protocols used in Email. (b) Define web browser.

13. MTC corporation is a professional consultancy company. The company is [4]


planning to set up their new offices in India with its hub at Hyderabad. As a
network advisor, you have to understand their requirement and suggest them the
best available solutions. Answer the following questions (i) to (iv) on the basis of
given below details.
Physical locations of the block at MTC

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

appropriate manner for efficient communication.

(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?

(a) Satellite (b) Infrared (c)Ethernet

(iv) Which of the following device will be suggested by you to connect each

computer in each of the building?

(a) switch (b) Modem (c) Gateway

*********************************************ALL THE BEST*****************************************

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

(a) SELECT MAX(STARTDATE) FROM COURSE;


(b) SELECT DISTINCT(CNAME) FROM COURSE;
(c) SELECT CID,CNAME FROM COURSE WHERE TID=101 AND FEES>15000;
(d) SELECT CNAME,FEES FROM COURSE WHERE CNAME IN ('DCA','DDTP');
6. (a) Which command is used to change the structure of the table? [2]

(b) Give difference between Delete and Drop.

Page.1
7. Consider the following tables MUSIC and DANCE: [2]

Identify the degree and cardinality of


(a) Minus operation on MUSIC and DANCE.
(b) Cartesian intersection operation on MUSIC and DANCE
(OR)
What condition has to be satisfied to perform-
(a) Intersection operation on two tables?
(b) Natural join operation on two table?
SECTION – B
This section consists of 3 Questions (8 to 10). Each Carries 3Marks.
8. Aravind has a message (string) which has a upper case alphabets in it. Write a [3]
program, with separate user defined functions to perform the following
operations:

• Push the upper case alphabets in the string into a stack.


• Pop and display the content of the stack.
For example:
If the message is “All the Best, for your Best Performance”
The output from the program should be:
PBBA
(OR)
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

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?

(b) Identify the type of topology on the basis of the following:


(i) Since every node is directly connected to the server, a large amount of cable
is needed which increases the installation cost of the network.
(ii) It has a single common data path connecting all the nodes

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'.

(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.

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 :

The three units are providing the following services :

1. Teachers Unit : For access of the Library Books by teachers

2. Students Unit : For access of the Library Books by Students

3. Circulation Unit : For issue and return of books for teachers and students

Centre to Centre distances between the 3 units are as follows :

Circulation Unit to Teachers Unit 20 metres

Circulation Unit to Students Unit 30 metres

Teachers Unit to Students Unit 10 metres

Number of computers in each of the units is as follows :

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

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.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

appropriate manner for efficient communication.

(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?

(a) Satellite (b) Infrared (c)Ethernet

(iv) Which of the following device will be suggested by you to connect each

computer in each of the building?

(a) switch (b) Modem (c) Gateway

*********************************************ALL THE BEST*****************************************

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.

(ii) Differentiate between DELETE and DROP table commands. [2]


10. Nikhil wants to create Mycompany as database & table Department using SQL for [3]
his project help him by writing suitable commands. The table has the following
structure:
Columnname DeptID DepName
Key type Primary
Nulls/Unique
Datatype Number Varchar
Length 20

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).

Distance between various wings is given below:


Wings No.of computers
Wing A 20
Wing S 150
Wing J 50
Wing H 25

Distance between the buildings:


Wings No.of computers
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
(i) Suggest best wired medium and draw the cable layout to efficiently connect
various wings of Multipurpose Public School, Bengaluru.
(ii) Name the most suitable wing where the server should be installed & justify
your answer.
(iii) Suggest the type of network (LAN, MAN, PAN, WAN) to connect all the blocks
with suitable reason.
(iv) Suggest a device and the protocol that shall be needed to provide wireless
Internet access to all Smartphone/laptop users in the campus of
Multipurpose Public School, Bengaluru.
*********************************************ALL THE BEST*****************************************

Page.4
SAMPLE PAPER - 9
COMPUTER SCIENCE [NC]

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. Consider STACK=['a','b','c', 'd']. Write the STACK content after each operations: [2]

a) STACK.pop( ) b) STACK.append('e') c) STACK.append('f') d) STACK.pop( )

2. a) Expand the following : ARPANET, NSFNET [1]


b) Arrange the following in the increasing order of their size :
LAN, WAN, MAN, PAN [1]

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]

a) select max(salary) from Teacher where gender='M';


b) select count(*) from Teacher where department= 'History';
c) select name,age, department from teacher where date_of_join>"2017-01-10";
d) select name, salary*12 “Annual Salary” from Teacher where gender="M";
6. i) Which command is used to view the structure of a table? [2]
ii) Give difference between single row function and aggregate function.

Page.1
7. Consider the following tables MUSIC and DANCE: [2]

Identify the degree and cardinality of


(a) Union operation on MUSIC and DANCE.
(b) Intersection operation on MUSIC and DANCE
(OR)
What condition has to be satisfied to perform-
(a) Union operation on two tables?
(b) Join operation on two tables?
SECTION – B
This section consists of 3 Questions (8 to 10). Each Carries 3Marks.
8. Madhu has a message (string) which has a few digits in it. Write a program, with [3]
separate user defined functions to perform the following operations:
● Push the digits in the string into a stack.
● Pop and display the content of the stack.
For example: If the message is : "CBSE Term 1 2022 exam over!"
The output from the program should be: 2 2 0 2 1
(OR)
Varun 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 the 2 digit 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 -22 98 21 56 34
9. (i)A table, PRODUCT has been created in a database with the following fields: [2]
PRODUCTCODE, DESCRIPTION, QTY, PRICE Give the SQL command to add
unique constraint to PRODUCTCODE.
(ii) Categorize following commands into Single Row Function and Aggregate [1]
commands? POWER(), SUM(),ROUND(),MAX()

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.

(ii) To display all details from table SALESPERSON in descending order of


SALARY.
(iii) To display the number of SALESPERSON dealing in each TYPE of ITEM.
(Use ITCODE for the same).
(iv) To display NAME of all the salespersons from the SALESPERSON table along
with their corresponding ITEMTYPE from the ITEM table.

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.

Number of Computers installed at various blocks are as follows :


HR Block - 10
Programming Block - 100
Web Design Block - 60
Hardware - 40

(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]

2. (i) Expand the following : NIC, ISP [1]


(ii) Arrange the following in the increasing order : Mbps, Kbps, Tbps, Gbps
[1]
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

(a) SELECT MAX(STARTDATE) FROM COURSE;


(b) SELECT DISTINCT(CNAME) FROM COURSE;
(c) SELECT CID,CNAME FROM COURSE WHERE TID=101 AND FEES>15000;
(d) SELECT CNAME,FEES FROM COURSE WHERE CNAME IN ('DCA','DDTP');
6. (a) Which command is used to change the structure of the table? [2]
(b) Give difference between Delete and Drop.

Page.1
7. Consider the following tables MUSIC and DANCE: [2]

Identify the degree and cardinality of


a) Minus operation on MUSIC and DANCE.
b) Cartesian intersection operation on MUSIC and DANCE
or
What condition has to be satisfied to perform-
a) Intersection operation on two tables?
b) Natural join operation on two table?
SECTION – B
This section consists of 3 Questions (8 to 10). Each Carries 3Marks.
8. Aravind has a message (string) which has a upper case alphabets in it. Write a [3]
program, with separate user defined functions to perform the following
operations:
• Push the upper case alphabets in the string into a stack.
• Pop and display the content of the stack.
For example:
If the message is “All the Best, for your Best Performance”
The output from the program should be: P B B A
(OR)

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) Identify the type of topology on the basis of the following:


(i) Since every node is directly connected to the server, a large amount of cable is
needed which increases the installation cost of the network.
(ii) It has a single common data path connecting all the nodes.
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 :

The three units are providing the following services :


1. Teachers Unit : For access of the Library Books by teachers
2. Students Unit : For access of the Library Books by Students
3. Circulation Unit : For issue and return of books for teachers and students
Centre to Centre distances between the 3 units are as follows :
Circulation Unit to Teachers Unit 20 metres
Circulation Unit to Students Unit 30 metres
Teachers Unit to Students Unit 10 metres
Number of computers in each of the units is as follows :
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
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.

*********************************************ALL THE BEST*****************************************

Page.4

You might also like