CBSE Guess paper class XII Informatics Practices 2008 1


GUESS PAPER – 2009
Class – XII
SUBJECT -
Informatics Practices

3rd Pre Board Examination 2008-09

Note:

(i) This Question paper contains total 4 pages.

(ii) This question paper is divided into three sections.

(iii) All questions are compulsory.

(iv) Section – A consists of 30 marks.

(v) Section – B and Section – C are of 20 marks each

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


Section – ‘A’

Q1. Answer the following questions:

(a)What do you understand by a One-to-Many Relationship and Many-to-One Relationship? Explain with the help of example. [2]

(b) Differentiate ER Modelling and Object Modelling Techniques. [2]

(c) Define the following terms in the context of Database

(i) W3C

(ii) Tomcat [2]

(d) What is Normalization? Explain different normalization forms. [4]

Q2. Answer the following questions:

(a) What is error in VB? Differentiate between each of them? [2]

(b) Differentiate between Do While loop and Do Until loop in VB; also give suitable example of each. [2]

(c)Define the term Library Functions in VB. Name the different categories of library functions available in VB. Give the syntax of any two library functions. [2]

OR

(c) What do you understand by ByVal or ByRef in VB. Which is by default? [2]

(d) Explain the following Terms

(i) Modular Programming

(ii) Object Oriented Programming

(iii) Event Driven Programming

(iv) RAD [4]

Q3. Answer the following questions:

(a) What is PL/SQL? What advantages it provides over SQL. [2]

(b) What is Cursor? Explain the steps to follow while writing a Cursor. [2]

(c)What is the difference between “Trigger and Constraints” or “Trigger and Stored Procedure” in PL/SQL? [2]

(d) What is Function? How it is different from Procedures? Also give syntax of each block. [4]

Section – ‘B’

Q4. Read the following case study and answer the questions that follow:

The SHOP n SAVE store has developed the following data entry screen for its operations. The store offers three different types of membership discount schemes for its regular customers. Platinum members get a discount of 10% on all their purchases, Gold members get 5% and Silver members get 3% discount.

Consider the following data entry screen:

The setting of the controls on the form are given below:

Object Type

Object Name

Description

Form

frmCust

To Main Form Object

Text Box

txtProduct

To enter name of the product

txtQty

To enter quantity sold

txtRate

To enter rate per unit of the product

txtAmount

To display the total amount as quantity rate

txtDiscount

To display the discount amount based on membership type

txtNet

To display net amount as amount – discount

Option Buttons

optPlatinum

To specify Platinum Membership

optGold

To specify Gold Membership

optSilver

To specify Silver Membership

Command Buttons

cmdCalculate

To calculate the amount,discount and net amount

cmdExit

To close the application

(i) Write the command to disable the textboxes txtAmount, txtDiscount & txtNet[1]

(ii) Write the command to remove the decimal part from the text box txtNet so that

the net amount contains only the integer portion in Rupees. [2]

(iii) Write the code for cmdCalculate the amount, discount and net amount as per the given descriptions and conditions. [3]

(iv) Write the code for cmdExit to close the application, but before the application is closed it should check the net amount and if the net amount > 10000 the membership of the customer should be displayed. For example, if the customer already has Silver membership it should be upgraded to Gold and he should be informed of the same using a message box. [4]

Q5. Answer the following questions:

(i) Write VB procedure which takes a string as argument and display the following:

· The string in uppercase.

· The length of string.

· The string with its first and last characters in uppercase and all the other characters in lowercase. [3]

(ii) Write a function in VB to find sum of the following series:

1 + 1/2! + 1/3! + 1/4! + . . . n terms

Hint: Here ‘!’ stands for factorial. [3]

(iii) Find the output of the following code segment:

Private Sub cmdOk_click()

Dim V1 as Integer, V2 as Integer, Counter as Integer

Counter =1

V1=0

V2=1

Do While Counter <= 8

Print V1

Print V2

V1 = V1 + V2

V2 = V2 + V1

Counter = Counter + 2

Loop

End Sub [2]

(iv) Find the errors from the following code segment and rewrite the corrected code underlining the correction made:

Private Sub ShowGrade (a; b as integer)

c=a + b;

Select Case c

Case 1

Print “Excellent”

Case 2, 3

Print “Good”

Case 4

Print “Average”

Default case

Print “Poor”

End Sub [2]

Section – ‘C’

Q6. Answer the following questions

(a) Table: Department

DeptNo

DName

Loc

1

Sales

New Delhi

2

Marketing

Mumbai

3

Manufacturing

Noida

4

R & D

