Our Services

Get 15% Discount on your First Order

[rank_math_breadcrumb]

Adjust 244

Description

see

College of Computing and Informatics

Project
Deadline: Tuesday 04/22/2025@ 23:59
[Total Mark for this Project is 14]
Student Details:
Name:
Name:
Name:
Name:

ID:
ID:
ID:
ID:

Instructions:

• You must submit two separate copies (one Word file and one PDF file) using the
Assignment Template on Blackboard via the allocated folder. These files must not be in
compressed format.

• It is your responsibility to check and make sure that you have uploaded both the correct files.
• Zero mark will be given if you try to bypass the SafeAssign (e.g., misspell words, remove spaces
between words, hide characters, use different character sets, convert text into image or languages
other than English or any kind of manipulation).

• Email submission will not be accepted.
• You are advised to make your work clear and well-presented. This includes filling your information
on the cover page.

• You must use this template, failing which will result in zero mark.
• You MUST show all your work, and text must not be converted into an image, unless specified
otherwise by the question.

• Late submission will result in ZERO mark.
• The work should be your own, copying from students or other resources will result in ZERO mark.
Restricted – ‫مقيد‬

Project Instructions
• You can work on this project as a group (minimum 3 and maximum 4 students).
Only the group leader must submit the project with all group member names.

• This project worth 14 marks and will be distributed as in the following:
a) Identify the entity types, attributes, keys.
b) Identify relationships and cardinalities.
c) Draw the ERD.
d) Schemas before Normalization.
e) Schemas after Normalization.
f) Create the tables.
g) Populate your tables with at least 5 rows.
h) Execute the requested sample queries.

(2 marks)
(2 marks)
(2 marks)
(1.5 marks)
(1.5 marks)
(1.5 marks)
(1.5 marks)
(2 marks)

• Each group must submit one report about their chosen project via the Blackboard
(Email submission will not be accepted which will be awarded ZERO marks)

• Screenshots for answering SQL questions (f, g, and h).
• You are advised to make your work clear and well presented; marks may be reduced
for poor presentation. This includes filling your information on the cover page.

• You MUST show all your work, and text must not be converted into an image, unless
specified otherwise by the question.
A) Late submission will result in ZERO marks being awarded.
B) The work should be your own, copying from students or other resources will
result in ZERO marks.

Restricted – ‫مقيد‬

Learning
Outcome(s):

LO 4

Design a
database starting
from the
conceptual
design to the
implementation
of database
schemas.

LO 3

Create EntityRelationship
model, Relational
model, and write
SQL queries.

E-Commerce Inventory and Order Management System
Background: An emerging online retail company specializing in artisanal products
wants to develop a database system to manage its inventory, customer orders, and
shipping operations. The system should facilitate real-time inventory updates, order
processing, and customer management to enhance operational efficiency and customer
satisfaction.
Project Objective: Design and implement a database system for the e-commerce
platform that supports inventory tracking, order processing, and customer relationship
management. The system should be scalable, reliable, and secure, ensuring smooth
operations as the business grows.
Requirements:
1. Data Storage:
o Product information: Includes product ID, name, description, price, and
stock level.
o Customer information: Includes customer ID, name, contact details, and
order history.
o Orders: Details about customer orders, including order ID, product(s)
ordered, quantities, prices, and status.
o Shipping: Information on shipping logistics, such as tracking numbers,
shipping status, and delivery dates.

2. Project Deliverables:
o An Entity-Relationship (ER) diagram representing the database structure.
o A fully normalized database schema.
o Implementation of the database in a suitable DBMS.

By implementing a robust database system for the E-Commerce Inventory and Order,
the management can efficiently handle the operations from managing product inventory
to processing customer orders and handling shipping logistics.

Restricted – ‫مقيد‬

E-Commerce Inventory and Order Management System
a) Fill the table below with all the Entities based on the given requirements:

Restricted – ‫مقيد‬

Entity
Type

Attributes of the Entity

Key

Product

ProductID, Name, Description, Price,
StockLevel

