2018 Set-4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

SET-4

Series SGN Code No. 90


Candidates must write the Code on the
Roll No.
title page of the answer-book.

 Please check that this question paper contains 11 printed pages.


 Code number given on the right hand side of the question paper should be
written on the title page of the answer-book by the candidate.
 Please check that this question paper contains 7 questions.
 Please write down the Serial Number of the question before
attempting it.
 15 minute time has been allotted to read this question paper. The question
paper will be distributed at 10.15 a.m. From 10.15 a.m. to 10.30 a.m., the
students will read the question paper only and will not write any answer on the
answer-book during this period.

INFORMATICS PRACTICES

Time allowed : 3 hours Maximum Marks : 70

Instructions :

(i) All questions are compulsory.

(ii) Answer the questions after carefully reading the text.

90 1 P.T.O.
1. (a) ABC Company wants to link its computers in the Head office in New
Delhi to its office in Sydney. Name the type of Network that will be
formed. Which Communication media should be used to form this
Network ? 2

(b) Which of the following is/are not communication media ?

(i) Microwaves

(ii) Optical Fiber cable

(iii) Node

(iv) Radio waves

Identify which of the above mentioned communication media are


Wired media and which ones are Wireless media. 2

(c) Write two examples each of software in the following categories : 2

(i) Open Source Operating System

(ii) Open Source Web Browser

(d) Expand the following terms : 2


(i) GSM

(ii) IP

(e) Name the devices : 2

(i) This device constantly looks at all the data entering and
exiting your connection. It can block or reject data in response
to an established rule.

(ii) This device connects multiple nodes to form a network. It


redirects the received information only to the intended
node(s).

90 2
2. (a) Identify the invalid variable names. Sate the reason if invalid. 1

(i) Marks Unit

(ii) Product_1

(iii) Sales123

(iv) 2Marks

(b) Write the data type of variables that should be used to store : 1

(i) Marks of students

(ii) Grades of students (Grade can be ‘A’ or ‘B’ or ‘C’)

(c) Write examples of any two properties and any two methods of
jButton component. 2

(d) Write the purpose of HTML. Distinguish between <P> tag and <BR>
tag. 2

(e) Distinguish between ComboBox and ListBox. When would you


prefer using them over Radiobutton and Checkbox ? 2

(f) Rewrite the following code using switch statement : 2

if (code == ‘A’)
allowance = 3500;
else if (code ==’B’)
allowance= 3200;
else
allowance =2000;

90 3 P.T.O.
3. (a) What is MySQL used for ? Abhay wants to start learning MySQL.
From where can he obtain the MySQL software ? 1

(b) In the table ‘‘Student’’, Priya wanted to increase the Marks (Column
Name:Marks) of those students by 5 who have got Marks below 33.
She has entered the following statement :

SELECT Marks+5 FROM Student WHERE Marks<33;

Identify errors (if any) in the above statement. Rewrite the correct
SQL statement. 1

(c) (i) Name the Data type that should be used to store
AccountCodes like ‘‘A1001’’ of Customers. 1

(ii) Name two Data types that require data to be enclosed in


quotes. 1

(d) Given the table ‘Player’ with the following columns :

Table : Player
PCODE POINTS
1 50
2 NULL
3 40

Write the output of the following statements : 2

(i) SELECT AVG(POINTS)


FROM Player;

(ii) Select COUNT(POINTS) FROM Player;

90 4
(e) ‘Class’ table has columns RNO and NAME.
The following statements are executed :
SET AUTOCOMMIT = 0;
INSERT INTO CLASS VALUES(5,'Rajiv');
COMMIT;
UPDATE CLASS SET NAME='Rajeev' WHERE ID=5;
SAVEPOINT A;
INSERT INTO CLASS VALUES(6,'Chris');
SAVEPOINT B;
INSERT INTO CLASS VALUES(7,'Feroze');
SELECT * FROM CLASS;
ROLLBACK TO B;
SELECT * FROM CLASS;

What will be the output of both the above given SELECT


statements ? 2

(f) Name SQL Single Row functions (for each of the following) that 2
(i) returns a number.
(ii) returns lowercase letters.
(iii) returns names of days. For example : ‘‘Monday’’, ‘‘Tuesday’’.
(iv) returns weekday number. For example : 1 for Sunday, 2 for
Monday, 3 for Tuesday.

4. (a) Identify the error in the following code : 1


switch(c)
{
case 9.0 : a= a+2;
break;
case 8.0 : a=a+3;
break;
}

