Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B

Sample Paper Class 12

Please refer to Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B below. These Class 12 Informatics Practices Sample Papers will help you to get more understanding of the type of questions expected in the upcoming exams. All sample guess papers for Informatics Practices Class 12 have been designed as per the latest examination pattern issued by CBSE. Please practice all Term 2 CBSE Sample Papers for Informatics Practices in Standard 12.

Sample Paper Term 2 Class 12 Informatics Practices With Solutions Set B

1. Read the following passage and answer the questions that follows Consider the table Student as given below :

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B

Based on above table information, answer the following questions.

(i) State the command that will give the output as :

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B

(I) SELECT Name FROM Student WHERE Class=‘XI’ AND Class=‘XII’;
(II) SELECT Name FROM Student WHERE NOT Class=’XI’ AND Class=‘XII’;
(III) SELECT Name FROM Student WHERE City=“Agra” OR City=“Mumbai”;
(IV) SELECT Name FROM Student WHERE City IN(“Agra”, “Mumbai”);
Choose the correct option.
(a) Both (I) and (II)
(b) Both (III) and (IV)
(c) Any of the options (I), (II) and (IV)
(d) Only (III)   

Answer

B

(ii) What will be the output of the following command?
SELECT * FROM Student WHERE Gender =“F” AND Class = “XII” ORDER BY Marks;

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B
Answer

C

(iii) Prachi has given the following command to obtain the highest marks:
SELECT MAX(Marks) FROM Student WHERE GROUP BY Class;
But she is not getting the desired result. Help her by writing the correct command.
(a) SELECT MAX(Marks) FROM Student WHERE GROUP BY Class;
(b) SELECT Class, MAX(Marks) FROM Student GROUP BY Marks;
(c) SELECT Class, MAX(Marks) GROUP BY Class FROM Student;
(d) SELECT Class, MAX(Marks) FROM Student GROUP BY Class;  

Answer

D

(iv) State the command to display the average marks scored by students of each gender who are in class XI.
(I) SELECT Gender, AVG(Marks) FROM Student WHERE Class= “XI” GROUP BY Gender;
(II) SELECT Gender, AVG(Marks) FROM Student GROUP BY Gender WHERE Class=‘‘XI”;
(III) SELECT Gender, AVG(Marks) GROUP BY Gender FROM Student HAVING Class=‘‘XI”;
(IV) SELECT Gender, AVG(Marks) FROM Student GROUP BY Gender HAVING Class =“XI”;
Choose the correct option.
(a) Both (II) and (III)
(b) Both (II) and (IV)
(c) Both (I) and (III)
(d) Only (III) 

Answer

B

(v) Help Ritesh to write the command to display the name of the youngest student?
(a) SELECT Name,MIN(DOB) FROM Student ;
(b) SELECT Name,MAX(DOB) FROM Student ;
(c) SELECT Name,MIN(DOB) FROM Student GROUP BY Name ;
(d) SELECT Name,MAXIMUM(DOB) FROM Student; 

Answer

B

2. Observe the following table LIST and find the degree and Cardinality of the LIST.

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B

Ans. Degree = 4
Cardinality = 6

3. Observe the following table carefully and write the names of the most appropriate columns, which can be considered as (i) candidate keys and (ii) primary key.

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B

Ans. (i) Candidate Keys :- Id, Product
(ii) Primary Key :- Id

Or

Consider the following DEPT and WORKER tables. Write SQL queries for (i) to (iv) and find output for SQL query (v).

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B

Note DOJ refers to Date of Joining and DOB refers to Date of Birth of workers.
(i) To display WNO, NAME, GENDER from the table WORKER in descending order of WNO.
(ii) To display the NAME of all the FEMALE workers from the table WORKER.
(iii) To display the WNO and NAME of those workers from the table WORKER, who are born between
‘1987-01-01’ and ‘1991-12-01’.
(iv) To count and display MALE workers who have joined after ‘1986-01-01’.
(v) SELECT COUNT(*), DCODE FROM WORKER
GROUP BY DCODE HAVING COUNT(*)>1;
Ans. (i) SELECT WNO, NAME, GENDER FROM WORKER ORDER BY WNO DESC;
(ii) SELECT NAME FROM WORKER WHERE GENDER = “FEMALE”;
(iii) SELECT WNO, NAME FROM WORKER WHERE DOB BETWEEN ‘1987-01-01’ AND ‘1991-12-01’;
(iv) SELECT COUNT(*) FROM WORKER WHERE GENDER = “MALE” AND DOJ > ‘1986-01-01’;

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B

