0% found this document useful (0 votes)
374 views

Answer Key - Set 3 - IP

This document contains a sample question paper for the Informatics Practices subject. It has two sections - Section A contains 7 multiple choice questions worth 1-2 marks each about computer networks, SQL queries, and databases. Section B contains 3 questions worth 3 marks each about strings, SQL queries and a database table. Section C contains 1 question worth 4 marks about writing SQL queries on a given table. The document provides the questions along with the answer keys.

Uploaded by

Naveen Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
374 views

Answer Key - Set 3 - IP

This document contains a sample question paper for the Informatics Practices subject. It has two sections - Section A contains 7 multiple choice questions worth 1-2 marks each about computer networks, SQL queries, and databases. Section B contains 3 questions worth 3 marks each about strings, SQL queries and a database table. Section C contains 1 question worth 4 marks about writing SQL queries on a given table. The document provides the questions along with the answer keys.

Uploaded by

Naveen Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Sample Question Paper

INFORMATICS PRACTICES (Code : 065)


Maximum Marks: 35 Time: 2 hours
ANSWER KEY
Q. No Part Section –A Marks
. No Each question carries 2 mark
1 What kind of network is formed?
i) when you connect your laptop with your friend’s mobile using Bluetooth 2
ii) computer network within a university campus.
OR
What is the difference between Static and Dynamic Webpage?
Ans: i)PAN ii) LAN ½ Mark each
OR

1 mark each for each correct differentiation mentioned above or any other relevant
point of differentiation.
2 i) Beauty Lines Fashion Inc. is a fashion company with design unit and market unit 135 1
m away from each other. The company recently connected their LANs using Ethernet
cable to share the stock related information. But after joining their LANs, they are
not able to share the information due to loss of signal in between. Which device you
suggest to be installed for a smooth communication?
Ans: Repeater
1 Mark correct answer
ii) Identify the following device: 1
Devices that are used to connect different types of networks. It performs the necessary
translation so that the connected networks can communicate properly.
Ans:Router
1 Mark correct answer
3 Predict the output of the following queries:
i) SELECT SUBSTR(‘ABCDEFG’, -5 ,3) 2
ii)SELECT left(“Jammu Region”, 5);
OR
Briefly explain the purpose of the following SQL functions:
i. SUBSTR()
ii. LEFT()
Ans: i)CDE ii) Jammu -1 mark for each correct answer.
OR
i) SUBSTR() -Returns a substring of size n starting from the specified position
(pos) of the string. If n is not specified, it returns the substring from the position
pos till end of the string
ii) LEFT()-Returns N number of characters from the left side of the string.
1 Mark for each correct answer
4 Mr.Ram is not able to identify the Domain Name and document name in the given 2
URL. Identify and write it for him.
https://www.cbse.nic.in/aboutus.htm
Ans: Domain Name- www.cbse.nic.in Document Name- aboutus.htm
1 Mark for each correct answer
5 Predict the output of the following queries: 2
i. Select power(5,2);
ii. Select mod(5,2);
Ans:i)25 ii)1
1 Mark for each correct answer
6 Anjali writes the following commands with respect to a table employee having fields, 2
empno, name, department, commission.
Command1 : Select count(*) from employee;
Command2: Select count(commission) from employee;

She gets the output as 4 for the first command but gets an output 3 for the second
command. Explain the output with justification.
Ans:
This is because the column COMMISSION contains a NULL value and the aggregate
function COUNT(*) do not take into account NULL values. Thus Command1 returns
the total number of records in the table whereas Command2 returns the total number of
non NULL values in the column COMMISSION.
2 Marks for correct answer
7 Given Table Course: 2

Find out the output for given SQL command:


i) SELECT TID,COUNT(*),MIN(FEES) FROM COURSE GROUP BY TID
HAVING COUNT(*)>1;
ii)SELECT FEES,DAY(STARTDATE) FROM COURSE WHERE FEES>15000;
OR
Based on the table given above, write queries for the following task:

i) Display TID and lowest course fee for each TID.


ii) Display course details of courses staring in July month.
Ans:
i) TID COUNT(*) MIN(FEES)
101 2 12000
ii) FEES DAY(STARTDATE)
20000 1
18000 25
OR
i) SELECT TID,MIN(FEES) FROM COURSE GROUP BY TID;
ii) SELECT * FROM COURSE WHERE MONTHNAME(STARTDATE)=”July”;
1 Mark for each correct answer.
SECTION – B
Each question carries 3 marks
8 Consider a string “AS YOU know MORE” 3
Write the queries for the following tasks.
i) Write a command to display “know”.
ii) Write a command to display number of characters in the string.
iii) Write a command to check the first occurrence of letter ‘O’

OR
Consider a string str , “You Grow more” stored in a column str. What will be the
output of the following queries?
i) SELECT UPPER(str);
ii) SELECT substr(str,-9,4);
iii) SELECT Right(str,4)
Ans:
(i) select mid(“AS YOU know MORE”,8,4);
(ii) select length(“AS YOU know MORE”);
(iii) select instr(“AS YOU know MORE”,”O”);
OR
(i) YOU GROW MORE
(ii) Grow
(iii) more
1 Mark for each correct answer
9 A relation Vehicles is given below : 3

