Computer Science - Practice Paper - 3

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

SHETH CN ENGLISH MEDIUM SCHOOL

PRACTICE PAPER - 3 (Term-2)


STD: XII Computer Science (083) Marks:-35
Date:- 21/02/2022 Time:-2 Hrs

Section –A
Each question carries 2 marks

Q. Part Question Mark


No No. s
1. Write an algorithm for pop operation in stack (2)

2. (i) Expand the following: (1)


POP, HTTP

(ii) Write one advantage of star topology over bus topology. (1)

3. What is the difference between degree and cardinality of atable? (2)


What is the degree and cardinality of the following table?

4. Write the code to create the connection in which (2)


database’s name is Python, name of host, user and
password can taken by user. Also, print that connection.
5. Write the output of the queries (i) to (iv) based on (2)
the table, COURSE given below:

Table: COURSE

CID CNAME FEES STARTDATE TID


C201 AGDCA 12000 2018-07-02 101
C202 ADCA 15000 2018-11-15 103
C203 DCA 10000 2018-10-01 102
C204 DDTP 9000 2018-09-15 104
C205 DHN 20000 2018-11-01 101
C206 O LEVEL 18000 2018-07-25 105

(i) SELECT DISTINCT TID FROM COURSE;


(ii) SELECT TID, COUNT(*), MIN(FEES) FROM COURSE GROUP BY
TID HAVINGCOUNT(*)>1;
(iii) SELECT COUNT(*), SUM(FEES) FROM COURSE WHERE STARTDATE< ‘2018-
09-15’;
(iv) SELECT CID, CNAME FROM COURSE ORDER BY CNAME DESC.

6. (i) Which command is used to delete a table in a database? (1)

(ii) Define natural join. (1)

7. (2)
TABLE: FACULTY

F_ID F_Name Hire_date Salary

102 Amit 12-10-1998 12000

103 Nitin 24-12-1994 8000

104 Rakshit 18-5-2001 14000

105 Rashmi 11-9-2004 11000

106 Sulekha 5-6-2006 10000

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


(b) Which field should be made the primary key?
Justify your answer.
OR

Table: GAMES

GCode GameName Number PrizeMoney ScheduleDate


101 Carom Board 2 5000 23-Jan-2004
102 Badminton 2 12000 12-Dec-2003
103 Table Tennis 4 8000 14-Feb-2004
105 Chess 2 9000 01-Jan-2004
108 Lawn Tennis 4 25000 19-Mar-2004

Table: PLAYER
Pcode Name GCode
1 Nabi Ahmad 101
2 Ravi Sahai 108
3 Jatin 101
4 Nazneen 103
5 Anand 108

(i) Which field will be considered as the foreign key as per


the above tables.
(ii) Identify the candidate key(s) from the table GAMES.

SECTION – B
Each question carries 3
marks

8. Pramod has created a dictionary containing (3)


EMPCODE and SALARY as key value pairs of 5
Employees of Parthivi Constructions. Write a
program, with separate user defined functions to
perform the following operations:

● Push the keys (Employee code) of the dictionary


into a stack, where the corresponding value
(Salary) is less than 25000.
● Pop and display the content of the stack.
For example:
If the sample content of the dictionary is as follows:
EMP={"EOP1":16000, "EOP2":28000, "EOP3":19000,
"EOP4":15000, "EOP5":30000}

The output from the program should be:


EOP4 EOP3 EOP1

OR
Aryan 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 odd numbers into
a stack.
● Pop and display the content of the stack.

For Example:
If the sample Content of the list is as follows:
Num=[31, 55, 76, 89, 21, 45, 76, 68 ]
Sample Output of the code should be:
45 21 89 31
9. (i) A table, PERSON is created with following attributes: (1)
P_Id LastName FirstName Address City

Give the SQL command to insert a new row in the PERSONS


table.

(ii) Differentiate between ALTER and UPDATE commands in (2)


SQL
10. Write the queries for the following questions using the table (3)
Product with the following fields, under the database STORE.
(P_ Code, P_Name, Qty, Price)
(i) Create a database STORE
(ii) Display the price of product having code as P06.
(iii) Display the name of all products with quantity greater than
50 and price less than 500.
Section C
Each question carries 4
marks
11. Write queries (a) to (d) based on the tables Sender and (4)
Recipients given below:
Sender
SenderID SenderName SenderAddress Sendercity

ND01 R Jain 2, ABC Appls New Delhi


MU02 H Sinha 12 Newtown Mumbai
MU15 S Jha 27/A, Park Street Mumbai
ND50 T Prasad 122-K,SDA New Delhi

Recipients

RecID SenderID RecName RecAddress recCity

KO05 ND01 R Bajpayee 5, Central Avenue Kolkata


ND08 MU02 S Mahajan 116, A-Vihar New Delhi
MU19 ND01 H Singh 2A, Andheri East Mumbai
MU32 MU15 P K Swamy B5, C S Terminals Mumbai
ND48 ND50 S Tripathi 13, BI D Mayur New delhi
Vihar

(a) To display the names of all Senders from Mumbai


(b) To display the RecID, Sendername, SenderAddress, RecName,
RecAddress for every Recipient
(c) To display Recipient details in ascending order of RecName
(d) To display number of Recipients from each city
12. (i) Give two advantages and two disadvantages of Radiowave (2)
OR
Define the following terms:
Modem, Bluetooth

(ii) What is the difference between star topology and bus topology (2)
of network?
13. Shiva Multi Tech Corporation (SMTC) has set up its new center at four offices (4)
for web based activities. The 4 blocks of buildings are as shown in the
diagram below:

Block A Block C

Block D
Block B

Center to center distances between various blocks

Number of Computers

(a) Which of the following devices will be suggested by you to connect each
computer in each of the block? ● Gateway ● Switch ● Modem .
[

(b) Suggest the most suitable place (i.e. block) to house the server of this organisation with
a suitable reason.
(c) What will be the best possible connectivity out of the
following, you will suggest to connect the new setup of offices
in Bengalore with its London based office?
● Infrared ● Satellite Link ● Ethernet Cable
(d) Company is planning to connect its Block in Hyderabad
which is more than 20 km. Which type of network will be
formed?

You might also like