Database Assignmnet
Database Assignmnet
Items
Warehouse
PK Item No
PK,FK1 Warehouse ID has / is of PK Warehouse ID
Customer_Items
PK,FK1 Item No
has / is of PK,FK1 Warehouse ID
Payment
PK,FK2 Customer ID
PK Payment ID
PK,FK1 Customer ID
Amount
has / is of Date
Payment Type
E-Recipt
PK Recipt ID has / is of
PK,FK1 Customer ID
Item Description
TABLE NAME key Fields Data type Validation Size Allow Null Deafault
Customer PK Customer ID INT NO
First Name VARCHAR 20 YES
Last Name VARCHAR 20 YES
Phone Number INT YES
Mail Address VARCHAR 30 YES
Address VARCHAR 20 YES
Date Of Birth DATETIME YES
Creating Tables
Cart table
Customer table
Customer_Delivery_Type
E- Receipt Table
Package Table
Payment Table
Warehouse Table
A)
i) Inner Join
Customer table
Cart table
Customer table
E_Recipt Table
Customer table
Delete Query 2
delete DeliveryPerson
where FirstName = 'shuaib'
Delete Query 3
delete Payment
where PaymentType = 'Credit Card'
C) Update Query 1
update Items
set Quintity= quintity*2
Update Query 2:
update Customer
set phonenumber=7689673
where LastName= 'Azmee'
Update Query 3:
Update Query 3:
update DeliveryPerson
set MailAddress = '[email protected]'
where LastName = 'Adam'
D) Insert Query 1
Insert Query 3