ProductID

Customer

CustomerID, Name, ContactDetails

CustomerID

Order

OrderID, CustomerID, OrderDate, Status

OrderID

OrderDetail

OrderDetailID, OrderID, ProductID,
Quantity, Price

OrderDetailID

Shipping

ShippingID, OrderID, TrackingNumber,
ShippingStatus, DeliveryDate

ShippingID

b) Fill the table below with all the relationship types based on the given requirements.

Relationship
Type

Entity types
participating in
the relationship
type

Places

Customer to Order

One-to-Many
(1:N)
One-to-Many
(1:N)
Many-to-One
(N:1)
One-to-One
(1:1)

Relationship
attribute (if any)
OrderDate

References

Order to
OrderDetail
OrderDetail to
Product

Tracks

Order to Shipping

Updates

OrderDetail to
Product

Many-to-One
(N:1)

StockLevel
(decreases when
order is placed)

Has

Customer to Order

One-to-Many
(1:N)

None

Contains

Restricted – ‫مقيد‬

Cardinality

Quantity, Price
None
None

c) Draw the ER Diagram

Restricted – ‫مقيد‬

d) Schemas before the normalization
1. Unnormalized Product Table
CREATE TABLE UnnormalizedProduct (
ProductID INT PRIMARY KEY,
Name VARCHAR(255),
Description TEXT,
Price DECIMAL(10, 2),
StockLevel INT,
CustomerID INT,
CustomerName VARCHAR(255),
OrderID INT,
OrderDate DATETIME,
Quantity INT
);
2. Unnormalized Customer Table
CREATE TABLE UnnormalizedCustomer (
CustomerID INT PRIMARY KEY,
Name VARCHAR(255),
Email VARCHAR(255),
Phone VARCHAR(15),
Address TEXT,
OrderID INT,
ProductID INT,
ProductName VARCHAR(255),
Quantity INT,
TotalAmount DECIMAL(10, 2)
);
3. Unnormalized Order Table
CREATE TABLE UnnormalizedOrder (
OrderID INT PRIMARY KEY,

Restricted – ‫مقيد‬

CustomerID INT,
CustomerName VARCHAR(255),
OrderDate DATETIME,
ProductID INT,
ProductName VARCHAR(255),
Quantity INT,
Price DECIMAL(10, 2),
TotalAmount DECIMAL(10, 2),
ShippingID INT,
TrackingNumber VARCHAR(255),
ShippingDate DATETIME,
DeliveryDate DATETIME,
Status VARCHAR(50)
);

e) Schemas after the normalization
Product Table
CREATE TABLE Product (
ProductID INT PRIMARY KEY,
Name VARCHAR(255) NOT NULL,
Description TEXT,
Price DECIMAL(10, 2) NOT NULL,
StockLevel INT NOT NULL
);

Restricted – ‫مقيد‬

Customer Table
CREATE TABLE Customer (
CustomerID INT PRIMARY KEY,
Name VARCHAR(255) NOT NULL,
Email VARCHAR(255) UNIQUE NOT NULL,
Phone VARCHAR(15),
Address TEXT
);

Order Table
CREATE TABLE Order (
OrderID INT PRIMARY KEY,
CustomerID INT,
OrderDate DATETIME NOT NULL,
TotalAmount DECIMAL(10, 2) NOT NULL,
Status VARCHAR(50) NOT NULL,
FOREIGN KEY (CustomerID) REFERENCES Customer(CustomerID)
);

