1 a). The marketing company wishes to computerize its operations by using the following tables.
TableName:ClientMaster(Client_no,Name,Address1,Address2,City,Pincode,state,Bal_Due),
Table Name: Product-Master(Product_no, Description, Profit_Percent, Unit_Measure, Qty_on_Hand, Sell_Price,
Cost_price).
TableName:Salesmanmaster(Salesman_no,Salesman_name,Address1,Address2,city,pincode,sate,sal_amt).
Table Name: SALES_ORDER(Order_no,Client_no,Order_Date,Delay_Address,sales_man_no,
Dely_type,Bill_yn,delay_Date,order,Status).
Table Name: SALES_ORDER_DETAILS(order_no,product_no,Qty_Ordered,Qty_Disp,Product_Rate)
Solve the following queries by using the above tables.
1. Retrieve the list of names, city, and the state of all the clients.
2. List all the clients who are located in ‘Mumbai’ or ‘Bangalore’.
3. List the various products available from the product_master table.
4. Find the names of salesmen who have salary equal toRs.3000.
5. List the name so fall client shaving ‘a’ as the second letter in their names.
1 b). The HRD manager has decided to raise the employee salary by 15% write a PL/SQL block to accept the
employee number and update the salary of that employee. Display appropriate messages based on the existence of
the record in the Emp table.
2 a). A manufacturing company deals with various parts and various suppliers supplythese parts. It consists of three
tables to record its entire information. Those are as follows.
Supplier (Supplier_No, Sname, City, status) Part(Part_no, pname, color, weight, city, cost) Shipment
(supplier No, Part_no, city) JX (project_no, project_name, city)
SPJX(Supplierno,part_no,project_no,city)
1. Get supplier numbers and status for suppliers in Chennai with status>20.
2. Get project names for projects supplied by supplier ’S’.
3. Get colors of parts supplied by supplier S’.
4. Get part numbers for parts supplied to any project in Mumbai.
5. Find the id’sof suppliers who supply are do rpink parts.
2 b). Write a PL/SQL program to check the given string is palindrome ornot.
3 a). An enterprise wishes to maintain a database to automate its operations. Enterprise is divided into certain departments
and each department consists of employees. The following two tables describe the automation schemas.
Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) Dept(Deptno,
Dname, Loc)
1. List the details of employees who have joined before the end of September’ 81.
2. List the name of the employee and designation of the employee, who does not report to
anybody.
3. List the name, salary and PF amount of all the employees(PF is calculated as10%ofsalary)
4. List the names of employees who are more than 2yearsold in the organization.
5. Determine the number of employees, who are taking commission.
3 b) . Write a PL/SQL program generate n terms of Fibonacci series