INFORMATICS PRACTICES – Class - XII
SET – Higher Order Thinking Skills
Note:
(i) This question paper is divided into 3 sections.
(ii) Section A consists of 30 marks.
(iii) Section B and Section C are of 20 marks each.
(iv) Answer the questions after carefully reading the text.
SECTION-A
1. Answer the following questions :
(a) What do you know about the LAMP suit of programs? 2
(b) If the two related entities are STUDENT AND TEACHER, which type of relationship is shown by them? Also draw the ER model for this relationship.
(c) Why high performance database and machines are needed for data warehouse?
(d) Name the Information Systems that produce the following reports:
(i) Invoicing detail
(ii) Recruitment Summary Report.
(e) Suggest the situations where we need the following data gathering techniques:
(i) On – Site Observation (ii) Interview
2. Answer the following questions :
(a) Can you explain the difference between the following two statements:
Text1.Text
Text1(Index).Text
(b) A variable is Local but it has Global Lifetime, which type of variable it is?
(c) Dolly declares two variables as follows but none of the declaration is correct, can you suggest why?
i) Dim i% as Integer ii) Dim 1A as Integer
(d) Can you skip arguments in a function call? How?
(e) Roshan create an MDI application, but when he runs the application and open the child form the menus of MDI form will disappear, Can you suggest the reason why?
(f) Give the use of Table type, Snap Shot, Forward Only and Dynamic Type Recordset?
3. Answer the following questions:
(a) What is Read Only View? Give an example of it.
(b) Give one advantage and one disadvantage of a serial execution of transaction.
(c) How are errors in a PL/SQL block be managed? Name the errors raised when a query returned:
(i) No rows (ii) Many rows
d) Suggest the parameter modes for the following:
i) Passed value must not get changed
ii) A value is to be received from a procedure but used in any expression
e) Compare and Contrast triggers and constraints.
SECTION – B
4. Do as directed:
a) Rewrite the following code using DO …. LOOP WHILE construct without changing output. 2
Sub My_Arr_Procedure( )
a = 5
Do
Print a
a = a - 1
Loop While a < > 0
End Sub
c) Write a VB program to enter a number and print the product of its digit, as if a number 4 entered is 234 then the program gives o/p as 24.
5. Read the following case study and answer the questions that follow:
The Cotton County showroom has computerized its billing. A new bill is generated for each customer. The showroom allows three different payment modes. The discount rate is based on the payment mode. The following screen shot used to generate the bill:
a) Write code for the CmdClear command button to clear all the textboxes. 1 b) Write the code for the form load event of FrmDiscount so as to 2
i) Disable the TxtDisc and the TxtNet textboxes and set default choice in the option button as cash.
ii) Set the focus to the TxtAmt textbox.
c) Write the code for the change event of the TxtAmt textbox to ensure that the user does 2 not enter a negative or a zero value. If a negative or a zero value is entered then the textbox should be made blank and a warning message should be displayed.
d) Write code for the CmdCalc command button to display the discount rate and net price 5 in the TxtDisc and TxtNet textboxes respectively. Note that net price is calculated as shopping amount – discount amount. The discount amount is calculate according to the discount rate which is based on the payment mode and total shopping amount according to the following table.

SECTION – C
6. Do as Directed:
a) Write a PL/SQL script to print numbers 2,4,6,8,10,….,20 using for loop. 2
b) Find the error(s), if any, in the following code: 2
DECLARE
v_empno NUMBER[4];
v_empname varchar2(20);
BEGIN
Select empno, ename, sal Into v_empno, v_ename FROM emp FOR empno = 1234;
END;
c) Find the O/P in the given PL/SQL block. 2
Declare
Count Number;
Num1 Number;
Begin
Count :=10;
For num1 IN 5..8
Loop
If Mod (num1,2)=0 then
Count :=count – num1;
Else
Count := count + 2 * num1;
End if;
Dbms_output.put_line(count);
End Loop;
End;
d) Write a PL/SQL function CHECK_YEAR that accepts a date from the user and 4 returns 1 if the year is a leap year and returns 0 otherwise.
7. Answer the questions based on the table Metro given below.

