


















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















































Qualification TEC Level 5 HND Diploma in Computing
Unit number and title Unit 04: Database Design & Development
Submission date Date Received 1st submission
Re-submission Date Date Received 2nd submission
Student Name Le Nguyen Quang Nam Student ID GCD
Class GCD0905 Assessor name Do Duy Thao
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 Le Nguyen Quang Nam
Grading grid
❒ Summative Feedback: ❒ Resubmission Feedback:
Grade: Assessor Signature: Date:
Signature & Date:
1.1 Introduction................................................................................................................................................ 44
1.2 User requirement........................................................................................................................................ 44
1.3 Diagram...................................................................................................................................................... 45
1.4 Possible and realistic improvement........................................................................................................... 46
1.5 Current version number.............................................................................................................................. 46
1.6 Date last changed and implemented.
Figure 1_. The main interface of the system._ .......................................................................................................... 10
Figure 2_. Menu of view option._ .............................................................................................................................. 11
Figure 3_. View Provider list._
Figure 4_. View Customer list._ ................................................................................................................................ 13
Figure 5_. View Drug list._ ....................................................................................................................................... 14
Figure 6_. View Order list._
Figure 7_. View Order detail list._ ........................................................................................................................... 16
Figure 8_. Menu of Add option._ .............................................................................................................................. 17
Figure 9_. Menu of Update option._
Figure 10_. Menu of Statistic option._ ...................................................................................................................... 20
Figure 11_. Creating the database._ ........................................................................................................................ 20
Figure 12_. Creating Provider table._
Figure 13_. Creating Drug table._ ............................................................................................................................ 21
Figure 14_. Creating Customer table._ .................................................................................................................... 22
Figure 15_. Creating Order table._ .......................................................................................................................... 22
Figure 32_. Select all tables._
Figure 33_. The information of Provider table._ ...................................................................................................... 32
Figure 34_. The information of Drug table._ ............................................................................................................ 33
Figure 35
. The information of Customer table. .................................................................................................... 33
Figure 36_. The information of Order table._ .......................................................................................................... 34
Figure 37_. The information of OrderDetail table._ ................................................................................................ 35
Figure 38_. Updating data of a customer._
Figure 39_. Data before updating._ .......................................................................................................................... 36
Figure 40_. Data after updating._ ............................................................................................................................ 36
Figure 41_. Deleting data from tables._ ................................................................................................................... 37
Figure 42_. Before deleting data._ ............................................................................................................................ 37
Figure 43_. After deleting data._
Figure 44_. Deleting table._ ...................................................................................................................................... 38
Figure 45_. Query to find the best-seller drug._ ....................................................................................................... 38
Figure 46_. Result of the best-seller drugs._
Figure 47_. Query to find the drugs that are least bought._ .................................................................................... 39
Figure 48_. Result of the drugs that are least bought._
Figure 49_. Query to find out the day has highest revenue._ ................................................................................... 39
Figure 50_. Result of the day has highest revenue (2022-09-03)._ .......................................................................... 40
Figure 51
. Query to find out the day has lowest revenue. .................................................................................... 40
Figure 52_. Result of the day has lowest revenue (2022-10-03)._ ........................................................................... 40
Figure 53_. Query to find out the loyal customers._ ................................................................................................ 41
Figure 54_. Result of finding out the loyal customers._
Figure 55_. ERD of pharmacy management system._ .............................................................................................. 46
Figure 56_. User Doc 1._ .......................................................................................................................................... 48
Figure 57_. User Doc 2._ .......................................................................................................................................... 50
Figure 58_. User Doc 3._ .......................................................................................................................................... 51
Figure 59_. User Doc 4._
Figure 60_. User Doc 5._ .......................................................................................................................................... 55
Figure 61_. User Doc 6._ .......................................................................................................................................... 56
Figure 1. The main interface of the system.
Interface when user clicks View button. Items related to information of provider, customer, drug, order and order detail will
be displayed, users can click on the option to view information.
Figure 2. Menu of view option.
When the user selects View Provider List, the interface will appear as follows.
Figure 4. View Customer list.
When the user selects View Drug List, the interface will appear as follows.
Figure 5. View Drug list.
When the user selects View Order List, the interface will appear as follows.
Figure 7. View Order detail list.
The interface when the user clicks the Add button. Items related to more information of provider, drug, customers, and order
will be displayed, users can click on options to add necessary information.
Figure 8. Menu of Add option.
The interface when the user clicks the Update button. Items related to additional information of provider, drug, customers,
and order will be displayed, users can click on options to edit necessary information.
The interface when the user clicks the Statistic button. The statistics and other functions of the system will be displayed.
Users can choose View or Update for new updates.
Figure 10. Menu of Statistic option.
2.1 Queries to create database and tables.
Before building the system, we need to create the database first.
Figure 11. Creating the database.
Next, we need to create tables as mentioned in the design, including five tables: Provider, Drug, Customer, Order, OrderDetail.