Bangalore

Look at the above Dept table and give the output produced by the following PL/SQL code on execution:

DECLARE

v_DeptID Department.DeptNo%TYPE :=2;

v_Department Department.DName%Type;

v_Counter NUMBER (1) := 1;

BEGIN

LOOP

SELECT DName INTO v_Department FROM Department WHERE DeptNo = v_DeptID ;

IF V_Department <>3 THEN

DBMS_OUTPUT.PUT_LINE (v_Department);

END IF;

v_DeptID := v_DeptID + 1;

v_Counter : = v_Counter + 1;

EXIT WHEN v_Counter >=3;

END LOOP;

END; [2]

(b) Write the output produced by the following part of code in PL/SQL

BEGIN

FOR i IN REVERSE 1..10

LOOP

IF MOD (i, 2)=0 THEN

DBMS_OUTPUT.PUT (TO_CHAR (i*5)||’ ‘);

ELSE

DBMS_OUTPUT.PUT (TO_CHAR (i*10));

DBMS_OUTPUT.NEW_LINE;

END IF;

END LOOP;

END; [2]

(c) Write a PL/SQL Stored Procedure that takes “maxrows” and “maxcols” as argument to generate a multiplication table, using <> nested simple loop.

The output will be like this:

0 2 3 4 5

2 0 6 8 10

3 6 0 12 15

4 8 12 0 20

5 10 15 20 0 [3]

(d) Write a PL/SQL Function that takes emp_id as argument to determine whether the salary(field sal) of emp_id 5001 in EMPL table is less than 15000/- Rs. or not. If it is, give the employee an increment of 25% and return the message “Increment Given” otherwise return the message “No increment given”. [3]

Q7. Use the following structure of Customer table to answer the following questions:

Column Name

Cust_ID

(Primary Key)

Cust_Name

Cust_Add1

Cust_Add2

Cust_Phone_

Service_Provider

Cust_Phone

Data Type

NUMBER

VARCHAR2

VARCHAR2

VARCHAR2

VARCHAR2

VARCHAR2

Length

7

30

20

30

10

10

(a) Write a PL/SQL code to modify the CUST_PHONE numbers by joining ‘2’ if Cust_Phone_Service_Provider is BSNL, ‘3’ if Cust_Phone_Service_Provider is RELIANCE, ‘4’ if Cust_Phone_Service_Provider is AIRTEL, ‘5’ if Cust_Phone_Service_Provider is TATA and nothing as default. [4]

(b) Write a PL/SQL code to modify all the CUST_PHONE numbers by removing ‘2’ if it starts with ‘2’. [2]

(c) Write PL/SQL code to create two Statement level Triggers TrigBeforeUpdateCustomer and TrigAfterUpdateCustomer before and after UPDATE statement respectively on the table Customer which signals ‘Starting Update’ to signify that modification of records has started and ‘End of Update’ message to signify that modification is over. [4]

2nd Pre Board Examination 2007-08

Class 12th - Informatics Practices

Marking Scheme

Q1.

(a) For right differences 1 mark

For suitable examples of each ½ mark

(b) For right definition 1 mark

For types i.e., Relational Data Model, Network Data Model, Hierarchical Data Model 1 mark

(c) 1 mark for each right definition

(d) 1 mark for right definition of Normalization

¾ marks for each normal form i.e., 1NF, 2NF, 3NF, BCNF

Q2.

(a) 1 mark for right definition of Error

1 mark for suitable difference

(b) 1 mark for each function

(c) 1 mark for converting non-MDI application to MDI application

1 mark for arranging the children, in MDI application.

(d) 1 mark for right answer of each term

Q3.

(a) 1 mark for suitable definition of PL/SQL

1 mark for advantages at least 2.

(b) 1 mark for right definition of Cursor.

1 mark for all steps [¼ for each i.e., declare, open, fetch, close cursor ]

(c) 1 mark for right definition.

1 mark for syntax or example, of how to declare anchored variable.

(d) 1 mark for definition.

1 mark for difference between each other

2 mark for syntax of both [1 mark for each syntax]

Q4.

(a) 1 mark for right code i.e.,

Adodc1.Recordset.MoveFirst

(b) 1 mark of right code for moving to previous record i.e.,

Adodc1.Recordset.MovePrevious

1 mark of right code for checking the BOF function i.e.,

If Adodc1.Recordset.BOF = True Then

Adodc1.Recordset.MoveLast

End If

(c) 1 mark of right code for moving on next record i.e.,

Adodc1.Recordset.MoveNext

1 mark of right code for checking EOF function i.e.,

