Students can access the CBSE Sample Papers for Class 12 Computer Science with Solutions and marking scheme Term 2 Set 2 will help students in understanding the difficulty level of the exam.

CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions

Maximum Marks: 35
Time: 2 hours

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 have been given for question numbers 7, 8 and 12.

Section – A
(Each question carries 2 Marks)

Question 1.
Write some applications of stack in real life.
Answer:
Some applications of stack in real life are

  • Pile of clothes in an almirah.
  • Multiple chairs in a vertical pile.
  • Bangles worn on wrist.
  • Pile of boxes of eatables in pantry or on a kitchen shelf.

CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions

Question 2.
(i) Expand the following
(a) DTR
(b) NIC
Answer:
(a) DTR → Data Transfer Rate
(b) NIC → Network Interface Card

(ii) Give some examples of guided media.
Answer:
Examples of guided media are Ethernet cable or Twisted pair cable, Co-axial cable and Optical fibre cable.

Question 3.
What do you mean by Database Management System?
Answer:
A Database Management System (DBMS) or database system in short, is a software that can be used to create and manage databases. DBMS lets users to create a database, store, manage, update/modify and retrieve data from that database by users or application programs.

Some examples of open source and commercial DBMS include MySQL, Oracle, PostgreSQL, SQL Server, Microsoft Access, MongoDB.

Question 4.
A resultset is extracted from the database using the cursor object (that has been already created) by giving the following statement

Result = cursor.fetchmany ([size])

(i) How many records will be returned by fetchmany() method?
Answer:
It returns number of rows specified by the size argument.

(ii) What will be the datatype of Result object after the given command is executed?
Answer:
list of tuples.

Question 5.
Give the output of the following SQL statements based on table APPLICANTS. . Table : APPLICANTS
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions 1
(i) SELECT NAME, JOINYEAR FROM APPLICANTS WHERE GENDER = ‘F’ AND C_ID = ‘A02’;
Answer:
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions 2

(ii) SELECT MIN(JOINYEAR) FROM APPLICANTS WHERE GENDER = ‘M’ ;
Answer:
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions 3

(iii) SELECT A VG ( FEE) FROM APPLICANTS WHERE C_ID=‘A01′ OR C_ID=‘A05’;
Answer:
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions 4

(iv) SELECT Name, Fee FROM APPLICANTS WHERE Name LIKE “E%”;
Answer:
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions 5

CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions

Question 6.
(i) Write the SQL query to list all tables in database.
Answer:
SHOW TABLES;

(ii) Write the SQL query to create a table STUDENT with roll no and student’s name (sname).
Answer:
CREATE TABLE STUDENT (roll no int, sname char (20));

Question 7.
Consider the table ITEM given below.
im – 2
(i) Identify the primary key of table ITEM. Also, justify your answer.
(ii) Identify degree and cardinality of the table.
Or
(i) Identify the candidate key(s) from the table ITEM.
(ii) Which statement is used to add a column Quantity in table ITEM?
Answer:
(i) ItemNo should be made the primary key as it uniquely identifies each record of the table,
(ii) Degree: 4
Cardinality: 4
Or
(i) ItemNo, Name
(ii) ALTER TABLE ITEM ADD Quantity Integer (5);

Section – B
(Each question carries 3 Marks)

Question 8.
A linear stack called result contains the following information
(i) Code of Item
(ii)Name of Item
(iii) Price of particular item
Write the method PUSH () to push an object containing Code, Name and Price of Item into the stack.
Or Write the steps to create the stack of glasses.
Answer:

