CS3481 Set 2
CS3481 Set 2
a) Retrieve details of all books in the Book_id, title, name of publisher, authors
b) Get the particulars of borrowers who have borrowed more than 3 books, but from Jan
2017 to Jun2017.
c) Delete a book in BOOK table. Update the contents of other tables to reflect this data
Manipulation operations.
d) Create a view of all books and its number of copies that are currently available in the
Library.
e) Write a Pl/SQL procedure to display the book details of particular author.
Page 1 of 5
4. Consider the following tables namely “DEPARTMENTS” and “EMPLOYEES” Departments (dept
_no , dept_ name , dept_location ),
Employees ( emp_id , emp_name , emp_salary,dept_no).
a) Develop a query to grant some privileges of employees table into departments table
b) Develop a query to revoke all privileges of employees table from departments table
c) Develop a query to revoke some privileges of employees table from departments table
d) Write a query to implement the save point.
e) Demonstrate the user defined procedure for the above employee database
Page 2 of 5
7. Consider the schema for College Database:
STUDENT (RegNo, StudName, Address, Phone, Gender) SUBJECT
(Subcode, Title, Sem, Credits)
MARKS (RegNo, Subcode, Test1, Test2, Test3, Finalmark)
a) Compute the total number of male and female students in each semester and in each
section.
b) Calculate the Finalmark (average of best two test marks) and update the
corresponding table for all students.
c) Categorize students based on the following criterion:
If Finalmark = 81 to 100 then CAT = ‘Outstanding’
If Finalmark = 51 to 80 then CAT = ‘Average’
If Finalmark < 51 then CAT = ‘Weak
d) Create a view of Test3 marks of particular student in all subjects.
e) Demonstrate the procedure for the above Database.
10. Create the tables CUSTOMER (C_ID, Name, Address, City, Mobile_No) and
ORDER (C_ID, P_ID, P_Name, P_COST),
a) List the names and addresses of all the customers who have ordered products of costmore
than 500.
b) List the names of all the products ordered whose cost is 1,000 or more.
c) List the product names which are ordered by customers of "City = Delhi".
d) Add column "Email_id" in the CUSTOMER table.
e) Demonstrate the user defined function for the above tables.
Page 3 of 5
11. Create the tables SALESMAN (Salesman_id, Name, City, Commission),
CUSTOMER (Customer_id, Cust_Name, City, Grade,Salesman_id),
ORDERS (Ord_No, Purchase_Amt, Ord_Date, Customer_id, Salesman_id)
a) Find the name and numbers of all salesmen who had more than one customer.
b) List all salesmen and indicate those who have and don’t have customers in
their cities (Use UNION operation.)
c) Create a view that finds the salesman who has the customer with the highest order of a day.
d) Perform the DELETE operation by removing salesman with id 1000. All his
orders must also be deleted.
e) Demonstrate the Triggers for the above table.
12. Develop a simple GUI based Inventory Management for a EMart Grocery Shop
database application and incorporate all the Database features.
13. Create an XML database for the student profile and validate it using XML schema.
14. Develop a simple GUI based Cop Friendly App – Eseva database application and incorporate all the
Database features.
15. Create a Employee database and write SQL Triggers for insert, delete, and update operations
in a database table.
a) Write sql query to display Suplier numbers and Supplier names whose name starts with ‘S’
b) Write sql query to add a new column called CONTACTNO.
c) Write sql query to display supplier numbers, Suplier names and item price for suppliers in
Chennai in the ascending order of item price.
d) Create a view on the table which displays only supplier numbers and supplier names.
e) Demonstrate the procedure for the supplier table.
17. Develop a simple GUI based Banking System and incorporate all the Database features.
Page 4 of 5
18. Develop a simple GUI based Employee Pay Roll System and incorporate all the Database features.
19. Develop a simple GUI based Movie Ticket Reservation System and incorporate all the Database
features.
20. Develop a simple GUI based Super Market Stock Maintenance System and incorporate all the
Database features.
Page 5 of 5