Skip to content

Class XII – IP – 1 – MS

SAMPLE QUESTION PAPER (2021-22)

INFORMATICS PRACTICES (065)

TERM II

CLASS 12

Time: 2 Hrs                                                                                                                            Max. Marks: 35

GENERAL INSTRUCTIONS

• The question paper is divided into 3 sections – A, B and C

• Section A has 7 Questions (1-7). Each question carries 2 marks.

• Section B has 3 Questions (8-10). Each question carries 3 marks.

• Section C has 3 case-based Questions (11-13). Each question carries 4 marks.

• Internal choices have been given for question numbers 1, 3, 8 and 12.

SECTION A

Q.1 Atul, a network engineer, is required to demonstrate the features of a Star and Bus network. Help him with the layout design and mention an advantage of both.

Star layout:

Advantage: Very effective, efficient and fast as each device is directly connected with the central device.

Bus layout:

Advantage: cheap and easy to maintain, less cable cost

OR

Arya is interested in knowing the difference between the terms Hub and Switch. Help her by mentioning two points

Ans. Arya is interested in knowing the difference between the terms Hub and Switch. Help her by mentioning two points.

HubSwitch
Broadcasts data to all devicesSends data to only the intended node
Is not an intelligent deviceIs an intelligent device as it stores the MAC address

Q.2. (i) Expand: VOIP

Ans. VOICE OVER INTERNET PROTOCOL

(ii) I can receive a signal and retransmit at a higher level so that the signal can cover a longer distance. Who am I?

Ans. Repeater

Q.3. Predict the output of the following queries:

i. SELECT POWER (2, −3);

Ans. 0.125

ii. SELECT ROUND (23483.45, −2);

Ans. 23500

OR

Briefly explain the purpose of the following SQL functions:

i. POWER ()

Ans. POWER (X, Y) – Calculates X to the power Y.

ii. ROUND ()

Ans. ROUND (N, D) – Rounds off number N to D number of decimal places.

Q.4. What is the importance of URL in networking? State an example of a URL.

Ans. It is a unique identifier to identify a resource located on the web.

Eg. http://www.ncert.nic.in

Q.5. Help Reshma in predicting the output of the following queries:

i) SELECT SUBSTR(‘EASYCALCULATION’,5,11);

Ans. CALCULATION

ii) SELECT INSTR (‘Lata Mangeshkar’,’a’);

Ans. 2

Q.6. Gopi Krishna is using a table EMPLOYEE. It has the following columns:

Code, Name, Salary, Deptcode He wants to display maximum salary Department wise. He wrote the following command:

SELECT Deptcode, Max(Salary) FROM EMPLOYEE;

But he did not get the desired result. Rewrite the above query with necessary change to help him get the desired output. Justify your answer.

Ans. SELECT Deptcode, Max(Salary)

FROM EMPLOYEE GROUP BY Deptcode;

Group by groups the rows together that contain the same values in a specified column.

Q.7. Consider following STUDENT table populated with following data

mysql> SELECT * FROM STUDENT;

Answer the following questions:

(i) Display the average marks of the entire dataset.

Ans. SELECT AVG(marks) FROM STUDENT;

(ii) Display the total number of records in the student table.

Ans. SELECT COUNT (*) FROM STUDENT;

OR

Consider the above table and predict the output of the following statements:

(i) SELECT SUM (marks) FROM STUDENT WHERE class =” XII”;

Ans.

(ii) SELECT class, COUNT (*) FROM STUDENT GROUP BY class;

Ans.

SECTION B

Q.8. Predict the output of the following queries:

i. SELECT MONTHNAME (“2022-01-27”);

Ans. January

ii. SELECT INSTR (“Take work as a game and enjoy it”, “game”);

Ans. 16

iii. SELECT RIGHT (“Storms hit your weakness, but unlocks your true strength”,8);

Ans. strength

OR

Consider following VEHICLE table populated with following data

Answer the following questions:

i. Both the following statements are giving two different outputs, what could be the reason

mysql> select * from vehicle where perkm > 50 and perkm < 100; /* Statement1*/

mysql> select * from vehicle where perkm > 50 or and perkm < 100; /* Statement2*/

Ans. Here AND, OR operator is used. The difference is that AND evaluates both conditions must be true for the overall condition to be true. The OR evaluates one condition must be true for the overall condition to be true.

ii. Display the position of the first occurrence of “ar” in the attribute vehicletype.

Ans. SELECT INSTR(vehicletype,”ar”) FROM VEHICLE;

iii. Display 12% of perkm rounded to two digits with column heading “CALCULATED VALUE”.