OrderItem Table
CREATE TABLE OrderItem (
OrderItemID INT PRIMARY KEY,
OrderID INT,
ProductID INT,
Quantity INT NOT NULL,
Price DECIMAL(10, 2) NOT NULL,

Restricted – ‫مقيد‬

FOREIGN KEY (OrderID) REFERENCES Order(OrderID),
FOREIGN KEY (ProductID) REFERENCES Product(ProductID)
);
Shipping Table
CREATE TABLE Shipping (
ShippingID INT PRIMARY KEY,
OrderID INT,
TrackingNumber VARCHAR(255) UNIQUE NOT NULL,
ShippingDate DATETIME,
DeliveryDate DATETIME,
Status VARCHAR(50) NOT NULL,
FOREIGN KEY (OrderID) REFERENCES Order(OrderID)
);
f) Create the normalized tables, write the necessary SQL statements to create the
tables.
— Create Product Table
CREATE TABLE Product (
ProductID INT PRIMARY KEY,
Name VARCHAR(255) NOT NULL,
Description TEXT,
Price DECIMAL(10, 2) NOT NULL,
StockLevel INT NOT NULL
);

— Create Customer Table
CREATE TABLE Customer (
CustomerID INT PRIMARY KEY,

Restricted – ‫مقيد‬

Name VARCHAR(255) NOT NULL,
Email VARCHAR(255) UNIQUE NOT NULL,
Phone VARCHAR(15),
Address TEXT
);

— Create Order Table
CREATE TABLE Order (
OrderID INT PRIMARY KEY,
CustomerID INT,
OrderDate DATETIME NOT NULL,
TotalAmount DECIMAL(10, 2) NOT NULL,
Status VARCHAR(50) NOT NULL,
FOREIGN KEY (CustomerID) REFERENCES Customer(CustomerID)
);

— Create OrderItem Table
CREATE TABLE OrderItem (
OrderItemID INT PRIMARY KEY,
OrderID INT,
ProductID INT,
Quantity INT NOT NULL,
Price DECIMAL(10, 2) NOT NULL,
FOREIGN KEY (OrderID) REFERENCES Order(OrderID),
FOREIGN KEY (ProductID) REFERENCES Product(ProductID)
);

Restricted – ‫مقيد‬

— Create Shipping Table
CREATE TABLE Shipping (
ShippingID INT PRIMARY KEY,
OrderID INT,
TrackingNumber VARCHAR(255) UNIQUE NOT NULL,
ShippingDate DATETIME,
DeliveryDate DATETIME,
Status VARCHAR(50) NOT NULL,
FOREIGN KEY (OrderID) REFERENCES Order(OrderID)
);
g) Insert at least five rows into each table.
— Insert into Product Table
INSERT INTO Product (ProductID, Name, Description, Price, StockLevel)
VALUES
(1, ‘Handmade Soap’, ‘Organic lavender soap’, 5.99, 100),
(2, ‘Wooden Bowl’, ‘Hand-carved wooden bowl’, 15.99, 50),
(3, ‘Wool Scarf’, ‘Soft wool scarf in red’, 25.99, 75),
(4, ‘Ceramic Mug’, ‘Hand-painted ceramic mug’, 12.99, 60),
(5, ‘Leather Journal’, ‘Hand-stitched leather journal’, 29.99, 40);

— Insert into Customer Table
INSERT INTO Customer (CustomerID, Name, Email, Phone, Address)
VALUES
(1, ‘John Buck’, ‘[email protected]’, ‘123-456-7890’, ‘123 Main St’),
(2, ‘Harry Brown’, ‘[email protected]’, ‘234-567-8901’, ‘456 Elm St’),
(3, ‘Alice Johnson’, ‘[email protected]’, ‘345-678-9012’, ‘789 Oak St’),
(4, ‘Bob Brown’, ‘[email protected]’, ‘456-789-0123’, ‘321 Pine St’),

Restricted – ‫مقيد‬

(5, ‘Charlie Davis’, ‘[email protected]’, ‘567-890-1234’, ‘654 Maple St’);

— Insert into Order Table
INSERT INTO Order (OrderID, CustomerID, OrderDate, TotalAmount, Status)
VALUES
(1, 1, ‘2023-10-01 10:00:00’, 11.98, ‘Pending’),
(2, 2, ‘2023-10-02 11:00:00’, 41.98, ‘Shipped’),
(3, 3, ‘2023-10-03 12:00:00’, 25.99, ‘Delivered’),
(4, 4, ‘2023-10-04 13:00:00’, 29.99, ‘Pending’),
(5, 5, ‘2023-10-05 14:00:00’, 15.99, ‘Shipped’);

