Information Technology: Assignment 1
Information Technology: Assignment 1
INFORMATION TECHNOLOGY
ASSIGNMENT 1
UNIT: Database Design
CLASS : BDAF-2005-1
STUDENT ID : BDAF190016
Grading grid
P1 M1 D1
Assignment Feedback
Action Plan
Summative feedback
i
ACKNOWLEDGMENTS
Today, the strong development of information technology makes computers im-
portant in all areas of the system. Most of the features of the computer are being fully ex-
ploited. Today computers are mainly used in programming, complex management, data
processing, commerce, science, ...
ii
ASSURANCE
I certify that this assignment is my own work, based on my personal study and that I
have acknowledged all material and sources used in its preparation, whether they be books,
articles, reports, lecture notes, and any other kind of document, electronic or personal com-
munication. I also certify that this assignment has not previously been submitted for assess-
ment in any other unit, except where specific permission has been granted from all unit
coordinators involved, or at any other time in this unit, and that I have not copied in part or
whole or otherwise plagiarised the work of other persons.
Learners declaration
I certify that the work submitted for this assignment is my own and research
sources are fully acknowledged.
iii
TABLE OF CONTENT
ACKNOWLEDGMENTS ........................................................................................... ii
ASSURANCE ...........................................................................................................iii
TABLE OF CONTENT............................................................................................. iv
iv
4.1.4 Table HOADON ...................................................................................... 12
CONCLUSION ........................................................................................................ 15
REFERENCES ....................................................................................................... 16
v
CHAPTER 1 DATABASE DESIGN
1.1 Introduction to the problem.
Through the survey of the sales job at the Tuong Vi clothing store, the building of a
store management system is extremely important. The operation of a large-scale store will
be enhanced and expanded if a good management system is built. Derived from this rea-
son, I chose the topic: "Building a management system for Tuong Vi clothing store" to ana-
lyze and design the system.
- Currently, the store management is through books, so the management takes a lot of
time and manpower
- Customer management function: This function allows the store manager to manage
information about customers who have purchased at the store. At the bottom of the store
owner can add customer information, correct and delete customer information and search
for customer information.
- Goods management function: This function allows the store manager to manage
information about purchased goods at the store. At the bottom of the store owner can add
goods information, correct and delete information about the goods and search for infor-
mation about the goods.
- The database management system SQL Server runs on the Windows operating system
2.1 Normalization
The clothing store management system at Tuong Vi clothing store needs to store the
following information:
- Items sold by many staff and under different sales invoices. In order to store product
information, it is necessary to store information such as: product code, product name, quan-
tity, unit of goods, input unit price,….
- When entering customer information, store information such as: customer code, customer
name, phone number, address.
- Storing employee information including information such as employee name, employee
code, gender, address ,. . .
- To store invoice information, information such as: invoice code, items in the invoice, quan-
tity, unit price, amount, date of sale, customer information, ...
After data analysis, the following information should be managed:
SP01, SP02 Quan jean, kep Chiec, Day NV01 Pham Hong 0989888989
toc
80.000
1NF
It can be seen that the table above has many cells with multiple values (product code,
product name, identity,….). 1NF should not be satisfied. To ensure 1NF, the above table
should be restated as follows:
After separating values in cells, the Product Code column is no longer the primary
key because the Invoice Code values overlap. Therefore, we need to redefine the primary
key for the table above. It can be seen that if the values of the invoice encoding column and
the product code are combined, all remaining values can be determined. Therefore, the
main keys are: Invoice Code and Product Code.
2NF
After seeing that the word 1NF contains the component keys, the invoice code and
the product code.
To ensure that the 2NF properties dependent on the member key need to be divided
into new tables.
Table 1 table 1 2NF
Sp01 DT01 3
3NF
From table 1 2NF, we see that this table does not contain dependencies for
bridging functions. Meet 3NF standard.
Sp01 DT01 3
HD01 H01 1
Table Khach
Table Hang
• Explanation of ERD:
When customers buy goods at the store, the store manager will ask for customer
information to store customer information in the system and create invoices for customers.
Since a customer can come to the store for more than one time, the relationship is 1-n.
Likewise, the salesperson at the store can invoice the customers for purchases many times,
so the relationship between the employee and the invoice is one many.
According to the system design requirements are relational database design. but
according to this ERD diagram the tables are closely related. The system makes storing
information easy and convenient, providing full fields to store data in the most detailed way.
The database includes tables to store different data information to manage. The data
is clearly managed for better data preservation.
Using the SQL Server database management system to manage the database. The
database includes 5 tables as follows: Nhanvien, Khachhang, Hang, Hoadon,Chtiethoadon
3.1.1 Table NHANVIEN
The table includes 6 columns which are Manhanvien, Tennhanvien, Gioitinh, Dia-
chiNhanvien, SdtNhanvien and ngaysinh
Manhanvien Nvarchar(10) NO PK
Tennhanvien Nvarchar(50) NO
Gioitinh Nvarchar(50) NO
DiachiNhanvien Nvarchar(50) NO
SdtNhanvien Nvarchar(20) NO
Makhach Nvarchar(10) NO PK
MaHD Nvarchar(10) NO PK
Mahang Nvarchar(10) NO PK
MaHD Nvarchar(10) NO PK
Mahang Nvarchar(10) NO PK
4.2 Diagram
I work with a team to build a more perfect compost; my team name is Group 4.
While working as a team, I contributed the following:
• I have tried to find information and assist all members in finding information.