lab set original

Upload: padmavathi

Post on 30-May-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 Lab Set Original

    1/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 InfotechMECH 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 givethe appropriate message on the class table.d) Write a procedure that will accept an integer and find out its factorial valuee) 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 theappropriate data to the remark field. The conditions are:

    a) percentage >= 75, remark = distinction b) percentage >= 60 and = 45 and

  • 8/14/2019 Lab Set Original

    2/4

    5. a)Write a query that shows all the female programmers studied in BDPS, who sold more than 10copies 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 salaryc) 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. ( P ROGRAMMER 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 wheredept= CSE and calculate the total marks and print the same. If a value is not found then a messageshould 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 allowingdeletions and give the appropriate message on the class table.d) Write a procedure that will accept an integer and find out its factorial valuee) Create a Form for the following relation using Oracle Form builder

    Library (accno, title, author, publication)

  • 8/14/2019 Lab Set Original

    3/4

    9. a)Display the details of software developed in dbase by male programmers who belong to theinstitute 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 basedon their skill types.(Electrical, Plumbing 50% of the average hourly rate, others 25%)d) Write function which will accept x,y and calculate x y

    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 allowingany 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 than10000. ( 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 displaythe message.(Assume your own set of data).c) Write a Database Trigger BEFORE DELETE FOR EACH ROW not allowing deletions onWednesdays 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 mainstring.e) Create a Form for the following relation using Oracle Form builder

    Library (accno, title, author, publication)

  • 8/14/2019 Lab Set Original

    4/4

    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 theappropriate data to the remark field. The conditions are:

    a) percentage >= 75, remark = distinction b) percentage >= 60 and = 45 and