90 5 P.T.O.
(b) What values will be displayed in JOptionPane when the following
code is executed ? 2
int a=5, b = 2;
while (a < 20)
{
a = a + b;
b = a  b;
JOptionPane.showMessageDialog(null,a);
}

(c) Write the code given below using ‘for’ loop instead of ‘while’ loop : 2
int i=1;
while(i<=5)
{
if(i * i == 4)
jTextField1.setText(""+i);
i=i+1;
}

(d) Write the value that will be stored in variable a after execution of
the following code if : 2
(i) initial value of a is 8.
(ii) initial value of a is 10.
int b = 9;
if (a > b)
a=a+5;
a=a+2;

(e) What will be the values of i and z after the following code is
executed : 2
int i = 0;
int z = 10;
do
{
i = i+2;
z;
}
while (i<10);
90 6
(f) Ms. Priya works as a programmer in ‘‘Avon Education’’ where she
has designed a software to compute fee charges to be paid by the
students. A screenshot of the same is shown below :

 Name of the student is entered by the user.

 Any one Course out of Pharmacy, Architecture and


Arts & Design is chosen by the user.

 If the student is eligible for Concession, the required checkbox


is selected by the user.

90 7 P.T.O.
 Based on the course selected, Fee Per Quarter is displayed in
the appropriate textfield according to the following criterion :

Course Fee Per Quarter


Pharmacy 2000.00
Architecture 2500.00
Arts & Design 2300.00

 If the student is eligible for Concession, a concession of 7% of


Fee per quarter is calculated as the concession amount,
otherwise concession amount is 0.

 Fee to be paid is the Fee per quarter with the concession


amount (if any) deducted from it.
Help Ms. Priya in writing the code to do the following :

(i) When ‘Calculate Charges’ button is clicked, ‘Fee per quarter’,


‘Concession Amount’, ‘Fee to be Paid’ should be calculated and
displayed in the respective text fields. 4

(ii) When ‘CLEAR’ button is clicked, all the textfields,


radiobuttons and checkbox should be cleared. 1

(iii) When ‘Exit’ button is clicked, the application should close. 1

5. Consider the following table ‘Furniture’. Write SQL commands for the
statements (i) to (viii) and write output for SQL queries (ix) and (x).
Table : Furniture
FCODE NAME PRICE MANUFDATE WCODE

10023 Coffee table 4000 19-DEC-2016 W03

10001 Dining table 20500 12-JAN-2017 W01

10012 Sofa 35000 06-JUN-2016 W02

10024 Chair 2500 07-APR-2017 W03

10090 Cabinet 18000 31-MAR-2015 W02

90 8
(i) To display FCODE, NAME and PRICE of items that have Price less
than < 5,000. 1

(ii) To display NAMES and PRICE of those Furniture Items that have
‘table’ anywhere in their names. 1
(iii) To display WCode of Furniture Items. There should be no duplicate
values. 1
(iv) To display the NAMES and PRICE increased by 500.00 of all the
furniture items. (Price should only be displayed as increased; there
should be no increase in the data in the table) 1
(v) To display FCODE and NAME of each Furniture Item in descending
order of FCODE. 1

(vi) To display the details of all the Furniture Items which have
Manufacturing date (MANUFDATE) between 01-JAN-2016 and
15-JUN-2017 (inclusive of both the dates). 1

(vii) To display the average PRICE of all the Furniture Items, which are
made of Wood with WCODE as W02. 1

(viii) To display WCODE wise, WCODE and the highest price of


Furniture Items. 1

(ix) SELECT SUM(PRICE) FROM Furniture WHERE WCODE=’W03’; 1

(x) SELECT COUNT(DISTINCT PRICE) FROM Furniture; 1

6. (a) Write SQL query to create a table ‘Inventory’ with the following
structure : 2

Field Type Constraint

MaterialId Integer Primary key

Material Varchar (50) NOT NULL

Category Char

DatePurchase Date

90 9 P.T.O.
(b) Consider the following tables PATIENT and TEST and answer the
questions that follow :
Table : PATIENT
PCODE NAME PHONE DTADMIT TESTID
6473 Amit Sharma 912356899 19-JUN-2017 T102

7134 Rose Mathew 886744536 12-NOV-2017 T101

8786 Tina Sharma Arora 889088765 06-DEC-2017 T102

6477 Vijay Shah 714567445 07-DEC-2017 T502

7658 Venkat Fazal 865545343 31-DEC-2017 T101

Note : NAME holds the Names of patients.