Ans. SELECT ROUND(12/100*perkm,2) as “CALCULATED VALUE” FROM VEHICLE;

Q.9 Sunil is confused with the following functions:

i. DAY () and DAYNAME ()

ii. MONTH () and MONTHNAME ()

iii. INSTR () and SUBSTR ()

Explain the difference between each and justify using an example for each.

Q.10. Alisha needs a clarity with the purpose of “Group by” and “Order by” clauses in MySQL. You are required to provide an example highlighting the difference between the two with suitable justification.

Ans. The difference between Group by and Order by:

1) Group by clause is used to group the rows that have the same value. Whereas Order by statement sort the result-set either in ascending or in descending order.

2) GROUP BY clause is applicable when we want to use aggregate functions to more than one set of rows. The ORDER BY clause is applicable when we want to get the data obtained by a query in the sorting order.

The following example groups the rows on the basis of D_state.

SELECT D_state, avg(D_salary) AS salary FROM developers GROUP BY D_state;

The following example arranges the rows in the increasing order of D_state.

SELECT D_name, D_state, D_salary FROM developers ORDER BY D_state;

The following example first groups the rows on the basis of D_state and thereafter sorts in increasing order of D_state.

SELECT D_state, avg(D_salary) AS salary

FROM developers

GROUP BY D_state

ORDER BY D_state;

SECTION C

Q. 11. Consider following PRODUCT table populated with following data

(i) Display all records of products except Washing Powder.

Ans. SELECT * FROM PRODUCT WHERE PNAME != “WASHING POWDER”;

(ii) Display the product names whose price lies between 100 and 150 (both values inclusive).

Ans. SELECT PNAME FROM PRODUCT WHERE UPRICE BETWEEN 100 AND 150;

(iii) Display the name and price of products whose UPRICE is greater than 100. Sort on the basis of UPRICE in decreasing order.

Ans. SELECT PNAME, UPRICE

FROM PRODUCT

WHERE UPRICE > 100

ORDER BY UPRICE DESC;

(iv) Display the number of manufactures without duplication.

Ans. SELECT COUNT (DISTINCT MANUFACTURER)

FROM PRODUCT;

Q.12. Mr. Subash, an IT Manager of “GEM Ltd. “has created the following table to store the records of employees:

Write SQL statements for the following:

(i) Display the names of employees in uppercase who work in the Sales dept.

Ans. SELECT UPPER(ENAME) from EMP WHERE DEPARTMENT = “Sales”;

(ii) Display the name of employees who joined in October.

Ans. SELECT ENAME, DOB FROM EMP WHERE MONTH (DOB) =10;

OR

SELECT ENAME, DOB FROM EMP WHERE MONTHNAME (DOB) = “OCTOBER”;

(iii) Display the positional occurrence of “a” in the name of each employee.

Ans. SELECT INSTR(ENAME,”a”) FROM EMP;

(iv) Display from the name 3 characters from the 2nd position of all the employees.

Ans. SELECT MID(ENAME,2,3) FROM EMP;

OR

(i) Predict the output of:

SELECT POW(INSTR(“My_Database”,”_”),2);

Ans. 9

(ii) Is NULL and 0(zero) same? Justify your answer.

Ans. No it’s not the same as null means a value that is unavailable unassigned or unknown and zero is a defined value.

(iii) Shyam wants to insert “Sharma” in the “LastName” column of the “Emp” table as shown below, but an error is being displayed. Write the correct SQL statement.

INSERT INTO Emp (‘Sharma’) VALUES (Lastname) ;

Ans. INSERT INTO Emp(Lastname) VALUES (“Sharma”);

(iv) Write the SQL statement to round of 67.246 to two decimal places.

Ans. SELECT ROUND (67.246, 2);

Q.13. RIT University has to set up its new campus at Chennai. It has four department blocks named block A, B, C and D for different functionalities.

The Administrative Office is currently located at New Delhi.

Distance between various blocks:

Block A to Block B – 50 m

Block B to Block C – 115 m

Block C to Block D -1.5 km

Block A to Block D – 270 m

Block B to Block D – 225 m

Block A to Block C – 1 km

Based on the above information, answer the following questions.

(i) Connect the devices using a suitable topology.

(ii) Name the blocks where a switch should be installed.

Ans. Switch should be installed in all blocks as they need to communicate to each other.

(iii) Name the block where the server is to be installed. Justify your answer.

Ans. Switch should be installed in all blocks as they need to communicate to each other.

(iv) What is the network type formed (out of LAN, MAN, WAN) between Block A to C.

Ans. LAN