Tải bản đầy đủ (.pdf) (38 trang)

tec level 5 hnd diploma in computing unit 04 database design development

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (531.91 KB, 38 trang )

<span class="text_page_counter">Trang 1</span><div class="page_container" data-page="1">

<b>ASSIGNMENT 1 FRONT SHEET</b>

</div><span class="text_page_counter">Trang 3</span><div class="page_container" data-page="3">

<b>❒Summative Feedback:</b>

<b>Resubmission Feedback:</b>

<b>Signature & Date:</b>

</div><span class="text_page_counter">Trang 5</span><div class="page_container" data-page="5">

<b>ASSIGNMENT 1: </b>

<b>DATABASE DEVELOPMENT</b>

Table of Contents

I. STATEMENTS OF USER AND SYSTEM REQUIREMENTS ... 4

1. Overview of the problem ... 4

2. About this project ... 4

II. Design The Relational Database System ... 5

1. Analyse the requirement ... 5

2. Database Design with Explanations ... 5

Figure 1 ERD For Pharmacy System... 6

Figure 2 Information of customer... 7

Figure 3 Information of orders... 7

Figure 4 Information of orders details... 8

Figure 5 Information of drug... 8

Figure 6 Information of staff... 9

Figure 7 Information of branch... 9

Figure 8 Information of inventory... 10

Figure 9 Relationshop of Customer table and Orders table... 10

Figure 10 Relationshop of Staff table and Orders table... 11

Figure 11 Relationship of Drug table, order table and order table order details...12

Figure 12 Relationship of Branch table, Inventory table and drug...13

Figure 13 Relationship of Branch table, staff table... 14

</div><span class="text_page_counter">Trang 6</span><div class="page_container" data-page="6">

Figure 15 Orders table... 15

</div><span class="text_page_counter">Trang 7</span><div class="page_container" data-page="7">

Figure 18 Order details table... 16

Figure 19 Customer table... 17

Figure 20 Branch table... 17

Figure 21 Database diagram... 19

<b>I.STATEMENTS OF USER AND SYSTEMREQUIREMENTS.</b>

Currently, I am working as a programmer at a technology company. This project is a company project. The customer asked the company to make a store management software for sale. Include activities that make it easier for the store to manage drug sales. egstaff management, drugs and prices, inventory, order management…

The pharmacy management system has 3 main roles: Staff management, drug management and orders management

<b>As pharmacist management:</b>

➢ I want to add and edit the Staff information or delete the Staff information when they no longer work at the store

<b>As drug management:</b>

➢ I see what drugs are in the store and the different names of them.

➢ I want to add and delete drug information such as drug name or price of each drug.

</div><span class="text_page_counter">Trang 9</span><div class="page_container" data-page="9">

<b>II.Design The Relational Database System</b>

According to a recent survey of pharmacies, It is difficult for pharmacies to manage their drugs as well as their orders and Staff, especially inmedium to large drugstore chains for the following reasons:

➢ The amount of medicine is too many different names and many specific types of treatment for other diseases.

➢ Staff in medium to large systems are many, difficult to manage, besides there will be cases where these pharmacists leave work and newStaff come back to work, it will be very difficult to manage if it happens often.

➢ Customers often buy many products at the same time. It will be tough for them if they have to wait for the staff to calculate, not to mention that a customer shop is crowded and they buy many medicinal products, they will wait a long time, and their experience at the store will not besatisfactory. they will complain about their uncomfortable experience.

Because of the above inadequacy, the store decided to create a management system to better manage its drugs and employees as well asincrease a better customer experience. Attract more new customers, increase store revenue

<b>➢ Relationship diagram:</b>

</div><span class="text_page_counter">Trang 11</span><div class="page_container" data-page="11">

<b>➢ Explanation for ERD: This is ERD include 7 tables with saved values for date needed system</b>

<b>Customer table: This table contains the primary key and table’s attributes like full name, email, and phone number. These attributes</b>

</div><span class="text_page_counter">Trang 13</span><div class="page_container" data-page="13">

<b>Order table: This table contains the primary keys and two foreign keys including customer_id, and staff id. Contain table </b>

attributes like Description and Date orders.

<small>Figure 3 Information of orders</small>

<b>Orders Details table: This is the intermediate table connecting the order table and the drug table. this table has orders_id, drug_id,</b>

</div><span class="text_page_counter">Trang 15</span><div class="page_container" data-page="15">

<b>Drug table: This table contains the primary key and Drug_Name, Price is attributes like information and price of the drug.</b>

<small>Figure 5 Information of drug</small>

</div><span class="text_page_counter">Trang 17</span><div class="page_container" data-page="17">

<b>Branch Table: This table contains primary key, and attributes such as the name and address of Branch.</b>

</div><span class="text_page_counter">Trang 19</span><div class="page_container" data-page="19">

<b>Explaning Relationship:</b>

</div><span class="text_page_counter">Trang 21</span><div class="page_container" data-page="21">

<b>Relationships of Staff table and Order table:</b>

<small>Figure 10 Relationshop of Staff table and Orders table</small>

<b>• Staff table and Order table: The relationship of the staff table and the order table is a one to zero or many relationships, a Staff can have</b>

</div><span class="text_page_counter">Trang 23</span><div class="page_container" data-page="23">

<small>Figure 11 Relationship of Drug table, order table and order table order details</small>

</div><span class="text_page_counter">Trang 27</span><div class="page_container" data-page="27">

One - many relationships.

<small>Figure 13 Relationship of Branch table, staff table</small>

Two tables are linked by Branch_ID because one staff works only in a branch and a branch may have many staff.The relationship is one – much

Data type:- Staff:

</div><span class="text_page_counter">Trang 29</span><div class="page_container" data-page="29">

- <b>Orders:</b>

</div><span class="text_page_counter">Trang 31</span><div class="page_container" data-page="31">

<small>-Figure 16 Inventory table</small>

- <b>Drug:</b>

- <b>Order details:</b>

<small>Figure 17 Drug table</small>

<small>Figure 18 Order details table</small>

</div><span class="text_page_counter">Trang 33</span><div class="page_container" data-page="33">

-- <b>Branch:</b>

<small>Figure 20 Branch table</small>

Datase diagram: Tables, attributes, and linkages are common components of both ERD and database diagrams, as seen in the database diagram figure above. The ERD, on the other hand, clearly depicts the primary and foreign keys so that the reader may comprehend them . The framework Finally, the database diagram retains all of the key elements of the

</div>

×