DTADMIT holds Dates on which a patient was admitted to
hospital.
TESTID holds Ids of Medical tests done on patients.

Table : TEST
TESTID TESTNAME COST
T101 Platelet Count 200.00
T102 Hemogram 190.00
T301 Malaria Detection 350.00
T502 Glucose Test 150.00

Name the Primary keys in both the tables and foreign key in
‘PATIENT’ table.
State the reason for your choice. 2

(c) With reference to the above given tables (in Q6 b), write commands
in SQL for (i) to (iii).
(i) To display Names of Patients, TESTID and Test names for
those Patients who were admitted between ‘01-DEC-2017’ and
‘15-DEC-2017’ (both dates inclusive). 2
(ii) To display Names of Patients, Test names and Cost of Test for
those Patients who have ‘‘Sharma’’ in their names. 2
(iii) To increase the cost of those tests in the table ‘‘TEST’’ by
< 50.00 that have cost below < 200.00 2
90 10
7. (a) How does e-governance help in building trust between the
Government and citizens ? 2

(b) How can e-learning help students learn at their own pace ? 1

(c) Ms. Cathy is creating a form for Vidya University Sports Council
application. Help her to choose the most appropriate controls from
ListBox, ComboBox, TextField, TextArea, RadioButton, CheckBox,
Label and Command Button for the following entries : 2

S.No. Function

1. To let the user enter NAME

2. To let the user enter MOBILE NUMBER

3. To let the user choose one PROFESSION out of the


categories : Teaching/Non-Teaching/Research Scholar

4. To let the user select facilities out of Gym, Yoga, Table


Tennis, Badminton and Aerobics. More than one facility
may be chosen.

90 11 P.T.O.
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)
General Instructions:
● Marking scheme is the final document for all references with regard to evaluation and cannot be
altered under any circumstance.
● The answers given in the marking scheme are SUGGESTIVE. Examiners are expected to award
marks for all alternative correct Solutions/Answers conveying the similar meaning.
● All programming questions have to be answered with respect to Java Language only.
In Java,
● Ignore case sensitivity for Variable identifiers in programming codes.
In SQL related questions :
● Single quote ‘ ’ as well as double quote “ ”should be accepted for text/character/date entries.
For example: “AMAR” and ‘amar’ both are acceptable.
● Date entries should be accepted in all formats. For example: ‘YYYY-MM-DD’, ‘YY-MM-DD’,
‘DD-Mon-YY’, “DD/MM/YY”, ‘DD/MM/YY’, “MM/DD/YY”, ‘MM/DD/YY’ and {MM/DD/YY} are correct.
● Semicolon should be ignored for terminating the SQL statements.
● Ignore case sensitivity for commands.
● Ignore headers in output questions.
1 (a) ABC Company wants to link its computers in Head office in New Delhi to its office in 2
Sydney. Name the type of Network that will be formed. Which communication media
should be used to form this Network?
Ans Type of network that will be formed : Wide Area Network(WAN)
Transmission media to be used : Satellite
(1 mark for each part)
(b) ​Which of the following is/are ​not​ communication media ? 2
(i) Microwaves
(ii) Optical Fiber cable
(iii) Node
(iv) Radio waves
Identify which of the above mentioned communication media are Wired media and
which ones are Wireless media.
Ans Not communication media : Node
Wired media : Optical Fiber cable
Wireless media : Microwaves , Radio waves
(½ mark for identifying Node as not a communication media )
(½ mark for identifying wired media)
(½ mark each for identifying wireless media)
(c) Write two examples each of software in the following categories: 2
(i) Open Source Operating System
(ii) Open Source Web Browser
Ans (i) Linux, Android, FreeBSD, OpenBSD, NetBSD, DragonFly BSD, OpenSolaris, illumos,
AuroraUX, Darwin, OpenDarwin, MINIX, FreeRTOS, FreeDOS, Haiku, House KolibriOS,
MenuetOS, GNU, ReactOS, L4, Fiasco, Pistachio, Plan 9, AROS, Syllable, Inferno, NuttX,
eCos, RTEMS, HelenOS, E/OS, TempleOS, Linux, BOSS, Ubuntu, Kali Linux
(ii) Mozilla Firefox, Google Chrome, Opera, QupZilla, Midori, rekonq, Tor Browser,
NetSurf, Pale Moon, GNOME Web
(½ mark each for mentioning any two valid Open Source Operating System)
(½ mark each for mentioning any two valid Open Source Web Browser)
(d) Expand the following terms : 2
(i) GSM
(ii) IP

