Higher National Diploma in Computing Final Report of Assignments 1+2 UNIT: Database Design & Development
Higher National Diploma in Computing Final Report of Assignments 1+2 UNIT: Database Design & Development
LO1 Use an appropriate design tool to design a relational database system for a substantial
problem
Learners declaration
I certify that the work submitted for this assignment is my own and research sources
are fully acknowledged.
Student signature: Nguyen Van Hieu Date: 22/12/2020
TABLE OF CONTENT
ACKNOWLEDGMENTS ......................................................................................... 4
ASSURANCE.......................................................................................................... 5
CONCLUSITION ................................................................................................... 31
LIST OF FIGURE
Figure 1 ERD.......................................................................................................................... 13
Figure 2 NguoiDoc Table....................................................................................................... 15
Figure 3 MuonSach Table ..................................................................................................... 16
Figure 4 ChiTietMuon Table ................................................................................................. 16
Figure 5 Sach Table ............................................................................................................... 17
Figure 6 TheLoai Table .......................................................................................................... 17
Figure 7 Database Diagram .................................................................................................. 18
Figure 8 NGUOIDOC Table .................................................................................................... 19
Figure 9 MuonSach Table ..................................................................................................... 19
Figure 10 CHITIETMUON Table ............................................................................................. 19
Figure 11 THELOAI Table ...................................................................................................... 20
Figure 12 CHITIETMUON Table ............................................................................................. 20
Figure 13 THELOAI Table ...................................................................................................... 21
Figure 14 NGUOIDOC Table .................................................................................................. 21
Figure 15 MUONSACH Table ................................................................................................ 22
Figure 16 THELOAI Table ...................................................................................................... 22
Figure 17 CHITIETMUON Table ............................................................................................. 22
Figure 18 Detailed Statistics View ........................................................................................ 23
Figure 19 See details amount of people borrowing books .................................................. 24
Chapter 1: INTRODUCTION
Database is the word commonly used in the fields of information technology, data,
programming and software ... .Database is a database, is a collection of data
organized and often displayed. accessed from a computer system or exists as a
file in the database administration system. Database can also be stored on
memory devices such as memory card, hard disk, CD ...
A database is a system of structured information, stored on storage devices in
order to satisfy the need to exploit concurrent information of multiple users or
multiple application programs running at the same time. with different purposes. It
includes lots of data such as a sales list, a list of clothing, a list of clothes sold, ...
this helps us to manage the store quickly and conveniently.
1.1. ACTUAL ANALYSIS
1.1.1 How to store information
Introduction to the library:
The library that I choose is a relatively large library at a high school with many
different types of books. Every day the library welcomes many students to read and
borrow books. I have noticed that after each borrowing of books, the management
and business work takes a lot of time, effort, papers and books.
I will plan and design a template to make library management easier and faster.
1.1.2 Organization And Managing books in libraries
• Adding and preserving books
The library manager accepts the imported books for book classification and
numbering. Here, each book will be reviewed the content and genre through which
the classification of the book will also be numbered for convenient searching,
through this code, the manager can know the book. booked. After being classified
and encoded, it will be given a table of contents card, on which there are book
codes, titles, readers ...
Damaged or inappropriate content in the management will be considered a
violation and removed from the archive management system.
• Serving the Readers
When there is a need to find out documents, readers who register to be library
cards to make library cards are granted registration cards. In the registration form,
the person must fill out some personal information. This card will be provided and
archived by the library and the reader will be given a library card, the reader will
have the code and other information. The institute will manage the readers through
this code.
Readers can register to borrow books through the request form with the library on
the card with the card number and number of books to be borrowed, the title of the
book, the date of borrowing, the date of return, ... checked by staff. is the reader.
All acts of violating the library's rules such as: borrowing too many books,
borrowing overdue books, damaging books, ... to take measures to handle.
• Advantages and disadvantages of library management
Advantages: The library management system meets the essential requirements of
the library management.
Disadvantage: The management system uses a lot of documents, so the
preservation and searching takes a lot of time. The system has many errors, the
management has many difficulties when readers pay the borrowed money, they
have to do it manually. So the book classification also takes a long time .
Chapter 2 : SYSTEM ANALYSIS
Through the steps of analyzing the current state of information collected, we have
current information in the library under management as follows: NguoiDoc, MSThe,
HoTen, TenLop, Sach, MSsach, TenSach, MaTL, Muon, NgayMuon, NgayTra ,
TTSachMuon, Tra, NgayTra, TTsachTra, ViPham, DaThucHien, TheLoaiSach,
TenTL.
2 DATABASE NORMALIZATION
Figure 1 ERD
Explain the relationship between entities:
- A student can choose a variety of books at the library so that the student code will
be displayed by multiple card numbers. Therefore, the relationship between students
and cards is one-to-many.
- A book category may have multiple titles, so the relationship between genre and
book is a one-to-many relationship.
- Card code can have many different book codes, so the relationship between card
and card details is a one-to-many relationship.
CHAPTER 3: SYSTEM DESIGN
3 Database design
SET SoLuong = 2
WHERE MSsach = 6 ;
WHERE MaTL='BA05'
select*from NGUOIDOC
select*from THELOAI
select*from CHITIETMUON
View is creaed:
1 Order of Enter data into the Data is entered in the There will be
input on table in the table as follows: an error when
data entry following order: TenLop data is entered entering data
in NGUOIDOCtable
screen 1. Nguoidoc into
as follows:
2. MuonSach NGUOIDOC
'T01', 'T02', 'T03', T04
',' T05 '. table because
there is no
data of
TenLop table
yet.
2 Order of Enter data into the Enter data into Data will be
input on table in the NguoiDoc table: entered into
data entry following order: '2', 'Nguyen Van Hieu', the tables and
'T02'.
screen 1. MuonSach there will be
And the data entered
2. NguoiDoc no errors.
in the Muon table is as
follows:
Data '1', '1', '2020-07-
07', '2020-07-020',
'TOT'.
9 Validation Enter many types Enter the Sach table Data entry is
of input of books in the with the following successful
MSsach attribute data: and there is
'1', '4'
in the Sachs table no error
message
10 Validation Enter the number 1 Enter the book of the Data entry is
of input into the Mssach spreadsheet and the successful
field in the Book following data: and there is
'1', 'BA02'
list
no error
message
After learning database database. I already know how to use SQL database
software, know how to deploy commands before creating database tables. I have
written a library management system. Although it is not 100% complete yet, I will
constantly try to improve and improve myself to bring the best quality possible.
In the coming terms, I will do my best at BTEC International College.