def PUSH (result. Top):
Code = int ( input ("Enter the code of item:”))
Name = input (“Enter the name of item:”)
Price = int(input("Enter the price of item:"))
St = (Code, Name, Price) 
result.append(St)
Top = Top + 1 
return Top

Or

The stack is a linear and ordered collection of elements. The simple way to implement a stack in Python is using the data type list. We can fix either of the sides of the list as TOP to insert/remove elements. We can use built-in methods append () for push() and pop() of the list for implementation of the stack.

As these built-in methods insert/delete elements at the rightmost end of the list, hence explicit declaration of TOP is not needed. Following steps can be used to make stack of glasses
Step 1 Insert/delete elements (glasses).
Step 2 Check if the STACK is empty (no glasses in the stack).
Step 3 Find the number of elements (glasses) in the STACK.
Step 4 Read the value of the topmost element (number on the topmost glass) in the STACK.

CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions

Question 9.
(i) Write the syntax to perform inner join in two tables.
Answer:

SELECT coll, col 2
FROM tablet INNER JOIN table2 
ON tablel.column_name = 
table2.column_name;

(ii) Categorize the following commands into DCL and DDL commands
REVOKE, ALTER, DROP, GRANT, RENAME
Answer:
DCL commands REVOKE, GRANT
DDL commands ALTER, DROP,
RENAME

Question 10.
Write the code to create a database RECORD and also create a table RECIPIENT into a database RECORD. The fields of table are as follows
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions 6
Answer:

CREATE DATABASE RECORD;
CREATE TABLE RECIPIENT 
(Redd varchar(5) Primary Key,
RecName char(20) Not Null,
RecAddress char(30),
RecCity char(20),
Gender char(2));
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions

Section – C
(Each question carries A Marks)

Question 11.
Write the SQL commands for (i) to (iv) on the basis of the table HOSPITAL.
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions 7
(i) To show all information about the patients of Cardiology Department.
Answer:

SELECT * FROM HOSPITAL WHERE
Department = ‘Cardiology’;

(ii) To list the name of female patients, who are in Orthopaedic Department.
Answer:

SELECT Name FROM HOSPITAL WHERE 
Department = ‘Orthopaedic’ AND 
Sex = ‘F’;

(iii) To list names of all patients with their date of admission in ascending order.
Answer:

SELECT Name FROM HOSPITAL ORDER 
BY Dateofadm;

(iv) To display name of doctor are older than 30 years and charges for consultation fee is more than 500.
Answer:

SELECT NAME FROM HOSPITAL WHERE 
Age>30 AND Charges>500;

Question 12.
(i) What is the use of following devices?
(a) Modem
(b) Hub
Or
Explain star topology and bus topology.
(ii) List the components of data communication and explain any two of them in brief.
Answer:
(i) (a) Modem Modem stands for’MOdulator DEModulator’. It refers to a device used for conversion between analog signals and digital signals. We know computers store and process data in terms of Os and Is. However, to transmit data from a sender to a receiver, or while browsing the Internet, digital data are converted to an analog signal and the medium (be it free-space or a physical media) carries the signal to the receiver. There are modems connected to both the source and destination nodes. The modem at the sender’s end acts as a modulator that converts the digital data into analog signals. The modem at the receiver’s end acts as a demodulator that converts the analog signals into digital data for the destination node to understand.

(b) Hub An ethemet hub is a network device used to connect different devices through wires. Data arriving on any of the lines are sent out on all the others. The limitation of hub is that if data from two devices come at the same time, they will collide.

Or

Star Topology In star topology, each communicating device is connected to a central node, which is a networking device like a hub or a switch.

Star topology is considered very effective, efficient and fast as each device is directly connected with the central device. Although, disturbance in one device will not affect the rest of the network, any failure in a central networking device may lead to the failure of complete network.

Bus Topology In bus topology, each communicating device connects to a transmission medium, known as bus. Data sent from a node are passed on to the bus and hence are transmitted to the length of the bus in both directions.

That means, data can be received by any of the nodes connected to the bus. In this topology, a single backbone wire called bus is shared among the nodes, which makes it cheaper and easier to maintain. Both ring and bus topologies are considered to be less secure and less reliable.

(ii) There are five components required for data communication

  1. Sender
  2. Receiver
  3. Message
  4. Communication channel
  5. Protocols

Sender A sender is a computer or any such device which is capable of sending data over a network. It can be any computer, mobile phone, smart watch, walkie-talkie, video recording device, etc.

Receiver A receiver is a computer or any such device which is capable of receiving data from the network. It can be any computer, printer, laptop, mobile phone, television, etc. In computer communication, the sender and receiver are known as nodes in a network.

CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions

Question 13.
Workalot consultants are setting up a secured network for their office campus of Gurgaon for their day-to-day office and web based activities. They are planning to have connectivity between 3 buildings and the head office situated in Mumbai.

Answer the questions (i) to (iv) after going through the building positions in the campus and other details, which are given below
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions 8
(i) Suggest the most suitable place (i.e. building) to house the server of this organisation. Also, give a reason to justify your suggested location.
Answer:
Building RED is the suitable place to house the server because it has maximum number of computers.

(ii) Suggest a cable layout of connections between the buildings inside the campus.
Answer:
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 2 with Solutions 9

(iii) Suggest the placement of the following devices with justification
(a) Switch
(b) Repeater
Answer:
(a) Switches are needed in every building as they help share bandwidth in every building.
(b) Repeaters may be skipped as per above layout (because distance is less than 100 m), however if building GREEN and building RED are directly connected, we can place a repeater there as the distance between these two buildings is more than 100 m.

(iv) The organisation is planning to provide a high speed link with its head office situated in the Mumbai using a wired connection. Which of the following cables will be most suitable for this job?
(a) Optical fibre
(b) Co-axial cable
(c) Ethernet cable
Answer:
(b) Co-axial cable