Page 1 of 13
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)
Ans (i) GSM - Global System for Mobile Communications/ Global System for Mobile/ Graphics
Stimulator Media
(ii) IP - Internet Protocol
(1 mark for each correct answer)
(e) Name the devices: 2
(i) ​This device constantly looks at all the data entering and exiting your connection.It
can block or reject data in response to an established rule.
(ii) ​This device connects multiple nodes to form a network. It redirects the received
information only to the intended node(s).
Ans i) Firewall
ii) Switch
( 1 mark for each correct part)
2 (a) Identify the invalid variable names. State the reason if invalid. 1
(i) Marks Unit
(ii) Product_1
(iii) Sales123
(iv) 2Marks
Ans Invalid variable names are :
(i) Marks Unit
Reason : Variable Name should not contain space
(iv) 2Marks
Reason : Variable Name should not start with digit
(1 mark for identifying any one invalid variable name and stating the reason)
Note: Full 1 mark to be awarded if both invalid variable names are identified but
reasons are not given)
(b) Write the data type of variables that should be used to store: 1
(i) Marks of students
(ii) Grades of students(Grade can be ‘A’ or ‘B’ or ‘C’)
Ans (i)​ ​float/double /int / byte / short / long
(ii) ​char
( ½ mark for each part)
Note : Valid data types of MySQL(integer/int/decimal/char/varchar) should also be
accepted.
(c) Write examples of any two properties and any two methods of jButton component 2
Ans Properties of JButton component :
Background,font,label,text,name,editable,enabled,
horizontalalignment,border
Methods of JButton component :
setText(),getText(),setEnabled(),setVisible(), setEditable(),
setVisible(), isSelected(), setSelected()
(½ mark each for mentioning any two valid properties)
(½ mark each for mentioning any two valid methods)
(d) Write the purpose of HTML. Distinguish between <P> and <BR> tag. 2

Page 2 of 13
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)
Ans HTML is used to create web page(s).
<P>​ tag is used to introduce a paragraph while <BR> tag is used to introduce a line
break on a web page.
Note: ​<P>​ as paragraph tag and ​<BR>​ as line break tag to be accepted as difference

(1 mark for stating the purpose)


( 1 mark for correct difference)
(e) Distinguish between ComboBox and ListBox. When would you prefer using them over 2
Radiobutton and Checkbox?
Ans A ComboBox allows selection of one item from a set of items .
while ListBox provides a scrollable set of items from which one or more item(s) may be
selected.
When the number of items are more Combobox or ListBox would be preferred over
Radiobutton and Checkbox.
(1 mark for correct difference)
(1 mark for stating the preference)
(f) Rewrite the following code using switch statement: 2
if ( code == ‘A’)
allowance = 3500;
else if ( code == ‘B’)
allowance = 3200 ;
else
allowance = 2000 ;
Ans switch(code)
{
case ‘A’ : allowance = 3500;
break ;
case ‘B’ : allowance = 3200;
break ;
default : allowance = 2000;
}
Note:65 in place of ‘A’ and 66 in place of ‘B’ should be accepted
(½ mark for correct use of switch)
(½ mark for correct use of case)
(½ mark for correct assigning of allowance)
(½ mark for correct use of default)
3 (a) What is MySQL used for? Abhay wants to start learning MySQL. From where can he obtain 1
the MySQL software ?
Ans i) MySQL is an open source RDBMS used for managing databases.
ii) For obtaining MySQL , Abhay has the following options :
● download from the website mysql.org
● download it from any website that offers MySQL.
● get the software from any source
(½ mark for part i)
(½ mark for stating any one valid option for part ii)
(b) In the table “Student”, ​Priya wanted to increase the Marks(Column Name:Marks) of those 1
students by 5 who have got Marks below 33. She has entered the following statement:

Page 3 of 13
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)

​SELECT Marks+5 FROM Student WHERE Marks<33;