If Adodc1.Recordset.EOF = True Then

Adodc1.Recordset.MoveFirst

End If

(d) 1 mark of right code for moving last record i.e.,

Adodc1.Recordset.MoveLast

(e) 2 mark of right code for adding a new record at last

Adodc1.Recordset.AddNew

(f) 1 mark of right code for deleting the record i.e.,

Adodc1.Recordset.Delete

1 mark of right code for moving the record to the previous record i.e.,

If Adodc1.Recordset.EOF = True Then

Adodc1.Recordset.MovePrevious

End If

Q5.

(i) 1 mark for examining each character, ½ mark for right logic of letter counting, ½ mark for digit counting, ½ mark for blank spaces counting, ½ mark for special characters, ½ mark for counting vowels and ½ mark for consonants counting.

(ii) ½ mark for function header & footer, ½ mark for declaring and assigning data types, ½ mark for loop statement, ½ mark for sum calculating.

(iii) ½ mark for after each loop iteration’s output(because it iterate 4 times)

(iv) 1 mark for finding all errors(i.e., UpTo, Display,loop).

1 mark for rewriting or underlining the correction made.

Q6.

(i)

Marketing

R & D

1 mark for each output

(ii) 50 90

40 70

30 50

20 30

10 10

2/5 mark for each row result

(iii)

DECLARE

n NUMBER(2);

i NUMBER(2);

s NUMBER(3);

m NUMBER(2);

j NUMBER(2);

BEGIN

m:=&Rows;

n:=&Colums;

i:=1;

<>

LOOP

j:=1;

<>

LOOP

s := i * j;

IF i = j THEN

DBMS_OUTPUT.PUT(0||' ');

ELSE

DBMS_OUTPUT.PUT(s||' ');

END IF;

j:=j+1;

EXIT INNER WHEN j>n;

END LOOP;

DBMS_OUTPUT.NEW_LINE;

i:=i+1;

EXIT OUTER WHEN i>m;

END LOOP;

END;

1 mark for variable declaration & initialization

1 mark for nested labelled loop

1 mark for displaying accurate output

Q6.

1 mark for right PL/SQL block

1 mark for checking the salary of particular employee is less than 15000 or not

1 mark for increment value or ‘no increment given’ message

Q7.

(a).

CREATE TABLE Customer (

Cust_ID NUMBER(7) PRIMARY KEY,

Cust_Name VARCHAR2 (30),

Cust_Add1 VARCHAR2 (20),

Cust_Add2 VARCHAR2 (30),

Pin_Code NUMBER (6),

Cust_Phone VARCHAR2 (10));

1 mark for right syntax and using constraint

1 mark for all variable, datatype and size.

(b)

BEGIN

UPDATE Customer Set Cust_Phone = ‘2’ || Cust_Phone WHERE Length(Cust_Phone) =7;

END;

½ mark for PL/SQL block

½ mark for SQL query

1 mark for using proper SQL functions.

(c)

BEGIN

UPDATE Customer Set Cust_Phone = SUBSTR (Cust_Phone, 2, LENGTH (Cust_Phone)-1) WHERE Cust_Phone Like ‘2%’;

END;

½ mark for PL/SQL block

½ mark for SQL query

1 mark for using proper functions and condition.

(d)

CREATE OR REPLACE TRIGGER TrigBeforeUpdateCustomer

BEFORE UPDATE ON CUSTOMER

BEGIN

DBMS_OUTPUT.PUT_LINE (‘Starting Update’);

END;

CREATE OR REPLACE TRIGGER TrigAfterUpdateCustomer

AFTER UPDATE ON CUSTOMER

BEGIN

DBMS_OUTPUT.PUT_LINE (‘End of Update’);

END;

1 mark for the right syntax of BEFORE UPDATE TRIGGER

1 mark for right logic of BEFORE UPDATE TRIGGER

1 mark for the right syntax of AFTER UPDATE TRIGGER

1 mark for right logic of AFTER UPDATE TRIGGER

2ND PRE BOARD EXAMINATION 2007-08

BLUE PRINT

CLASS XII – IP

Sr No.

Topic

VSA

(1 Marks)

SA - I

(2 Marks)

SA – II

(3 Marks)

LA

(4 Marks)

Total

1

Business Computing

--

2(3)

--

4(1)

10(4)

2

Programming in VB

1(2)

2(10)

--

4(2)

30(14)

3

RDBMS

--

2(8)

3(2)

4(2)

30(12)

Total

1(2) = 2

2(21) = 42

3(2) = 6

4(5) = 20

70(30)

 

iCBSE India