4. Write a SQL command for creating a table ‘SUPPLIERS’;

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B

Ans. CREATE TABLE SUPPLIERS
(
Product_id INT(4),
Product_Name CHAR(10),
Quantity INT(10),
Price DECIMAL(7,2),
Phone CHAR(10)
);

Or

Consider the following table Vehicles :

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B

Basis on above table intormation, write SQL commands for the following questions.
(i) Display the average price of each type of vehicle having quantity more than 20.
(ii) Count the type of vehicles manufactured by each company.
(iii) Display the total price of all the types of vehicles.
Ans. (i) SELECT Type, AVG(Price) FROM Vehicle GROUP BY Type HAVING Qty > 20;
(ii) SELECT Company, COUNT(DISTINCT Type) FROM Vehicle GROUP BY Company;
(iii) SELECT Type, SUM(Price* Qty) FROM Vehicle GROUP BY Type;

5. (i)Write a query to display current date on your system.
(ii) Display the position of occurrence of string ‘‘OR’’ in the string “CORPORATE LAWYER’’.
(iii)Mrs. Kumar is using table Students with the following columns:
Rno,AdmNo,Name,Aggregate
She wants to display all information of students in descending order of name and with ascending order of aggregate. She wrote the following SQL query and she did not get the desired result.
SELECT * FROM Students ORDER BY Name, Aggregate DESC;
Ans. (i) mysql>SELECT CURDATE();
Output 2021-11-01
(ii) mysql>SELECT INSTR(“CORPORATE LAWYER”, ‘‘OR”);
Output 2
(iii) SELECT * FROM Students ORDER BY AGGREGATE, NAME DESC;

Or

Predict the output of the following.
(i) SELECT POW(INSTR(“Success@dedication”,“@”),2);
(ii) SELECT MONTH(“2020-11-15”)*POW(2,3);
(iii)Mr. Janak is using a table with following columns:
Name, Class, Course_Id, Course_Name
He needs to display name of students, who have not been assigned any stream or have been assigned
Course_Name that ends with “economics”.
He wrote the following query, which did not give the desired result.
SELECT Name, Class FROM Students WHERE Course_Name=NULL OR Course_Name=“%economics”;
Help Mr. Janak to run the query by removing the error and write the correct query.
Ans. (i) 64
(ii) 88
(iii) SELECT Name, Class FROM Students WHERE Course_name IS NULL OR Course_Name LIKE “%economics”;

6. Write the SQL functions which will perform the following operations:
(i) To display the name of the day of the current date.
(ii) To remove spaces from the beginning of a string “ Python”.
(iii) To display the name of the month e.g. January or February from your date of birth(dob).
(iv) To display the starting position of word “Information” from “Information Technology” .
(v) To compute the power of two numbers a and b .
Ans. (i) DAYNAME(DATE(curdate()))
(ii) LTRIM(“ Python’’)
(iii) MONTHNAME(date(dob))
(iv) INSTR(“Information Technology”,‘‘Information”)
(v) POW(a,b)

7. (i) Write the name of the most suitable wireless communication channels for each of the following situations.
(a) Communication between two offices in two different countries.
(b) To transfer the data from one mobile phone to another.
(ii)Mr. Chandervardhan is not able to identify the domain name in the given URL. Identify and write it for him. 
http://www.cbsenic.in/aboutus.htm
Ans. (i) (a) Satellite communication
(b) Bluetooth or infrared whichever is supported by the phone.
(ii) Domain in http://www.cbsenic.in/aboutus.htm is “www.cbsenic.in”.

Or

Expand the following abbreviations :
(i) HTTP
(ii) ARPANET
(iii) VPN
(iv) MODEM
(v) TCP/IP
(vi) DNS
Ans. (i) HyperText Transfer Protocol
(ii) Advanced Research Projects Agency NETwork
(iii) Virtual Private Network
(iv) Modulator Demodulator
(v) Transmission Control Protocol/Internet Protocol
(vi) Domain Name System

8. How is the call quality of a VoIP phone?
Ans. The call quality of cloud communciations systems depends on the speed and reliability of your Internet. You will hear a vast improvement in call quality compared to traditional landlines. Landlines don’t have as much audio bandwidth, which can result in muffled or fuzzy calls.
VoIP calles achieve this through HD voice technology.
Find out your Internet speed by taking the VoIP speed test.

Or

A company in Mega Enterprises has 4 wings of buildings as shown in the diagram :

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B

Computers in each wing are networked but wings are not networked. The company has now decided to connect the wings also.
(i) Suggest a most suitable cable layout for the above connections.
(ii) Suggest the most appropriate topology of the connection between the wings.
(iii) The company wants Internet accessibility in all the wings. Suggest a suitable technology.
(iv) Suggest the placement of the following devices with justification if the company wants minimized network traffic.
(a) Repeater
(b) Hub/Switch
(v) The company is planning to link its head office situated in New Delhi with the offices in hilly areas. Suggest a way to connect it economically.
Ans. (i) Most suitable layout according to distance is

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B

(ii) Star topology
(iii) Broadband
(iv) (a) Repeaters may be skipped as per above layout (because distance is less than 100 m).
(b) In every wing
(v) Radiowaves

9. Modern Public School is maintaining fees records of students. The database administrator 
Aman decided that
♦ Name of the database-School
♦ Name of the table-Fees
♦ The attributes of Fees are as follows:
Rollno-numeric
Name-character of size 20
Class-character of size 20
Fees-numeric
Qtr-numeric
Answer any four questions from the following :
(i) Identify the attribute best suitable to be declared as a primary key.
(ii)Write the degree of the table.
(iii) Insert the following data into the attributes Rollno, Name, Class, Fees and Qtr in Fees table.
(iv) Aman want to remove the table Fees from the database School.
Which command will he use?
(a) DELETE FROM Fees;
(b) DROP TABLE Fees;
(c) DROP DATABASE Fees;
(d) DELETE Fees FROM Fees;
(v) Now, Aman wants to display the structure of the table Fees, i.e. name of the attributes and their respective data types that he has used in the table. Write the query to display the same.
Ans. (i) Primary Key – Rollno
(ii) Degree of table= 5
(iii) INSERT INTO Fees VALUES(101,‘Aman’,‘XII’,5000);
(iv) DELETE FROM Fees;
(v) Describe Fees;

Or

Consider the table Sports given below. Write commands in SQL for (i) to (iv) and output for (v) to (viii).

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B

(i) Display the names of the students who have grade ‘A’ in either Game1 or Game2 or both.
(ii) Display the number of students having game ‘Cricket’.
(iii) Display the names of students who have same game for both Game1 and Game2.
(iv) Display the games taken by the students whose name starts with ‘A’.
(v) SELECT COUNT(*) FROM Sports;
(vi) SELECT DISTINCT Class FROM Sports;
(vii) SELECT MAX(Class) FROM Student;
(viii) SELECT COUNT(*) FROM Sports GROUP BY Game1;
Ans. (i) SELECT Name FROM Sports WHERE Grade1=’A’ OR Grade2=‘A’;
(ii) SELECT COUNT(*) FROM Sports Where Game1=‘Cricket’ OR Game2=’Cricket’;
(iii) SELECT Name FROM Sports WHERE Game1=Game2;
(iv) SELECT Game1,Game2 FROM Sports WHERE Name LIKE ‘A%’;
(v) 6
(vi) 7
8
9
10
(vii) 10
(viii) 2
2
1
1

Class 12 Informatics Practices Sample Paper Term 2 With Solutions Set B