Professional Documents
Culture Documents
1622 Asm1
1622 Asm1
1622 Asm1
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.
Grading grid
P1 M1 D1
❒ Summative Feedback: ❒ Resubmission Feedback:
A company called FPT Shop, which is expanding and facing difficulties in managing the database from all its stores across the
country. To address this issue, FPT Shop has decided to develop a new database system that can allow users to register with their
phone numbers as IDs, order or rate products, and leave comments about their purchases. The system should also enable shop
managers to take care of their stores and enable the director board to view all data from all shops.
As an IT professional, your tasks are to work with FPT Shop to identify the current requirements for each system, analyze the
requirements, and produce clear statements of user and system requirements. Based on the analysis, you will design a relational
database system using appropriate design tools and techniques. Then, you will develop a fully functional relational database system,
test it against user and system requirements, and produce technical and user documentation. The ultimate goal is to provide a reliable
and efficient database system that can help FPT Shop manage its stores and enhance the user experience for its customers.
The user can place an order or rate products: Customers can order products and rate them based on their satisfaction level.
The user can leave feedback about their purchase transaction: Customers can provide feedback about their purchase transaction by
leaving a review or rating.
The system should allow store managers to manage their store: The system should provide store managers with the ability to manage
their store, including product inventory, order processing, and customer information.
The system should allow the director to view all data from all stores: The system should allow the director to access and view data
from all stores, through the store managers.
The director requires a system capable of managing product information, customer orders, and detailed customer information: The
system should provide the director, through the manager, with a comprehensive view of the inventory of products, customer orders,
and detailed customer information. Additionally, the system should allow the director to view manager information, add other
managers, or also dismiss, remove incompetent managers.
The system must allow for adding, modifying, and deleting product information: Store managers can add, modify, and delete product
information, including name and availability status.
The system should provide the ability to display inventory status: The system should allow users to view the current number of
products available in stock.
The system should allow for tracking of sold products and related profits: The system should provide a dashboard for tracking the
number of products sold and related profits.
Overall, the system needs to provide a comprehensive solution to help FPT Shop manage its stores and improve the customer
experience. The database system must be capable of handling a large amount of data and easily scalable to accommodate future
growth. The system must also be reliable, secure, and efficient, providing fast and accurate data access for users at all levels.
- Director: This entity represents a director and has attributes like Director_ID, Name, and Description. A Director entity can
be associated with multiple Manager entities, but each Manager entity can be associated with only one Director entity. For
example, the director can manage the manager's information including product information and customer orders, even
customer information and their feedback. This represents a one-to-many relationship between the Director and Manager
entities.
- Manager: This entity represents the manager and has properties like Manager_ID, FirstName, LastName, Phone, Mail, and
Director_ID. A manager reports to a director, and a director can have multiple managers working under them. A Manager
entity can manage customer orders, customer information and their feedback. This also represents a one-to-many relationship
between the Manager and Order entities.
- Order: This entity represents an order and has properties like Order_ID, OrderDate, TotalAmount, and Manager_ID. An
order is created by a manager and a manager can create multiple orders. An order can contain multiple products. The Order
entity can contain multiple orderItem entities, but each orderItem entity can only be associated with one Order entity, in
addition an order can have multiple feedbacks, but each feedback can only comment one order . This represents a one-to-many
relationship between the Order and Product, order, and feedback entities.
- Product: This entity represents a product and has attributes like Product_ID, Name, Description, Price, In-stock Quantity, and
Order_ID. A product is part of an orderItem and an OrderItem can contain multiple products.
- Customer: This entity represents a customer and has properties like Client_ID, FirstName, LastName, Phone, Mail, and
Order_ID. One customer places an order and one order can be placed by one customer. A Customer entity can order multiple
Order entities, but each Order entity can only be associated with one Customer entity, and a client can have multiple feedbacks
but each feedback can only have 1 client . This represents a one-to-many relationship between the Customer and Order,
customer, and feedback entities.
- Feedback: This entity represents a feedback and has properties like Feedback_ID, comment,Order_ID, Clent_ID. A feedback
can only be replied by one customer and a customer can respond to many feedbacks. In addition, Order can manage the
feedback left by any customer. This represents a one-to-many relationship between Feedback and Client, Order and feedback
entities
2.2 Normalization of the database
My database was not in first normal form (1NF) because some tables contain duplicate fields and did not have a unique primary key to
identify unique records. Therefore, I have performed the task of data normalization to minimize data redundancy, avoid data loss or
duplication issues, and improve data input speed.
First normal form (1NF):
Director: Director_ID (primary key), Name,Phone, Mail, Description
Manager: Manager_ID (primary key), FirstName, LastName, Phone, Mail, Director_ID
Order: Order_ID (primary key), OrderDate,ShippedDate, TotalAmount, Manager_ID
Products: Product_ID (primary key), Name, Description, Price, QuantityInStock
Client: Client_ID (primary key), FirstName, LastName, Phone, Mail
In 1NF, I have separated the tables so that there are no duplicate fields, and each table has a unique primary key to identify unique
records.
Feedback: Feedback_IDprimary key), comment, Order_ID, Client_ID
Second normal form (2NF):
Director: Director_ID (primary key), Name, Description
Manager: Manager_ID (primary key), FirstName, LastName, Phone, Mail, Director_ID (foreign key)
Order: Order_ID (primary key), OrderDate, TotalAmount, Manager_ID (foreign key), Client_ID (foreign key)
Products: Product_ID (primary key), Name, Description, Price
OrderItem: Order_ID (foreign key), Product_ID (foreign key), Quantity
Client: Client_ID (primary key), FirstName, LastName, Phone, Mail
Feedback: Feedback_IDprimary key), comment, Order_ID, Client_ID
In 2NF, I have separated the Products table to create a separate table for product information, and split the Order table into two
separate tables to store information about orders and details of each order item. I have also split the foreign key Manager_ID in the
Order table into a separate table called Manager to store detailed information about each manager. Additionally, I have split the Client
and Order tables into a separate Order table to store information about each customer's orders.
Here is the normalized diagram: