Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

KENDRIYA VIDYALAYA SANGATHAN::SILCHAR REGION

PREBOARD EXAMINATION (TERM 2) - 2022


CLASS – XII SUBJECT: COMPUTER SCIENCE (083)
Maximum Marks: 35 Duration: 2 Hrs
General Instructions:
 The question paper is divided into 3 Sections - A, B and C.
 Section A, consists of 07 Questions (1-7). Each question carries 2 Marks.
 Section B, consists of 03 questions (8-10). Each question carries 3 marks.
 Section C, consists of 03 questions (11-13). Each question carries 4 marks.
 Internal choices have been given for question numbers 7, 8 and 12.

SECTION (A)

This section consists of 07 Questions (1 to 7).


Each question carries 2 Marks.

Sl. No. Questions Marks

1. One mark for each. 01


a) IMAP- Internet Message Access Protocol
b) SLIP-Serial Line Internet Protocol

What is an IP Address? 01
Answer:
IP stands for "Internet Protocol” It is a unique address that identifies a device
on the internet or a local network and is the set of rules governing the format of
data sent via the internet or local network.

2. What is a stack and what are its applications? 02


One mark for defining stack and one mark for writing applications.
A stack is a linear structure implemented in Last In First Out (LIFO) manner, where
instructions and deletion s are restricted to occur only at one end called Stack Top.
Applications of Stack
1. Reversing of a sequence.
2. Polish String ( Infix to Postfic conversion, Postfox and Prefix Expression
Evaluation)

3. i) What do mean by Cardinality and Degree of a table in RDBMS? 01


Answer:
Cardinality means number of tuples of a table.
Degree means numner of attributes of a table

ii) Which function is used to connect python with MySQL databases? 01

Answer: connect()

4. i) Which SQL command is used to change or make a database active? 01


use <Database>

ii) Which SQL command is used to modify tuples of a relation? 01


update Command

5. What is an attribute and tuple of a table? 02

1
The columns or fields are generally referred as attributes of a table. Attributes defines
structure a table.
The rows are generally referred as Tuples of a table. Tuples contains data stored in one
table.

6. Write output for the SQL Queries based on a table Stationery 01


i) SELECT Company, MAX(Price), MIN(Price), COUNT(*) FROM Stationery
GROUP BY Company;
+------------------+------------------+------------------+-----------------+
| Company | MAX(Price) | MIN(Price) | COUNT(*) |
+------------------+------------------+------------------+-----------------+
| Camelin | 5 | 5 | 1 |
| Luxor | 10 | 10 | 1 |
| Montex | 15 | 15 | 1 |
| Natraj | 6 | 3 | 2 |
+------------------+------------------+------------------+------------------+

ii) SELECT StationeryName, Price*3 as ‘Total Price’ FROM Stationery;


+--------------+-----------------+ 01
| StName | Total Price |
+--------------+-----------------+
| Dot Pen | 30 |
| Eraser | 9 |
| Gel Pen | 45 |
| Pencil | 15 |
| Pencil | 18 |
+--------------+-----------------+
7. mysql> create database oraclenk; 02
mysql> use oraclenk;
one mark for correct syntax for database creation and making database active by use command.

mysql> create table stmaster(stid int primary key, studentname varchar(30), date_of_birth date,
gender char(1), fee decimal, status varchar(6));
one mark for correct syntax of creating table.
OR 02
Delete is a DML command, used to delete the record as per users criteria. – 1 Mark
Drop is a DDL command used to drop or remove various database elements such as tables,
databases, views etc.- 1 Mark

SECTION (B)
This section consists of 03 Questions (8 to 10).
Each question carries 3 Marks.
8. Write AddNew (Book) and Remove(Book) methods in Python to add a new Book and 03
Remove a Book from a List of Books Considering them to act as PUSH and POP
operations of the data structure Stack?
One mark for correct definition of PUSH operation
One mark for correct definition of POP operation
One Mark for checking of Underflow and Overflow conditions
OR
Write a program to implement the stack using list.
One mark for correct definition of PUSH operation
One mark for correct definition of POP operation

2
One mark for correct peek and display operations and correct menu.

9. i) What do you mean by Domain in terms of DBMS?


One marks for correct meaning.
01
A domain is a pool of values from which the actual values appearing in a
given column are drawn.
ii) What are the main differences between Primary Key and Unique Key? 02

Minimum 02 Differences. One mark for each difference


Primary Key Unique Key
Primary key will not accept NULL values Unique key can accept one NULL values
A table can have only one primary key A table can have multiple unique keys.
10. ½ mark for each correct fill in the blank. 03
import mysql.connector as pymysql
dbcon=pymysql.connect(host=”localhost”, user=”root”, passwd=”sia@1928”)
if dbcon.isconnected()==False
print(“Error in establishing connection:”)
cur=dbcon.cursor()
query=”select * from stmaster”
cur.execute(query)
resultset=cur.fetchmany(3)
for row in resultset:
print(row)
dbcon.close()

SECTION (C)

This section consists of 03 Questions (11 to 13).


Each question carries 4 Marks.
11 One mark for each correct query 4
i) To display those company name which are having price less than 30000.

select cm.name from company cm, customer ct where cm.cid=ct.cid and


ct.price <30000;

ii) To display the name of the companies in reverse alphabetical order.

select name from company order by name desc;

iii) To increase the price by 1000 for those customer whose name starts with ‘S’

update customer set price =price+1000 where name like 's%';

iv) To add one more column totalprice with decimal(10,2) to the table customer

alter table customer add column totalprice numeric(10,2);


12. i) What do you mean network topology? Write two examples also. 02
One mark for correct definition or meaning. And ½ mark for each
example.

Or

3
a) Identify the Protocol, Domain Name and document in the given URL.
Protocol: https
Domain Name: silchar.kvs.ac.in
Document name : index.php
b) What is the use of ping command?
Ping command is used to check the connectivity/availability between two
computers.

ii) What are the differences between Circuit Switching Technique and Packet 02
Switching Technique?
Minimum 02 Differences. One mark for each difference
Primary Key Unique Key
In circuit switching, each data unit know In Packet switching, each data unit just
the entire path address which is provided know the final destination address
by the source intermediate path is decided by the
routers.
It is not a store and forward technique. It is a store and forward technique.
Circuit switching is more reliable. Packet switching is less reliable.

Or
Give two advantages and two disadvantages of star topology
One mark for advantages
One mark for disadvantages

Advantages:
Easy to Services
Simple Access Protocols
Centralized Control /problem diagnosis

Disadvantages
Long Cable Length
Difficult to expand
Central Node dependency
13. 04

Orbit
Building
Sunrise
Jupiter
Building
Building

Oracle
Building

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


ii) Orbit Building
iii)
a. Internet Connecting Device/Modem- Orbit Building
b. Switch- Each Building

4
iv) MAN, it is formed to connect various locations of the city via various communication
media.

You might also like