DBMS Pratical Questions
DBMS Pratical Questions
29. Create the Company database with the following tables and do the following:
Administration(employee_salary, development _cost, fund_amount, turn_over,bonus)
Emp_details (emp_no, emp_name, DOB, address, doj, mobile_no, dept_no, salary).
i. Calculate the total and average salary amount of the employees of each department.
ii. Display total salary spent for employees.
i. Develop a PL/SQL function to display total fund amount spent by the administration
department .
30. Consider the following relational schema for a Loan database application:
Customer{Customer_id, Customer_name, Age, phone_no}
Loan{ Loan_id, Amount, Customer_id)}
i. Include the constraint on Loan_id that it starts with letter ‘L’.
ii. Display the list of the customer_ids and total Loan amount taken.
iii. Display the Customer_id and Customer_name who have taken less than two loans
iv.Write a PL/SQL program to print the details of the customer when customerid is given as input.