a) Write the SQL command to display the different destination without repetition. 2
b) Write the SQL command to display number of metros starting from each MT_Origin. 2
c) Write the PL/SQL code to change the destination OF ALL METROS ENDING AT “ABC” 3
Station to “XYZ” station which are covering a distance of more than 15 km.
d) Write the PL/SQL code to create a stored procedure TIME to display the details of all the 3 metros which start at a particular time of the day which is entered by the user. The time should be accepted as a parameter.
SET – Higher Order Thinking Skills
SOLUTIONS
1) Answer the following questions:
SECTION A
a) LAMP - Linux Apache Mozilla PHP ½ x 4= 2
b) Many to Many Relationship is there. 1 for Type, 1 for ER model 2
c) Since DW stores a large volume of data to support and accommodate possible types 2 of queries. To efficiently store and process and quesry on such large volumes of data, high performance platforms are needed that include high performance RDBMS, high performance O/S and high performance H/W.
d) i) The Invoice Management System produce invoicing details. 1
ii) The Human Resource Development System produce Recruitment Summary Report. 1
e) i) If the closer look of the real system is needed onsite observation is helpful. 1
For any manufacturing unit it is a well suited data gathering technique.
ii) Interview helps to extract as much information as possible, as vital as possible, as 1 honest as possible.
To know the performance of a product it is used.
2) Answer the following questions:
a) Text1.Text - It is a text control. ½
Text1(index).Text - It is a control array of text. ½
b) STATIC variable has local scope and global lifetime. 1
c) i) In Dim i% as Integer, since % is a type declaration for Integer so we can not use 1
it as a part of variable name.
ii) In Dim 1A as Integer, name of a variable can not starts with a digit. 1
d) Yes, if we declare arguments as OPTIONAL then this argument can be skip while 1 calling function.
e) If the MDI as well as Child form both having their own menus, then when child form is 1 loaded its menus takes over the menus of parent form and then parent menu bar is disappear.
f) Use of each Recordeset - 1 mark 1 x 4 = 4
3) Answer the following questions:
a) A Read Only View does not allow any updation of data on the base table. 1
Create view V_Read_Only_EMP as select * from EMP WITH READ ONLY 1
b) Advantage - Correct Execution – as only one transaction is running at a time 1
and if the I/P is correct then definitely the O/P is correct.
Disadvantage - Inefficient Resource Utilization 1
c) Errors in a PL/SQL block are managed by means of exception handling. 1
i) NO_DATA_FOUND ½
ii) TOO_MANY_ROWS ½
d) The parameter modes are: 2
i) IN
ii) OUT
e) Triggers affect only those row where insertions take place after the trigger is created 1 whereas a constraints can be made to affect all rows in the table.
Triggers can be used to define custom constraints, which might not be possible 1 through the inbuild constraints.
SECTION – B
4. a)
Sub My_Arr_Procedure( )
a = 5
Do Until a = 0
Print a
a = a - 1
Loop
End sub
i) A Procedure can’t return a value. Function MyFun ( byVal a as Integer ) MyFun = a + a – 10
ii) A function can not be called by Call Statement. End Function
c) Write a VB program to enter a number and print the product of its digit, as if a number 4 entered is 234 then the program gives o/p as 24.
5) a) Private sub CmdClear_Click ( ) 1
TxtAmt. Text = “ “
TxtDisc.Text = “ “
TxtNet.Text = “ “
End Sub
b) Private sub Form_Load ( ) 2
TxtDisc.Enabled = FALSE
TxtNet.Enabled = FALSE
OptCase.Value = TRUE
TxtAmt.Setfocus
End Sub
c) Private sub TxtAmt_Change ( ) 2
If Val (TxtAmt.Text) < = 0 then
Msgbox “Pls enter a valid amount”
Txt.Amt = “ “
End If
End Sub
d) Private sub CmdCalc _ Click ( ) 5
If Option1.Value = True Then
If Val(Text1.Text) < 10000 Then
Text2.Text = 20
net = Val(Text1.Text) - Val(Text2.Text)
Else
Text2.Text = 25
net = Val(Text1.Text) - Val(Text2.Text)
End If
ElseIf Option2.Value = True Then
If Val(Text1.Text) < 15000 Then
Text2.Text = 10
net = Val(Text1.Text) - Val(Text2.Text)
Else
Text2.Text = 15
net = Val(Text1.Text) - Val(Text2.Text)
End If
ElseIf Option3.Value = True Then
If Val(Text1.Text) < 10000 Then
Text2.Text = 10
net = Val(Text1.Text) - Val(Text2.Text)
Else
Text2.Text = 12
net = Val(Text1.Text) - Val(Text2.Text)
End If
End If
Text3.Text = net
End Sub
SECTION – C
6) a) Declare 2
X number:=2;
Begin
For I In 1..10
Loop
Dbms_output.put_line(X);
X:=X+2;
End Loop;
End;
b) DECLARE
V_empno NUMBER (4);
V_empname varchar2 (20);
S_salary ;
BEGIN
Select empno, ename, sal INTO v_empno, v_empname, S_salary FROM emp WHERE empno = 1234;
END;
c) 20
14
28
20
d) Declare 4
Y Date;
X number;
Begin
Y := ‘&Enter_Date’;
X := To_Number(SUBSTR(Y,8,4));
If Mod ( X, 4) = 0 then
Dbms_Output.Put_Line ( ‘Leap Year’ );
Else
Dbms_Output.Put_Line (‘Not a Leap Year’);
End if;
End;
8) a) Select Distinct (MT_Dest) from Metro; 2
b) Select MT_Origin, count (*) from Metro Group by MT_Origin; 2
c) Declare
Cursor Cur_metro IS Select MT_KM, MT_No from Metro where MT_Dest=’ABC’;
Rec Metro%RowType;
Begin
Open Cur_metro;
Loop
Fetch Cur_metro Into Rec;
Exit when Cur_metro%NOTFOUND;
If Rec.MT_KM > 15 then
Update Metro set MT_Dest=’XYZ’ where MT_No=Rec.MT_No;
End if;
d) Create or replace procedure TIME (T IN Number) AS
RecMetro Metro%ROWTYPE;
Begin
Select * Into RecMetro from Metro where MT_Time = T;
Dbms_output.put_line (RecMetro.MT_NO || RecMetro.MT_Origin || ….. );
End ;