Identify errors(if any) in the above statement. Rewrite the correct SQL statement.
Ans Error :​ ​UPDATE​ ​should be used instead of ​SELECT
​Correct SQL statement:
UPDATE Student SET Marks= Marks+5
WHERE Marks<33;
(½ mark for only identifying the error)
Note: Full 1 mark to be allotted if only correct SQL statement is written
(c) (i) Name the Data type that should be used to store AccountCodes like “A1001” of 2
Customers.
(ii) Name two Data types that require data to be enclosed in quotes.
Ans (i) ​char/varchar
(ii) ​char/varchar/date
(i) (1 mark for mentioning any one correct data type)
(ii) (½ mark each for mentioning any two correct data types)
Note : String data type of Java should also be accepted for both (i) and (ii) parts
and 1 mark each should be awarded
(d) Given the table ‘Player’ with the following columns : 2
Table : Player
PCODE POINTS
1 50
2 NULL
3 40
Write the output of the following statements:
(i) SELECT AVG(POINTS)
FROM Player;
(ii) Select COUNT(POINTS) FROM Player;
Ans (i) ​AVG(POINTS)
45
(ii) ​COUNT(POINTS)
2
(1 mark each for each part)
(e) ​‘Class’ table has columns ​RNO​ and ​NAME​. 2
​The following statements are executed:
​SET AUTOCOMMIT = 0;
INSERT INTO CLASS VALUES (5,‘Rajiv’);
COMMIT;
UPDATE CLASS SET NAME = ‘Rajeev’ WHERE ID = 5;
SAVEPOINT A;
INSERT INTO CLASS VALUES (6,‘Chris’);
SAVEPOINT B;
INSERT INTO CLASS VALUES (7,‘Feroze’);
SELECT * FROM CLASS;
ROLLBACK TO B;
SELECT * FROM CLASS;
What will be the output of both the above given SELECT statements ?

Page 4 of 13
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)

Ans (Case 1​: If RNO is treated as ID, the following solution should be accepted:)
Output of SELECT statement 1 :
RNO NAME
5 Rajeev
6 Chris
7 Feroze

O​utput of SELECT statement 2 :


RNO NAME
5 Rajeev
6 Chris

(Case 2 :​ If RNO is ​NOT​ treated as ID, the following should be accepted:)


Output of SELECT statement 1 :
RNO NAME
5 Rajiv
6 Chris
7 Feroze
O​utput of SELECT statement 2 :
RNO NAME
5 Rajiv
6 Chris

Case 1 and 2 : ( 2 mark for output of ​any one​ of the​ SELECT​ statement)
Note : 2 marks for mentioning column name error
(f) Name SQL Single Row functions (for each of the following) that 2
(i) returns a number.
(ii) returns lowercase letters.
(iii) returns names of days. For example: “Monday “, “Tuesday”.
(iv) returns weekday number. For example : 1 for Sunday , 2 for Monday , 3 for
Tuesday.
Ans (i) ​length()/ instr()/ round()/ truncate()​ or any other correct Single
Row Function that returns a number
(ii) ​lower() / lcase()
(iii) ​dayname()
(iv)​ ​dayofweek()
(½ mark for each part)
4 (a) Identify the error in the following code: 1
switch(c)
{
case 9.0 : a= a+2;
break;
case 8.0 : a=a+3;
break;
}

Page 5 of 13
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)

Ans Variable ‘c’ cannot be of float/real data type.


Note: Full 1 mark should be allotted if correct code is written
(1 mark for identifying/ correcting the code)
(b) What will be displayed in​ ​JOptionPane​ ​when the following code is executed?
​int a=5, b = 2; 2
while (a < 20)
{
a = a + b;
b = a - b;
JOptionPane.showMessageDialog(null,a);
}
Ans 7
12
19
31
OR
7 12 19 31
(½ mark for each correct value)
Note : Full 2 marks should be allotted if only 31 is mentioned
(c) Write the code given below using ‘for’ loop instead of ‘while’ loop:
int i=1; 2
while(i<=5)
{
if(i * i == 4)
jTextField1.setText(""+i);
i=i+1;
}
Ans int i;
for(i = 1; i <= 5; i++)
{
if(i * i == 4)
jTextField1.setText(""+i);
}
(½ mark for initialization expression)
(½ mark for test expression)
(½ mark for update expression)
(½ mark body of loop)
(d) Write the value that will be stored in variable ​a​ after execution of the following code if: 2
(i) initial value of​ ​a​ is​ 8 ​ .
(ii) initial value of​ ​a​ i​ s 10.
int b = 9;
if (a > b)
a=a+5;
a=a+2;

Page 6 of 13
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)

Ans i) 10
ii) 17
(1 mark for each part)
(e) What will be the values of​ i​ and ​z​ after the following code is executed: 2
int i = 0;
int z = 10;
do
{
i=i+2;
z--;
}
while (i<10);
Ans i= 10
z = 5
(1 mark for each correct value)
(f) Ms. Priya works as a programmer in “Avon Education” where she has designed a software
to compute fee charges to be paid by the students. A screenshot of the same is shown
below:

● Name of the student is entered by the user.


● Any one Course out of Pharmacy, Architecture and Arts & Design is chosen by the user.
● If the student is eligible for Concession, the required checkbox is selected by the
user.
● Based on the course selected, Fee Per Quarter is displayed in the appropriate textfield
according to the following criterion:
Course Fee Per Quarter
Pharmacy 2000.00
Architecture 2500.00
Arts & Design 2300.00

Page 7 of 13
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)
●If the student is eligible for Concession, a concession of 7% of Fee per quarter is
calculated as the concession amount, otherwise concession amount is 0.
● Fee to be paid is the Fee per quarter with the concession amount (if any)
deducted from it.
Help Ms. Priya in writing the code to do the following:
(i) When ‘Calculate Charges’ button is clicked, ‘Fee per quarter’, ‘Concession Amount’, 4
‘Fee to be Paid’ should be calculated and displayed in the respective text fields.
Ans ​// Calculation of Amount
(i) double feeperqtr = 0.0,concess = 0.0,feetopay=0.0;

if (jRadioButton1.isSelected())
feeperqtr=2000;
else if (jRadioButton2.isSelected())
feeperqtr=2500;
else if (jRadioButton3.isSelected())
feeperqtr=2300;
if (jCheckBox1.isSelected())
concess= (0.07*feeperqtr);
feetopay=feeperqtr-concess;
jTextField2.setText("" + feeperqtr);
jTextField3.setText("" + concess);
jTextField4.setText("" + feetopay);
(½ mark for correct use of if statement for Radiobutton)
(½ mark for assigning correct value for Fee per Quarter)
(½ mark for correct use of if statement for Checkbox)
(½ mark for calculating concession)
(½ mark for calculating Fee to be paid)
(½ mark for displaying Fee per Quarter)
(½ mark for displaying concession)
(½ mark for displaying Fee to be paid)
(ii) When ‘​CLEAR​’ button is clicked, all the textfields, radiobuttons and checkbox 1
should be cleared.
Ans jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
jRadioButton1.setSelected(false);
jRadioButton2.setSelected(false);
jRadioButton3.setSelected(false);
jCheckBox1.setSelected(false);
( ½ mark for clearing any text field)
( ½ mark for clearing check box/radiobutton)
Note : NULL in place of “” should be accepted for clearing text field.
(iii) When ‘​Exit​’ button is clicked, the application should close. 1
System.exit(0);
(1 mark for correct answer)

Page 8 of 13
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)

5. Consider the following table ‘Furniture’. Write SQL commands for the statements (i) to
(viii) and write output for SQL queries (ix) and (x).
Table : Furniture
FCODE NAME PRICE MANUFDATE WCODE
10023 Coffee table 4000 19-DEC-2016 W03
10001 Dining table 20500 12-JAN-2017 W01
10012 Sofa 35000 06-JUN-2016 W02
10024 Chair 2500 07-APR-2017 W03
10090 Cabinet 18000 31-MAR-2015 W02

(i) ​ RICE​ of items that have ​PRICE​ less than ​₹​ ​5,000.
To display ​FCODE​, ​NAME​ and P 1

Ans SELECT FCODE, NAME,PRICE FROM Furniture


WHERE PRICE <5000;
(​ ½ mark for​ S
​ ELECT​)
(​ ½ mark for​ W​ HERE)
(ii) To display ​NAMES and ​PRICE of those Furniture Items that have ‘table’ anywhere in 1
their names.

Ans SELECT NAME,PRICE FROM Furniture


WHERE NAME LIKE ‘%table%’;
(​ ½ mark for​ ​SELECT​)
( ​½ mark for​ ​WHERE)
(iii) To display ​WCODE​ of Furniture Items. There should be no duplicate values. 1

Ans SELECT DISTINCT(WCODE) FROM Furniture;


(​ ½ mark for ​SELECT​)
( ​½ mark for​ ​DISTINCT)
(iv) To display the ​NAMES and PRICE increased by 500.00 of all the furniture items. (Price 1
should only be displayed as increased; there should be no increase in the data in the
table)

Ans SELECT NAME, PRICE+500 FROM Furniture;


(​½ mark for​ S
​ ELECT​)
(​½ mark for​ P​ RICE+500)
(v) T​o display​ ​FCODE​ and​ ​NAME​ ​of each Furniture Item in descending order of​ ​FCODE. 1

Ans SELECT FCODE, NAME FROM Furniture


ORDER BY FCODE DESC;

