Professional Documents
Culture Documents
Nguyen Huu Hoang Khanh (FGW DN)_619358_0
Nguyen Huu Hoang Khanh (FGW DN)_619358_0
Unit number and title Unit 04: Database Design & Development
Student declaration
I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that
making a false declaration is a form of malpractice.
Student’s signature
Grading grid
P2 P3 P4 P5 M2 M3 M4 M5 D2 D3
❒ Summative Feedback: ❒ Resubmission Feedback:
Figure 1 ERD
2. Mock-up of the application
Role
Figure 2 Role
Staff role
Staff members have the right to access their own information. They can view, add, edit, and delete products. They also have the ability
to access customer information and view the data and statistics.
Customer role
Customers can view their personal information and check their orders.
Director role
The director has the ability to access their own information, information of managers, store sales, and view the data and statistics.
Customer Homepage
Above is the interface that when customers log in to the website, there is a shopping cart in the corner, search engine, As well as being
able to view all products at the store
Manager Homepage
Below is the interface that when the manager logs in to the website, the toolbar to be able to edit product information, product
categories, edit customer information.
Below is the interface that when the director logs in to the website, the toolbar to be able to edit manager information, store revenue,
Data sheets and product development statistics.
A sample customer list table is provided below, it may be updated to add or remove clients.
A sample staff list table that may be modified, with staff members added or removed, is shown below.
A sample director list table that can have manages added, removed, or changed is shown below.
A sample manage list table that can have manages added, removed, or changed is shown below.
An editable, addable, and delete able simulated products list table is shown below.
A table with product details to add to the product list is provided below.
To edit products in the list, amend the table below with their details.
Below is the cart page, which will display the information of the selected products, the entry price with a checkout button for payment
Figure 16 Cart
CHAPTER 2 – PRODUCES QUERIES:
After creating DB of FPTstore, we will get 1 DB of FPTshop as follows
Following this is the instruction for table creation. Subsequently, I will generate tables such as Customer, Staff, Manager, Product,
Order, and OrderDetail.
Figure 18 Create Table 1
Figure 19 Create Table 2
For the insert statement in turn the tables I will have the result after inserting the tables as follows.
Create customers:
Figure 20 Insert customer
Create Staff:
Create Manager:
Figure 22 Insert Manager
Create Products:
Create Order:
Figure 24 Insert Order
Create Director:
Figure 26 Insert Director
Update
The update statement is applied to the Product table's row with ProductID P10 , allowing me to alter the product's name to Washing
Machine, as well as its price and quantity.
Figure 28 Update
Delete
The delete statement is applied to the Product table's row with ProductID, which is P5, next. When I remove, the outcomes are shown
below.
Figure 29 Delete
Having
The HAVING statement is applied in the Product table, instead of displaying all the columns and products, I use this command to
filter out a column with the product name and quantity and also assign the condition to only display the products. products with
quantity less than 100
Figure 30 Having
Between
The BETWEEN statement is applied to the Product table, instead of displaying all the columns and products, I use this command to
filter out 2 columns with the name and price in the range I search, here it is between 50 and 100
Figure 31 Between
Min
Figure 32 Min
The MIN statement is utilized in the Product table to show the product with the minimum quantity.
Max
Figure 33 Max
The MAX statement is used in the Product table to showcase the product with the highest quantity.
Sum
Figure 34 Sum
The SUM statement is employed in the Product table to exhibit the overall quantity of remaining products in the store.
Avg
Figure 35 Avg
The AVG statement is utilized in the Product table to present the average price of the products sold in the store.
Join
Finally, I want to query data from customer and customer table, I use Join statement:
Figure 36 Join
CHAPTER 3 – TEST THE SYSTEM:
I. Flow chart
Figure 37 Flowchart
II. User instructions
To access the FPT shop website, you must first choose a role. For customers, click on "Customer" and then press "Sign In" to access.
Upon entering the website, the HomePage will appear, featuring a Role button in the right corner. Clicking on this button allows you to
view your information and the history of purchased and borrowed products.
Additionally, the main page includes a search bar for customers to find specific product types. A navigation bar below offers options to
explore all products, product categories, and new arrivals. The product selection is diverse, providing ample choices for customers.
Underneath product photos, you'll find product names for easy identification. To view product details, click on the respective product
name.
While checking product details, customers can choose the desired quantity and design. The interface is user-friendly. If a customer
wishes to purchase a product, clicking the "Add to Cart" button will automatically add the selected item to the cart.
On the cart page, customers can review selected products, along with their parameters and models. The total number of selected products
and the price of each item are displayed. Customers can choose a payment method and proceed to checkout.
When logging in with the role as "Staff", click on "Staff" and then press "Sign In" to access. After accessing the website, the "Staff"
page will appear, and there will be 4 sections for "Staff" to choose from: "My information", "CRUD information of Product", "Customer
information", "Viewdata".
When logging in as a "Manager", click on "Manager" and then hit "Sign In" to gain access. Upon entering the website, the "Manager
Homepage" will be visible, featuring a toolbar containing four options for the manager to select from. By clicking on the "Category"
button, the manager will be directed to a page where they can view, modify, add, or delete existing categories. Similarly, selecting the
"Products" button will lead to a page displaying comprehensive product information, including images, names, prices, and quantities,
allowing the manager to edit, add, or remove products. Choosing "Customer Information" will present basic details of registered
customers, enabling the manager to add new customers, edit their information, or deactivate customer accounts.
When logging in as a "Director", click on "Director" and then hit "Sign In" to access the platform. Upon entering, the "Director
Homepage" will be displayed, containing a toolbar with options for the "Director" to choose from. Selecting "Store Sales" will bring up
a page showing transaction details, including orders, customer information, and sold product details, all available for the "Director" to
review. Opting for "Manage" will lead to a page displaying information about both staff and managers, where the director can add, edit,
or remove staff and manager entries. Clicking on "Data and Statistics" will provide insights into inventory levels, sales data, and other
relevant information crucial for product development.
IV. Conclusion
I have completed all the assigned tasks for this report, which involved creating project mockups, establishing a new database,
generating tables, inputting data into tables, modifying and deleting data, as well as conducting data queries. I have integrated and
represented the user manual and the system test table in a flowchart, following the steps provided in the prior exercise.