Important Questions

CBSE Guess > Papers > Important Questions > Class XII > 2009 > Informatics Practices > Informatics Practices By Mr. venu gopal

CBSE CLASS XII

SECTION - A

Answer the following questions :

Q . 1. write a PL/SQL block to print a Pyramid as given

  1
     1 2
     1 2 3
     1 2  3  4
     1 2  3  4  5

Q . 2. Distinguish between numeric for loop and cursor for loop with example .

Q . 3. Distinguish between before and after  triggers with example .

Q . 4. explain in brief the types of cursors supported by pl/sql .

Q . 5. differentiate between grant and revoke commands  explaining the purpose of each .

Q . 6. explain the usage of bind variables in pl/sql with the help of example .

Q . 7. In a  pl/sql code, DBMS_output.put_line is used to display output but the output is not getting displayed on screen.what might have gone wrong ?

Q . 8. what is a view ? why does view not require any physical storage .

Q . 9. suggest parameter mode (IN/OUT/IN OUT) for the following ?

  1. parameter can be used as a normal variable.
  2. Passed value must not get changed.

Q . 10. what do you understand by term Self join ? give an example ?

SECTION - B

Answer the following questions :

Q . 11. find the output of the following code segment

     loop
                    dbms_output.put_line(i);
                     i:= i+1;
        end loop;

Q . 12. write an equivalent for loop for the following code and write its output 

sum :=0;                                                              
for j in 2..20
 loop
         sum:= sum + j;
 end loop;

Q . 13. what is the significance of a login.sql file ?

Q . 14. write a pl/sql script to obtain the name of a department whose number is 30 from dept   table. Display the department name on screen along with department number;

Q . 15. what are pl/sql cursor exceptions ?

Q . 16. discuss the role of the following :

  1. Commit 
  2. Rollback
  3. Commit work
  4. savepoint    with examples.

Q . 17. using paramaterized cursors write a piece of code that displays the name of employees of a department whose name is entered by the user . the data is to be displayed using

  1. simple loop 
  2. for loop

Section - C

Q . 18. Answer the questions based on the table student below

COLUMN NAME DATA TYPE SIZE DESCRIPTION CONSTRAINT
Rollno

Number

2

Students rollno

Primary key

Name

Varchar2

25

Name of the student

Not null

Class

Varchar2

3

Class of student

Stream

Varchar2

15

Stream opted by the student

Total marks

Number

8,2

Total marks scored by the student

Grade

Varchar2

1

Grade scored by the student

Can be ‘A’ or ‘B’ or ‘C’

  1. a.write sql command to display Roll numbers, names, Total marks grades of all the students In ‘non medical ‘ stream sorted by total marks in descending order.
  2. write sql command to create a view consisting of all students in ‘medical’stream
    And who have scored ‘A’ grade.
  3. write a pl/sql procedure that takes in Student’s Roll number as a parameter and increases
    Total marks of that student by 2% ( as he/she is a sports person)
  4. Create a Trigger to display the name and stream of student(s) whose record(s) are being
    Deleted from the student table.

Q . 19. Consider the following table :

EMPNO SALARY ENAME
1000 10400 jones
1001 11625 ramesh
1002 12700 ajay
1003 10195 adams
  1. Write a procedure raise_sal which increases the salary of an employee . It accepts an employee number and salary increase amount . it uses the employee number to find the current salary from the employee table and update the salary.
  2. write the sql command to display employee number and employee name from EMPLOYEE table.
  3. write a pl/sql block that determines the highest paid and lowest paid employee table and print their record on the screen .

Paper By Mr. venu gopal