Write SQL commands to:


a. Display the average price of each type of vehicle having quantity more than 20.
b. Count the type of vehicles manufactured by each company.
c. Display the total price of all the types of vehicles.
Ans:
a. select Type, avg(Price) from Vehicle group by Type having Qty>20;
b. select Company, count(distinct Type) from Vehicle group by Company;
c. Select Type, sum(Price* Qty) from Vehicle group by Type;
a. ½ mark for the Select with avg(), ½ mark for the having clause
b. ½ mark for the Select with count() , ½ mark for group by clause
c. ½ mark for the Select with sum() , ½ mark for the group by clause
10 Gopi Krishna is using a table EMPLOYEE. It has the following columns: 3
Code, Name, Salary, Deptcode. He wants to display maximum salary Department wise.
He wrote the following command:
SELECT Dept code, Max(Salary) FROM EMPLOYEE;
But he did not get desired result.
Rewrite the above query with necessary change to help him get the desired output and
explain the reason.
Ans:
SELECT Deptcode, Max(Salary) FROM EMPLOYEE GROUP BY Deptcode;
GROUP BY clause is used to groups the rows together that contain the same values
in a specified column. So for displaying the maximum salary of each department, the
table must be grouped based on department using group by clause.
1 mark for correcting the query and 2 marks for reason.
SECTION – C
Each question carries 4 marks
11. Consider the table Garment and write the query: 4

i . Display the Minimum price of the Garment.


ii. Count and display the number of GARMENT from each SIZE where number of
GARMENTS are more than 1
iii. Display the sum of price of each color garment
iv. Display average price of XL size garments.
Ans:
i. SELECT MIN(PRICE) FROM GARMENT;
ii. SELECT SIZE,COUNT(*) FROM GARMENT GROUP BY SIZE HAVING
COUNT(*)>1;
iii. SELECT COLOUR,SUM(PRICE) FROM GARMENT GROUP BY COLOUR;
iv. SELECT AVG(PRICE) FROM GARMENT WHERE SIZE=’XL’;
1 Mark for each correct answer
12. Consider the below mentioned table of ‘CLOTH’
DCODE DESCRIPTION PRICE MCODE LAUNCHDATE
10001 FORMAL SHIRT 1250 M001 12–JAN–08
10020 FROCK 750 M004 09–SEP–07
10012 INFORMAL 1450 M002 06–JUN–08
SHIRT
10019 EVENING GOWN 850 M003 06–JUN–08
10090 TULIP SKIRT 850 M002 31–MAR–07
10023 PENCIL SKIRT 1250 M003 19–DEC–08
10089 SLACKS 850 M003 20–OCT–08
Write the commands for the following:
(a) Display first three letters of description e.g. ‘FRO’ for ‘FROCK’
(b) Display the description after removing leading spaces if any.
(c) Display the number of MCODE in the table.
(d) Display the day of the LAUNCHDATE. Eg. ‘Monday’, ’Tuesday’ etc
OR
(e) Display total price of products launched in year 2008.
(f) Display minimum price of product for each material code(MCODE).
(g) Display the most recent LAUNCHDATE.
(h) Display remainder of price divided by 10.
Ans:
a) Select substr(description,1,3) from cloth;
b) Select ltrim(description) from cloth;
c) Select count(MCODE) from cloth;
d) Select Dayname(LAUNCHDATE) from cloth;
OR
e) Select sum(price) from cloth where year(LAUNCHDATE) =2008;
f) Select mcode,min(price) from cloth group by mcode;
g) Select max(LAUNCHDATE) from cloth;
h) Select mod(price,10) from cloth;
1 Mark for each correct answer
13 BeHappy Corporation has set up its new centre at Noida, Uttar Pradesh for its office 4
and web-based activities. It has 4 blocks of buildings.

Distance between the various blocks is as follows:


A to B 40 m
B to C 120m
C to D 100m
A to D 170m
B to D 150m
A to C 70m
Numbers of computers in each block
Block A 25
Block B 50
Block C 125
Block D 10

a) Suggest and draw the cable layout to efficiently connect various blocks of buildings
within the Noida centre for connecting the digital devices
b) Suggest the placement of the following device with justification
i. Repeater
ii. ii. Hub/Switch
c) Which kind of network (PAN/LAN/WAN) will be formed if the Noida office is
connected to its head office in Mumbai?
d) Suggest a most suitable place(unit) to install server with justification.

Ans:
a) Suggested cable layout is Star topology. ½ mark for mentioning topology.

½ mark for correct layout.


b) i) Repeaters between Block B and C,A to D and B to D where distance
between the blocks are more than 100m.
ii) Hub/Switch in all the four blocks to connect the computers in individual
blocks.
½ mark for each correct answer.
c) WAN
1 mark for correct answer
d) Server should be placed in block C, because maximum number of computers are
there in block C.
1 mark for correct answer

You might also like