You are on page 1of 4

1. a) Write a query of programmers who developed the application using C.

b) Write a PL/SQL program to generate a Fibonacci series.


c) Write a PL/SQL block using cursor to calculate the Bonus for the employees whose salary is less
than 10000. (EMPLOYEE table.)
d) Write a function, which will accept a number and check whether the number is prime or not.
e) Create a Form for the following relation using Oracle Form builder
Payroll (pno, pname, sex, age, experience, salary)
---------------------------------------------------------------------------------------------

2 . a)Decode the department fields in the ‘student’ table as follows:


CSE – Computer Science EEE – Electrical ECE – Electronics IT – Infotech
MECH – Mechanical
b)Write a PL/SQL program to print the factorial of a given number.
c) Write a Database trigger BEFORE DELETE FOR EACH ROW not allowing deletions and give
the appropriate message on the class table.
d) Write a procedure that will accept an integer and find out its factorial value
e) Create a Form for the following relation using Oracle Form builder
Bank (custid, custname, address, accno, balance )

3. a)Write a query that gives the total sales value of the software Institute wise.
b)Write a PL/SQL program to handle the zero divide error.
c) Write a PL/SQL block using cursors to read the percentage from the CLASS table and add the
appropriate data to the remark field. The conditions are:
a) percentage >= 75, remark = ‘distinction’
b) percentage >= 60 and <75, remark = ‘first class’
c) percentage >= 45 and <60, remark = ‘second class’
d) percentage < 45, remark = ‘fail’
d) Write function which will accept x,y and calculate xy
e) Draw a ER diagram for the following relations
Vehicle(vehicleno, vehiclename, wheelcount)
Heavymotor(Engineno,loadcapacity,permit, vehicleno)
Lightmotor(Engineno,speedlimit, vehicleno)

4. a)Write a query that gives the names of the programmers who have not developed any package.
b)Write a PL/SQL Block for handling the exceptions on ‘no data found’ as and
appropriately display the message.(Assume your own set of data).
c) Write a Database Trigger BEFORE INSERT/ UPDATE/DELETE FOR EACH
ROW not allowing any of these operations on the employee table on
Wednesdays and Thursdays.
d) Write a procedure that will accept an integer and print its Fibonacci series.
e) Create a Form for the following relation using Oracle Form builder
Library (accno, title, author, publication)
5. a)Write a query that shows all the female programmers studied in BDPS, who sold more than 10
copies of their packages.
b)Insert the values using PL/SQL block into a table.(Assume your own set of data).
c) Using Cursors update the EMPLOYEE table based on their grades.
a) if grade is ‘A’ then bonus = 15% of the salary
b) if grade is ‘B’ then bonus = 20% of the salary
c) if grade is ‘C’ then bonus = 25% of the salary
d) Write a function to find the topper from the STUDENT table.
e) Create a Form for the following relation using Oracle Form builder
Payroll (pno, pname, sex, age, experience, salary)

6. a)Using correlated query find the highest paid C programmer.


b)Write a PL/SQL block to count the number of rows whose salary is greater than
5000. (PROGRAMMER table).
c) Write a Database Trigger BEFORE DELETE FOR EACH ROW not allowing
deletions on Wednesdays and give the appropriate message STUDENT table.
d)Write a procedure to get a pattern of string as input and find whether the pattern
exists in the main string..
e) Create a Form for the following relation using Oracle Form builder
Bank (custid, custname, address, accno, balance )

7. a)Who is the highest paid COBOL female programmer?


b)Write a PL/SQL block to calculate the average marks of the student in marks1.
c) Write a PL/SQL block using cursor that will select those values from the STUDENT table where
dept= ‘CSE’ and calculate the total marks and print the same. If a value is not found then a message
should be displayed.
d) Write a function, which will accept a number and check whether the number is prime or not.
e) Draw a ER diagram for the following relations
Vehicle(vehicleno, vehiclename, wheelcount)
Heavymotor(Engineno,loadcapacity,permit, vehicleno)
Lightmotor(Engineno,speedlimit, vehicleno)

8. a)Which language listed in prof1 and prof2 has not been used to develop any package?
b)Write a PL/SQL block to compare 2 strings one declared as char and other
declared as varchar2.
c)Write a Database trigger BEFORE DELETE FOR EACH ROW not allowing
deletions and give the appropriate message on the class table.
d) Write a procedure that will accept an integer and find out its factorial value
e) Create a Form for the following relation using Oracle Form builder
Library (accno, title, author, publication)
9. a)Display the details of software developed in dbase by male programmers who belong to the
institute in which most number of programmers studied.
b) Write a PL/SQL program to generate a Fibonacci series.
c) Write a PL/SQL block using cursors to calculate the incentive (for a week) for the workers based
on their skill types.(Electrical, Plumbing – 50% of the average hourly rate, others 25%)
d) Write function which will accept x,y and calculate xy
e) Create a Form for the following relation using Oracle Form builder
Payroll (pno, pname, sex, age, experience, salary)

