Professional Documents
Culture Documents
Instructions:
1. Submission date is on 18-04-2022 via IMAMU LMS Blackboard before 10 a.m.
2. Any attempt to cheat from any of your classmates or form the Internet the whole
assignment/project will be marked as Zero. Be aware that Blackboard uses
plagiarism check tool! (Read and sign Plagiarism Declaration)
3. There will be no extension in the submission deadline.
4. No hand writing is accepted.
5. Use this cover page.
Read and
Students accept
Students Names Mark out of 15
IDs (Plagiarism
Declaration)
Mohammed Fheed
440017803
Alhassan
Presentation 2
● Slides (CLO 3.2) 1
● Discussion (CLO 3.1) 1
Subtotal#2 2
8. Shipping – Used to store the shipment details of the order made by the
customer.
a. Attributes - shipping_id(PK), shipping_address, status, agent_id(FK),
order_id(FK)
Note: Normalization is not required to below diagram, since all the entities have
primary key which can be used to uniquely identify each row.
Explain where and how referential integrity constraints have been incorporated
Query implementations
▪ UPDATE user
SET address = ‘2985 Blue Ridge’
WHERE user_id = 3;
Before update
After update
Before update
Before delete
After delete
Before delete
After delete
o Retrieve all columns from cart where the number of products is more
than 3.
o Retrieve the user id, shipping address and status of orders which still in
'In progress'.
o Retrieve the products and feedbacks where the rating is less than 3
● 2 simple retrieval queries using group by, having clause, and aggregation
functions related to your tables
o Retrieve number of Orders with the average grand total more than 300.
▪ SELECT COUNT(order_id) AS 'Number Of Orders',
created_date AS 'Date'
FROM `order`
GROUP BY created_date
HAVING AVG(grand_total) > 300;
o View to display the product name, price and quantity which are above
price 200.