— Insert into OrderItem Table
INSERT INTO OrderItem (OrderItemID, OrderID, ProductID, Quantity, Price)
VALUES
(1, 1, 1, 2, 5.99),
(2, 2, 3, 1, 25.99),
(3, 2, 4, 1, 12.99),
(4, 3, 5, 1, 29.99),
(5, 4, 2, 1, 15.99);

— Insert into Shipping Table
INSERT INTO Shipping (ShippingID, OrderID, TrackingNumber, ShippingDate,
DeliveryDate, Status)
VALUES
(1, 2, ‘ABC123’, ‘2023-10-02 12:00:00’, ‘2023-10-07 12:00:00’, ‘Delivered’),
(2, 5, ‘DEF456’, ‘2023-10-05 15:00:00’, ‘2023-10-10 15:00:00’, ‘In Transit’),
(3, 3, ‘GHI789’, ‘2023-10-03 13:00:00’, ‘2023-10-08 13:00:00’, ‘Delivered’),

Restricted – ‫مقيد‬

(4, 4, ‘JKL012’, ‘2023-10-04 14:00:00’, ‘2023-10-09 14:00:00’, ‘In Transit’),
(5, 1, ‘MNO345’, ‘2023-10-01 11:00:00’, ‘2023-10-06 11:00:00’, ‘Pending’);
h) Write SQL queries to find the following:
1. List all products currently out of stock to check for products that need
restocking, helping manage inventory efficiently.
SELECT ProductID, Name, Description, Price
FROM Product
WHERE StockLevel = 0;
2. Find total sales per product to help analyze which products are generating
the most revenue, aiding in strategic business decisions.
SELECT
p.ProductID,
p.Name,
SUM(oi.Quantity * oi.Price) AS TotalSales
FROM
Product p
JOIN
OrderItem oi ON p.ProductID = oi.ProductID
GROUP BY
p.ProductID, p.Name
ORDER BY
TotalSales DESC;
3. Identify orders that are delayed to proactively address delays and
communicate with affected customers.
SELECT
o.OrderID,
o.CustomerID,
o.OrderDate,

Restricted – ‫مقيد‬

s.DeliveryDate,
s.Status
FROM
Order o
JOIN
Shipping s ON o.OrderID = s.OrderID
WHERE
s.DeliveryDate 3;
5. Calculate Inventory Value to provide the total value of all items currently
in stock, this is crucial for financial reporting and inventory management.
SELECT
SUM(StockLevel * Price) AS TotalInventoryValue

Restricted – ‫مقيد‬

FROM
Product;
6. Show Detailed Information for all orders placed today to provide a
snapshot of the day’s business activities.
SELECT
o.OrderID,
o.CustomerID,
c.Name AS CustomerName,
o.OrderDate,
o.TotalAmount,
o.Status,
s.TrackingNumber,
s.ShippingDate,
s.DeliveryDate
FROM
Order o
JOIN
Customer c ON o.CustomerID = c.CustomerID
LEFT JOIN
Shipping s ON o.OrderID = s.OrderID
WHERE
DATE(o.OrderDate) = CURDATE();

Restricted – ‫مقيد‬

Purchase answer to see full
attachment

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Marketing Question

Description Based on the assignment I completed previously. This assignment must be completed using the same scenario. The previous assignment is attached for support in your solution. 640 File The assignment you are required to complete is attached. Required File Summary of the Text and Chosen Scenario before: You’ve selected

Management Question

Description • The Assignment must be submitted on Blackboard (WORD format only) via allocated folder. • Assignments submitted through email will not be accepted. • Students are advised to make their work clear and well presented, marks may be reduced for poor presentation. This includes filling your information on the

Accounting Question

Description Students are advised to make their work clear and well presented, marks may be reduced for poor presentation. This includes filling your information on the cover page. Students must mention question number clearly in their answer. Late submission will NOT be accepted. Avoid plagiarism, the work should be in

