This document provides instructions for an experiment involving set operations and views in SQL. It includes:
1) Writing queries to retrieve customer IDs based on whether they have deposits, loans, or both, and to retrieve customer IDs and names with the same criteria.
2) Writing queries to create views of customer names and account numbers, customer IDs and names based on deposits and loans, and a view using a join.
3) Testing insert, update, and delete operations on the views.
Original Description:
Original Title
BCSE302 -DBMS Lab-Exercise 7_SQL Set Operations and Views (1)
This document provides instructions for an experiment involving set operations and views in SQL. It includes:
1) Writing queries to retrieve customer IDs based on whether they have deposits, loans, or both, and to retrieve customer IDs and names with the same criteria.
2) Writing queries to create views of customer names and account numbers, customer IDs and names based on deposits and loans, and a view using a join.
3) Testing insert, update, and delete operations on the views.
This document provides instructions for an experiment involving set operations and views in SQL. It includes:
1) Writing queries to retrieve customer IDs based on whether they have deposits, loans, or both, and to retrieve customer IDs and names with the same criteria.
2) Writing queries to create views of customer names and account numbers, customer IDs and names based on deposits and loans, and a view using a join.
3) Testing insert, update, and delete operations on the views.
1. Insert appropriate number of rows/tuples (at least 5 rows) in these relations 2. Display CId of the customers those who have both deposit and loan 3. Display Cid of the customers those who have only deposit 4. Display Cid of the customers those who have only loan 5. Display Cid and Name of the customers those who have both deposit and loan 6. Display Cid and Name of the customers those who have only deposit 7. Display Cid and Name of the customers those who have only loan
2. Write the SQL Query to create view
1. Create a view called Vname that consists of all the customer’s name and account number 2. Create a view that consists of Cid and Name of the customers those who have both deposit and loan 3. Create a view that consists of Cid and Name of the customers those who have only deposit 4. Create a view that consists of Cid and Name of the customers those who have only loan 5. Check insert/update/delete operations with Vname view 6. Delete the view Vname 7. Check insert/update/delete operations with the views created by using set operations 8. Create a view using join operation 9. Check insert/update/delete operations with the views created by using join operation