10. a)Display the details of the software that was developed in the language, which is neither the first,
nor the second proficiency of the programmer.
b) Write a PL/SQL program to print the factorial of a given number.
c) Write a Database Trigger BEFORE INSERT/ UPDATE/DELETE FOR EACH ROW not allowing
any of these operations on the employee table on Wednesdays and Thursdays.
d) Write a procedure that will accept an integer and print its Fibonacci series.
e) Create a Form for the following relation using Oracle Form builder
Bank (custid, custname, address, accno, balance )

11. a)Write a Query on the ‘software ’ that will find the highest copies sold in each language. Put the
output in this format. “ For the language (language) the Maximum no. of copies sold is :(max sold)”
b) Write a PL/SQL program to handle the zero divide error.
c) Write a PL/SQL program to calculate the Bonus for the employees whose salary is less than
10000. (EMPLOYEE table.)
d) Write a function to find the topper from the STUDENT table.
e) Consider a university database for the scheduling of classrooms for final exams. Draw an ER
diagram to represent the following:
i. exam(course name, section number, room number & time)
ii. Course ( name, department and c-number)
iii. Room (r-number, capacity and building)

12. a)Display each institute name with number of students.


b) Write a PL/SQL Block for handling the exceptions on ‘no data found’ as and appropriately display
the message.(Assume your own set of data).
c) Write a Database Trigger BEFORE DELETE FOR EACH ROW not allowing deletions on
Wednesdays and give the appropriate message STUDENT table.
d) Write a procedure to get a pattern of string as input and find whether the pattern exists in the main
string.
e) Create a Form for the following relation using Oracle Form builder
Library (accno, title, author, publication)
13. a)What are the languages known by the male programmers?
b) Insert the values using PL/SQL block into a table.(Assume your own set of data)
c) Write a PL/SQL block using cursors to read the percentage from the CLASS table and add the
appropriate data to the remark field. The conditions are:
a) percentage >= 75, remark = ‘distinction’
b) percentage >= 60 and <75, remark = ‘first class’
c) percentage >= 45 and <60, remark = ‘second class’
d) percentage < 45, remark = ‘fail’
d)Write a function, which will accept a number and check whether the number is prime or not.
e) Create a Form for the following relation using Oracle Form builder
Payroll (pno, pname, sex, age, experience, salary)

14. a)Print the names of the packages that are not developed in C or Pascal.
b) Write a PL/SQL block to count the number of rows whose salary is greater than 5000.
(PROGRAMMER table).
c) Write a Database trigger BEFORE DELETE FOR EACH ROW not allowing deletions
and give the appropriate message on the class table.
d) Write a procedure that will accept an integer and find out its factorial value
e) Create a Form for the following relation using Oracle Form builder
Bank (custid, custname, address, accno, balance )

15. a)Display the name, DOB and software developed by each programmer.
b) Write a PL/SQL block to calculate the average marks of the student in marks1.
c) Using Cursors update the EMPLOYEE table based on their grades.
a) if grade is ‘A’ then bonus = 15% of the salary
b) if grade is ‘B’ then bonus = 20% of the salary
c) if grade is ‘C’ then bonus = 25% of the salary
d) Write function which will accept x,y and calculate xy
e) Draw a ER diagram for the following relations
Vehicle(vehicleno, vehiclename, wheelcount)
Heavymotor(Engineno,loadcapacity,permit, vehicleno)
Lightmotor(Engineno,speedlimit, vehicleno)

16. a) List the programmers who celebrate their birthdays during current month.
b) Write a PL/SQL block to count the number of rows whose salary is greater than 5000.
c) Using Cursors update the EMPLOYEE table based on their grades.
if grade is ‘A’ then bonus = 15% of the salary
if grade is ‘B’ then bonus = 20% of the salary
if grade is ‘C’ then bonus = 25% of the salary
d) Write a function to find the topper from the STUDENT table.
Consider a university database for the scheduling of classrooms for final exams. Draw an ER
diagram to represent the following:
iv. exam(course name, section number, room number & time)
v. Course ( name, department and c-number)
vi. Room (r-number, capacity and building)

You might also like