Uploaded by gixaxo9564

Practical List ADBMS

advertisement
Practical List
U14A2ADS - ADVANCE DATABASE MANAGEMENT SYSTEM
1.
2.
3.
4.
5.
6.
7.
Write a PL/SQL Block to print the Personal Detail.
Write a PL/SQL Block to find the sum of two numbers.
Write a PL/SQL Block to find weather given number is odd or even.
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 n numbers.
Write a PL/SQL Block to find the sum of first 100 odd & even numbers.
Write a PL/SQL Block to print the following Pattern.
*****
***
*
***
*****
8. Write a PL/SQL Block to display the Information of given student using following table.
Stud(sno,sname,address,city,pincode,contact_no)
9. Write a PL/SQL Block for Preparing a Net Salary of given Employee on following table.
a. Employee (eno,ename,address,city,dept) Primary key on eno field.
b. Salary (eno,basic,da,hra,it) foreign key on eno field.
c. Net_salary (eno,total_allowance,total_deduction,netpay) foreign key on eno field.
Notes:
10.
11.
12.
13.
14.
15.
 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
Write a PL/SQL Block to raise the salary by 20% of given Employee using following table.
Emp_salary (eno,ename,city,salary)
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.
Employee (eno,ename,address,city,dept)
Write a cursor to display the first five records of student table.
Stud(sno,sname,address,city,pincode,contact_no)
Write a 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)
Write a cursor to display the employee number,name,department and salary of employee
getting the highest salary.
a. Emp2 (eno,ename,dept,address,city)
b. Salary2(eno,salary)
Write a cursor for loop which increase the rating of customers by 200 for those customers
who are coming from surat.
Customers (cno,cname,city,rating)
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
Write a function to check whether the given number is prime or not.
Write a function to find the sum of digits of accepted no.
Write a function to display first 25 Fibonacci nos.
Write a function to display the reverse string of a given string.
Write a function that take Employee Number and return the salary using following table.
Emps (eno,ename,city,salary)
Write a function to count the total number of student having grade ‘PASS’ using following
table.
Student(sno,sname,grade)
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’
Write a Procedure to check the given year is leap or not.
Write a procedure to display the following type of Multiplication table as per given number.
5*1=5
5 * 2 = 10
5 * 3 = 15
“ “ “
“ “ “
5 * 10= 50
Write a Procedure to display this kind of output on screen.
1
01
101
0101
10101
Write a procedure to convert given octal number to decimal number.
Write a procedure that take Employee number and return all the information related to the
employee . Display the following format using table Emps(eno,ename,city,salary)
Create a package that check number is palindrome or not using oracle’s stored function.
Write a trigger on insert to convert the name into capital letters.
Write a trigger to check the marks is zero or negative.
Write a trigger that check the student_id must start with ‘S’.
Write a row trigger on the emp table that store the old records of emloyees into emp1 table
when updation is done by the user.
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.
Create a transparent audit system for a table cust_master. 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