Docsity

ASM1-Database programming 1622, Assignments of Database Programming

Toggle sidebar
bg1
ASSIGNMENT 1 FRONT SHEET
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
Lê Nguyễn Quang Nam
Student ID
GCD201654
Class
GCD0905
Assessor name
Đỗ Duy Thảo
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
Lê Nguyễn Quang Nam
Grading grid
P1
M1
D1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download ASM1-Database programming 1622 and more Assignments Database Programming in PDF only on Docsity!

ASSIGNMENT 1 FRONT SHEET

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 Lê Nguyễn Quang Nam Student ID GCD Class GCD0905 Assessor name Đỗ Duy Thảo 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 Lê Nguyễn Quang Nam Grading grid

P1 M1 D

❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date: Signature & Date:

  • Chapter 1 Statements of user and system requirements........................................................................
    • 1.1 Overview about the Problem.......................................................................................................
    • 1.2 Requirements of the application..................................................................................................
  • Chapter 2 Design the relational database system...................................................................................
    • 2.1 Analyse the requirements............................................................................................................
    • 2.2 Database design with explanations..............................................................................................
  • REFERENCE LIST...............................................................................................................................
  • Figure 1 The project about pharmacy management system. TABLE OF FIGURES
  • Figure 2 ERD for Pharmacy Management System.
  • Figure 3 Example of Provider table.
  • Figure 4 Example of Drug table.
  • Figure 5 Example of Customer table.
  • Figure 6 Example of Order table.
  • Figure 7 Example of OrderDetail table.
  • Figure 8 ERD and the relationship of Provider and Drug table.
  • Figure 9 ERD and the relationship of Customer and Order table.
  • Figure 10 ERD and the relationship of Order and OrderDetail table.
  • Figure 11 ERD and the relationship of Drug and OrderDetail table.

Chapter 1. Statements of user and system requirements (P1).

1.1 Overview about the Problem.

This project was created to solve the problem of my family business. Currently, realizing that in the neighborhood did not have a pharmacy, my family discussed the plan to open one to serve people. Therefore, it is necessary to have a pharmacy management system that includes activities to make work in the shop easier and more efficient such as managing drug or provider in stock, order management, etc. As a specialized software student, I can create such a system to help my mother, who will take on almost everything at my family pharmacy. With this pharmacy management system, my mother can easily manage invoices, users’ information, statistics or drugs as well as provides supplying those drugs. In summary, my project will bring many benefits in managing the data, thereby making my mother's business easier and saves a lot of time. Figure 1. The project about pharmacy management system.

1.2 Requirements of the application.

 Statistics of drugs that are least bought to cut down the import of goods.  Statistics of the month with the highest revenue to continue to maintain and improve more.  Statistics of the month with the lowest revenue to find out the cause and solution to improve it.  Statistics of loyal customers to have certain incentives for them to get more potential customers.

Chapter 2. Design the relational database system (P1).

2.1 Analyse the requirements.

According to surveys and my knowledge about pharmacy systems and consumers, I summarize a few key issues as follows:  It is difficult to process the large number of shipments or payment and other important information.  It takes a lot of time and effort to process information about a drug such as name, type, price, supplier.  The trend of purchasing discounts is increasing rapidly, customers want to accumulate points when making purchases to have coupons.  Consumers complain that they want to purchase back the same drug they bought before without giving the receipt because it is difficult to keep it. Notice the above problems, I want to help my mother create a flexible management system for data information, saving time and effort. The system can also regularly update new information as well as store it, meeting the needs of customers, thereby attracting more customers and increasing profits.

2.2 Database design with explanations.

 Entity Relationship Diagram (ERD):

Figure 2. ERD for Pharmacy Management System.

 Explanation of ERD: The diagram consists of five tables with each table storing the appropriate values for the system.

 Provider table: The Provider table contains the primary key of Provider_ID used to identify the providers on the system. For additional suppliers information, the table has four additional columns representing attributes such as Prov_Name (Provider’s Name), Prov_Phone (Provider’s Phone), Prov_Address (Provider’s Address) and Prov_Email (Provider’s Email).

Figure 6. Example of Order table.  OrderDetail table: The OrderDetail table contains composite primary key including Order_ID from Order table and of Drug_ID from Drug table. This table shows the details of an order such as Quantity (Quantity of drugs in an order) and Selling_Price (The selling price of each product in an order). Figure 7. Example of OrderDetail table.

 Explanation of the relationship:

 The relationship between Provider and Drug table: The two tables are linked by Provider_ID. With a provider can supply one or more drugs to a pharmacy. And those drugs have only one provider. Since each drug has its own brand, it can only be made by one supplier. => One (and only one) to many (one or many) relationship.

Figure 8. ERD and the relationship of Provider and Drug table.  The relationship between Customer and Order table: The two tables are linked by Customer_ID. With a Customer can order one or more orders. And the orders belong to only one customer. => One (and only one) to many (one or many) relationship.

Figure 11. ERD and the relationship of Drug and OrderDetail table.

 In conclusion, the tables, the characteristics, the relationships have been clearly presented above. On the other hand, the database

meets the users requirements and are well normalized (3NF). About the user’s requirements, the system provides needed information for the manager, provides information about providers and drugs for warehouse, providers information of an order for customers as well as records their purchases to give them incentives in next purchases. So, the database meets the users requirements. About normalization (3NF), the database breaks down tables and links them using relationships. Each table cell contains a single value (not a list) and has a primary key (or composite primary key) in each table so that each row (record) is unique (1NF). Tables are linked together via foreign key in each table to ensure referential integrity (2NF). Tables also have no transitive functional dependencies (3NF). So, the database is well normalized. Therefore, my pharmacy management system is fairly complete database.

REFERENCE LIST.

Dang, K. T., 2019 Codelean [Online] Available at: https://www.codelean.vn/2019/12/binh-thuong-hoa-la-gi-1nf-2nf-3nf-bcnf.html?fbclid=IwAR2eWuM9QmFY9Be- nLxBnBSCupsCjPAW8DHtgsfmv8G1VbWdEE_Rb7DeQPM [Accessed 19 February 2022]