Uploaded by Fake book Ff

PRACTICAL LIST 1 U14A2ADS

advertisement
Department of Computer Science
B.Sc.(CA&IT) Semester-4
Practical List (For Unit-2 and Unit-3)
U14A2ADS : Advance Database Management System
1.
2.
3.
4.
Write a PL/SQL block to find the maximum number from given three numbers.
Write a PL/SQL block to find the sum of first 100 natural nos.
Write a PL/SQL block to find the sum of first 100 odd nos. and even nos.
Write a PL/SQL block to display the Information of given student using following table.
Stud (sno, sname, address, city)
5. Write a PL/SQL block for preparing a Net Salary of given employee using following table.
Emp (eno,ename, basic, da, hra, it)
Net_Salary (eno, total_allowance, total_deduction, netpay)
Notes : D.A. = 59% of basic , H.R.A. = 500, I.T. = 2% of basic
Total_Allowance = Basic + D.A. + H.R.A.,
Total_Deduction = I.T.
Netpay = Total_Allowance – Total_Deduction
6. Write a PL/SQL block to raise the salary by 20% of given employee using following table.
Emp_Salary (eno, ename, city, salary)
7. Write an Implicit Cursor to accept the employee number from the user. You have to delete this
record and display the appropriate message using following table.
Emp (eno, ename, address, city)
8. Write an Explicit Cursor to display students records for those who are coming from kherva
using following table. Student(sno, sname, address, city)
9. Write an Explicit Cursor to display employee’s information of finance department and Net
Pay is more than 10,000 using following table.
Empinfo (eno, ename, dept, basic, Netpay)
10. Write a Cursor to display the employee number, name, department and salary of an employee
getting the highest salary.
Emp2 (eno, ename, dept, addr, city)
Salary2 (eno, salary)
11. Write a Cursor For Loop which increase the rating of customers by 200 for those customers
who are coming from surat.
Customer(cnum,cname,city,rating)
12. Writes a Function to check whether the given number is prime or not.
13. Write a Function to find the sum of digits of accepted no.
14. Write a Function to display first 25 Fibonacci nos.
15. Write a Function to display the reverse string of a given string.
16. Write a Function that take Employee Number and returns the salary using following table.
Emps (eno, ename, city, salary)
17. Write a Function to count the total number of student having grade ‘PASS’ using following
table.
Student (sno, sname, grade)
18. Write a Function to assign the grade to all the student using following table.
Stud1 (sno, sname, sub1, sub2, sub3, grade)
Note : If percentage >= 70 then ‘Distinction’ else
If percentage >= 60 then ‘First’ else
If percentage >= 50 then ‘Second’
Otherwise ‘Fail’
19. Write a Procedure to check the given year is leap year or not.
20. Write a Procedure to display the following type of Multiplication Table as per given
number.
5*1 =5
5 * 2 = 10
” ” = ”
” ” = ”
5 * 10 = 50
21. Write a Procedure to display this kind of output on screen.
1
23
345
4567
56789
. . . . . . 90 91
22. Write a Procedure that take Employee Number and return all the information related to
that employee.
23. Create a package that check number is palindrome or not using oracle’s stored function.
24. Create a package that check number is palindrome or not using oracle’s stored function.
25. Write a Trigger on Insert to convert the name into capital letters.
26. Write a Trigger to check the marks is not zero or negative.
27. Write a Trigger that check the student_id must be start with ‘M’.
28. Write a row trigger on the emp table that store the old records of employees into emp1 table
when updation or deletion operation is done by the user.
29. Write a statement trigger on the emp table that store one message into message table when
updation or deletion operation is done by the user on emp table.
30. Create a transparent audit system for a table Cust_Mstr. The system must keep track of the
records that are being deleted or updated. The functionality being when a record is deleted or
modified the original record details and the date of operation are stored in the audit table, then
the delete or update operation is allowed to go through.
Download