0% found this document useful (0 votes)
9 views

DBMS_Assignment_8

Uploaded by

karan20067852
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

DBMS_Assignment_8

Uploaded by

karan20067852
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

DEPARTMENT OF COMPUTER SCIENCE AND ARTIFICIAL INTELLIGENCE

SUBJECT : DBMS LAB ASSIGNMENT-8 Batch: II CSE – 7, 8&9

NAME : KARANRAJ
HT NO : 2203A51241
BATCH :07

Task 1:
Consider the following relations for an order processingdatabase
CUSTOMER (cust_num: int,cname: string. gender:string)

ORDER (order_num: int. odate: date. Cust_num: int, Ord_Amt: int)

ORDER_ITEM (order_num: int, item_num: int. qty: int)

ITEM (item_num: int,item_name: string,unit_price: int)

SHIPMENT (order_num: int. warehouse_num: int. ship_date: date)

WAREHOUSE (warehouse_num: int. city: string)


Create the above tables WITHOUT specifying the primary keys and foreign keys.
Enter at least five tuples for each relation and write SQL Queries for:
1.Display the list of items that are ordered by Sandeep

2. List the order Number for orders that were shipped from any warehouses that the company has in a
specific city.
3. Delete an item from the ITEM table with order number = 12
4. Update the price of all the items by15%.

5. Display customer name, Items ordered by him along with Item-number, order- number
6. Display the names of the customers who have a shipment on 12/06/2021

7. List the order number of the shipments that are happening from warehouse no-12

8. List the names of the customers who ordered more than qty 10 of a particular item
9. Delete all the orders on 12/06/2021

10. Update the order amount of a customer called sandy to 10000

Task-2:
Consider the following database for a banking enterprise

BRANCH (branch-name:string, branch-city:string, assets:real)

ACCOUNT(accno:int, branch-name:string, balance:real)

DEPOSITOR(customer-name:string, accno:int)

CUSTOMER(loan-number:int, branch-name:string, amount:real)

BARROWER(customer-name:string, loan-number:int)
Create the above tables WITHOUT specifying the primary keys and foreign keys and enter at least five
tuples for each relation
1. Find all the customers who have at least two accounts at the main branch

2 .Find all the customers who have an account at all the branches located in a specific city

3 Display all the accounts in a specific branch along with Customer details.

4 Display the loan details of a specific customer.


5 Display the names of the customers who borrowed a loan of minimum 10000

You might also like