Fundamentals of Database IT-403

Description Fundamentals of Database IT-403 fille attached College of Computing and Informatics Assignment 2 Deadline: 16/04/2025 @ 23:59 [Total Mark for this Assignment is 8] Student Details: Name: ### ID: ### CRN: ### Instructions: • You must submit two separate copies (one Word file and one PDF file) using the

Accounting Question

Description College of Administration and Finance Sciences Assignment (2) Deadline: Saturday 19/04/2025 @ 23:59 Course Name: Cost Accounting Student’s Name: Course Code: ACCT 301 Student’s ID Number: Semester: Second CRN: Academic Year: 1446 H (2024-25) For Instructor’s Use only Instructor’s Name: Rabab Farrash Students’ Grade: /15 Level of Marks: High/Middle/Low

Management Question

Description Academic Report Guideline(Co-op) (please do not include this text in the final report, just follow its guidelines and use the cover page above) The report should be submitted within two weeks after you finish your Co-op training Program. In addition, the report should be approximately 3000 – 4000, single

314 ass 55

Description see College of Health Sciences Department of Public Health ASSIGNMENT [1] COVER SHEET Course name: Society and drugs Course Code: PHC314 CRN: Assignment title or task: (You can write a question) Explain how drugs of abuse act as positive reinforces? Choose any commonly abused drug in KSA and explain

314 ass 56

Description see College of Health Sciences Department of Public Health ASSIGNMENT [1] COVER SHEET Course name: Society and drugs Course Code: PHC314 CRN: Assignment title or task: (You can write a question) Explain how drugs of abuse act as positive reinforces? Choose any commonly abused drug in KSA and explain

Computer Science Question

Description see College of Computing and Informatics Assignment 2 Deadline: 16/04/2025 @ 23:59 [Total Mark for this Assignment is 8] Student Details: Name: ### ID: ### CRN: ### Instructions: • You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard via

Computer Science Question

Description see College of Computing and Informatics Assignment 2 Deadline: Day 15/4/2025 @ 23:59 [Total Mark for this Assignment is 8] Student Details: Name: ID: CRN: Instructions: • You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard via the allocated

LAW 401 – Discussion 2

Description Avoid Plagiarism Do not use Chat GPT and others, use your own word please. What kind of relationships are fiduciary trust relationships? Please answer in 2-3 sentences. Purchase answer to see full attachment

MGT – 322

Description Make sure to avoid plagiarism as much as possible . -Use font Times New Roman , 12 font sizes. -Use 1.5 line spacing with adjust to all paragraphs ( alignment ) . -Use the footer function to insert page number. -Ensure that you follow the APA style in your

It403 – Fundamental of databases

Description Hello I need help with my assignment I need word file and pdf file You can find the information and the instructions in the attached file College of Computing and Informatics Assignment 2 Deadline: 16/04/2025 @ 23:59 [Total Mark for this Assignment is 8] Student Details: Name: ### ID:

MGT-322: Logistics Management

Description What do you think about lean thinking? What is the reason behind the adoption of Lean Thinking by manufacturing companies? (2 Marks) Give a brief explanation of the main waste categories that businesses need to consider while manufacturing. (2 Marks) What are the benefits from Suppliers to end users

it 405 solve

Description You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard via the allocated folder. These files must not be in compressed format. It is your responsibility to check and make sure that you have uploaded both the correct files. Zero

506 m12 solve waleed

Description Critical Thinking Assignment (110 points) Using the Clinical Trial on breast cancer dataset. Perform a Kaplan-Meier Analysis or the Log-Rank Test to determine the survival curve for the breast cancer survivors. H0 The risk of 50% of the participants dying from breast cancer will occur within five years. (Null

506 m12 faisal

Description Critical Thinking Assignment (110 points) Using the Clinical Trial on breast cancer dataset. Perform a Kaplan-Meier Analysis or the Log-Rank Test to determine the survival curve for the breast cancer survivors. H0 The risk of 50% of the participants dying from breast cancer will occur within five years. (Null