(½ mark for ​SELECT​)


(½ mark for ​ORDER BY​)
vi) To display the details of all the Furniture Items which have Manufacturing 1
date(​MANUFDATE​) between ​01-JAN-2016 and ​15-JUN-2017 (inclusive of both the
dates).

Page 9 of 13
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)

Ans SELECT * FROM FURNITURE WHERE MANUFDATE BETWEEN ’2016-01-01’ AND


’2017-06-15’;
OR
SELECT * FROM FURNITURE WHERE MANUFDATE >= ’2016-01-01’ AND
MANUFDATE <= ’2017-06-15’;
OR
SELECT * FROM FURNITURE WHERE MANUFDATE BETWEEN ’01-JAN-2016’ AND
’15-JUN-2017’;
OR
SELECT * FROM FURNITURE WHERE MANUFDATE >= ’01-JAN-2016’AND
MANUFDATE <=’15-JUN-2017’;
(½ mark for ​SELECT​)
(½ mark for ​WHERE​)
vii) To display the average ​PRICE ​of all the Furniture Items, which are made of Wood with 1
WCODE​ as ​W02​.

Ans SELECT AVG(PRICE) FROM Furniture


WHERE WCODE = ‘W02’;
(½ mark for ​SELECT​)
(½ mark for ​WHERE​)
OR
(½ mark for ​SELECT​, ½ mark for ‘​FROM​’ clause)
viii) To display ​WCODE​ wise, ​WCODE​ and the highest price of Furniture Items.

Ans SELECT WCODE, MAX(PRICE) FROM Furniture


GROUP BY WCODE;
(½ mark for ​SELECT​)
(½ mark for ​GROUP BY)
ix) SELECT SUM(PRICE) FROM Furniture WHERE WCODE=’W03’; 1

Ans SUM(PRICE)
6500

(1 mark for correct answer)


(x) SELECT COUNT(DISTINCT PRICE) FROM Furniture; 1

Ans COUNT(DISTINCT PRICE)


5

(1 mark for correct answer)

6 (a) Write SQL query to create a table ‘Inventory’ with the following structure: 2
Field Type Constraint
MaterialId Integer Primary key
Material Varchar(50) NOT NULL
Category Char
DatePurchase Date

Page 10 of 13
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)

Ans CREATE TABLE Inventory


(
MaterialId INTEGER PRIMARY KEY,
Material Varchar(50)NOT NULL,
Category Char,
DatePurchase Date
);
(½ mark for​ ​CREATE TABLE​ ​)
(½ mark for ​PRIMARY KEY​ ​constraint)
(½ mark for ​NOT NULL​ constraint)
(½ mark for Column Names with Data Types)
(b) Consider the following tables PATIENT and TEST and answer the questions that
follow:
​Table : ​PATIENT
PCODE NAME PHONE DTADMIT TESTID
6473 Amit Sharma 912356899 19-JUN-2017 T102
7134 Rose Mathew 886744536 12-NOV-2017 T101
8786 Tina Sharma Arora 889088765 06-DEC-2017 T102
6477 Vijay Shah 714567445 07-DEC-2017 T502
7658 Venkat Fazal 865545343 31-DEC-2017 T101

Note :​NAME​ holds the Names of patients.


​DTADMIT​ holds Dates on which patient was admitted to hospital.
​TESTID​ holds Ids of Medical tests done on patients.
Table: ​TEST
TESTID TESTNAME COST
T101 Platelet Count 200.00
T102 Hemogram 190.00
T301 Malaria Detection 350.00
T502 Glucose Test 150.00
Name the Primary keys in both the tables and foreign key in​ ‘​PATIENT​’​ table​.
State the reason for your choice. 2
Ans Primary key (Table : ​PATIENT​ ) - P
​ CODE​ as it is unique to each row of table
Primary key (Table : ​TEST​) – T
​ ESTID​ as it is unique to each row of table
Foreign key in table​ PATIENT​ : ​TESTID​ ​as it links the two tables and is Primary key in
table ​TEST​.
(½ mark each for identifying ​PRIMARY KEY​ of both the tables)
(½ mark for ​FOREIGN KEY​ ​identification)
(½ mark for mentioning ANY one reason for ​PRIMARY​ or ​FOREIGN KEY​)
(c) With reference to the above given tables (in Q6 b), Write commands in ​SQL for (i) to
(iii)
(i) To display Names of Patients, ​TESTID and Test names for those Patients who were 2
admitted between ​‘01-DEC-2017’​ and ​‘15-DEC-2017’​ (both dates inclusive).

Page 11 of 13
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)

Ans SELECT NAME,PATIENT.TESTID,TESTNAME


/*TEST.TESTID accepted*/
FROM PATIENT, TEST
WHERE PATIENT.TESTID = TEST.TESTID
AND DTADMIT BETWEEN ‘01-DEC-2017’ and ’15-DEC-2017’;
OR
SELECT NAME,PATIENT.TESTID,TESTNAME
/*TEST.TESTID accepted*/
FROM PATIENT, TEST
WHERE PATIENT.TESTID = TEST.TESTID
AND DTADMIT >=‘01-DEC-2017’and DTADMIT <= ’15-DEC-2017’;
OR
SELECT NAME,P.TESTID,TESTNAME /*T.TESTID accepted*/
FROM PATIENT P, TEST T
WHERE P.TESTID = T.TESTID
AND DTADMIT BETWEEN ‘01-DEC-2017’ and ’15-DEC-2017’;
OR
SELECT NAME,P.TESTID,TESTNAME /*T.TESTID accepted*/
FROM PATIENT P, TEST T
WHERE P.TESTID = T.TESTID
AND DTADMIT >= ‘01-DEC-2017’ and DTADMIT <= ’15-DEC-2017’;
(½ mark for​ ​SELECT​)
(½ mark for ​FROM​)
(½ mark for correct use of join)
(½ mark for correct use of condition)
Note : ​DTADMIT​ ​in default date format (yyyy-mm-dd) should also be accepted
(ii) To display Names of Patients, Test names and Cost of Test for those Patients who have 2
“Sharma” in their names.
Ans SELECT NAME,TESTNAME,COST
FROM PATIENT, TEST
WHERE PATIENT.TESTID = TEST.TESTID
AND Name LIKE ‘%Sharma%’;
OR
SELECT NAME,TESTNAME,COST
FROM PATIENT P, TEST T
WHERE P.TESTID = T.TESTID
AND Name LIKE ‘%Sharma%’;
OR
SELECT P.NAME,T.TESTNAME,T.COST
FROM PATIENT P, TEST T
WHERE P.TESTID = T.TESTID
AND Name LIKE ‘%Sharma%’;
(½ mark for​ ​SELECT​)
(½ mark for ​FROM​)
(½ mark for correct use of join)
(½ mark for correct use of condition)

Page 12 of 13
CBSE AISSCE 2018 Marking Scheme for Informatics Practices
(​Sub Code: 065 Paper Code 90​)

(iii) To increase the cost of those tests in the table “​TEST​” by ​₹ 50.00 that have cost below 2
₹ ​200.00
Ans UPDATE TEST
SET COST = COST+50.00
WHERE COST <200.00;
(1 mark for ​UPDATE​)
(½ mark for ​SET​)
(½ mark for​ WHERE​ clause)
7 (a) How does e-governance help in building trust between the Government and citizens? 2
Ans ● Transparency of Government processes, policies and decisions
● Awareness about new policies and facilities being offered by the Government.
● Enabling citizen engagement in the policy processes
● Reduces the waiting time
● Practices like influences and bribing are reduced
( 2 marks for correct answer)
(b) How can e-learning help students learn at their own pace? 1
● Students can go through the learning material any number of times as per his/her
Ans learning abilities
● Students can study at their own convenient time anywhere/anytime.
( 1 mark for any relevant point)
(c) Ms. Cathy is creating a form for Vidya University Sports Council application. Help her to 2
choose the most appropriate controls from ListBox, ComboBox, TextField, TextArea,
RadioButton, CheckBox, Label and Command Button for the following entries:
S.No. Function
1. To let the user enter ​NAME
2. To let the user enter ​MOBILE NUMBER
3. To let the user choose one ​PROFESSION​ out of the categories :
Teaching/Non-Teaching/Research Scholar
4. To let the user select facilities out of Gym, Yoga, Table Tennis, Badminton
and Aerobics. More than one facility may be chosen.

Ans
S.No. Function
1 To let the user enter ​NAME TextField
2 To let the user enter​ ​MOBILE NUMBER TextField
3 To let the user choose one ​PROFESSION RadioButton/
out of the categories : Teaching/Non Combobox
Teaching/ Research Scholar
4 To let the user select facilities out of Gym, Checkbox/Listbox
Yoga, Table Tennis, Badminton and Aerobics.
More than one facility may be chosen.

( ½ mark for each correct answer)

Page 13 of 13

You might also like