ASSIGNMENT 2 FRONT SHEET
Qualification
TEC Level 5 HND Diploma in Computing
Unit number and title
Unit 04: Database Design & Development
Submission date
5 January 2022
Date Received 1st submission
Re-submission Date
Date Received 2nd submission
Student Name
Nguyen Huy Hoang
Student ID
GCH200739
Class
GCH0908
Assessor name
Han Minh Phuong
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.
HOANG`
Student’s signature
Grading grid
P2
P3
P4
P5
M2
M3
M4
M5
D2
D3
Summative Feedback:
Grade:
Signature & Date:
Resubmission Feedback:
Assessor Signature:
Date:
Table of Contents
A.
DEVELOP THE DATABASE SYSTEM (P1)................................................................................................................................................................... 4
I.
Entity Relation Diagram ............................................................................................................................................................................................... 4
II. Create the Database ....................................................................................................................................................................................................... 4
1.
Create Student Entity ................................................................................................................................................................................................ 4
2.
Create Librarian Entity ............................................................................................................................................................................................. 5
3.
Create Library Entity................................................................................................................................................................................................. 5
4.
Create BookDetails Entity ....................................................................................................................................................................................... 6
5.
Create BorrowInfo Entiy .......................................................................................................................................................................................... 6
6.
Create BorrowDetails Entity .................................................................................................................................................................................. 7
7.
Create BookStatus Entity ......................................................................................................................................................................................... 7
8.
Create Account Entity ............................................................................................................................................................................................... 8
III.
Diagram .......................................................................................................................................................................................................................... 9
IV.
User Interface ............................................................................................................................................................................................................. 10
B.
IMPLEMENTATION QUERIES(P2) .............................................................................................................................................................................. 13
I.
Queries to Insert ............................................................................................................................................................................................................ 13
II. Queries to Update ......................................................................................................................................................................................................... 13
III.
Queries to Delete ...................................................................................................................................................................................................... 14
IV.
Queries to Select........................................................................................................................................................................................................ 14
C.
TEST THE SYSTEM AGAINST USER AND SYSTEM REQUIREMENTS(P3) ................................................................................................... 16
I.
Test Plan ........................................................................................................................................................................................................................... 16
II. Test Log............................................................................................................................................................................................................................. 16
D. TECHNICAL AND USER DOCUMENTATION (P4) .................................................................................................................................................. 18
I.
User Documentation .................................................................................................................................................................................................... 18
1.
For Users/Students.................................................................................................................................................................................................. 18
2.
For Librarians ............................................................................................................................................................................................................ 21
II. Technical Document .................................................................................................................................................................................................... 23
A. DEVELOP THE DATABASE SYSTEM (P1)
I.
Entity Relation Diagram
Figure 1: ERD
II.
Create the Database
1. Create Student Entity
Figure 2:Create Student Entity
Figure 3: Student Entity
2. Create Librarian Entity
Figure 4:Create Librarian Entity
Figure 5: Librarian Entity
3. Create Library Entity
Figure 6: Create Library Entity
Figure 7: Library Entity
4. Create BookDetails Entity
Figure 8: Create BookDetails Entity
5. Create BorrowInfo Entiy
Figure 10: Create BorrowInfo
Figure 11: BorrowInfo
Figure 9: BookDetails Entity
6. Create BorrowDetails Entity
Figure 12: Create BorrowDetails Entity
Figure 13: BorrowDetails Entity
7. Create BookStatus Entity
Figure 14: Create bookstatus entity
Figure 15: Bookstatus entity
8. Create Account Entity
Figure 16: Create Account Entity
Figure 17: Accoutn Entity
III.
Diagram
Figure 18: Diagram
IV.
User Interface
Figure 19: Lauching interface
Figure 20: Login Interface
Figure 22: Main interface
Figure 21: Main interface 2
Figure 24: Output Interface - Statistic of book borrowed
Figure 23: Another Output of app
B. IMPLEMENTATION QUERIES(P2)
I.
Queries to Insert
Queries to insert
II.
Result
Queries to Update
Before Update
Before Update
Query to update
Query to update
After Update
After Update
III.
Queries to Delete
Before Delete
Query to Delete
After Delete
IV.
Queries to Select
1. Basic Queries
Query to select from Student Entity
Query to select from Librarian Entity
2. Queries to support the enhancement of the functionality
Query to select total books borrowed in certain duration
Query Procedure to Get all information of one Borrow
Implement
Results
Create Procedure
Query Trigger to automatically update books quantity in each borrow after insert or delete a new/old book in this borrow
Test
Results
Query to Select Students who return books overdue more than 5 days
Query Select
Results
C. TEST THE SYSTEM AGAINST USER AND SYSTEM REQUIREMENTS(P3)
I.
Test Plan
No.
What is being Tested
How
Test data used
Expected results
1
Validation of Input
Enter typical values, boundary
value, values that should be
rejected
StudentID, LibrarianID, Dob,
Location, number phone
Good data accepted,
bad data rejected
2
Constraint
Change the data in the
maintain scope of constraint
Constraint between Entities
Reject the bad handle
to constraint
3
Order of input on data
entry screen
Input of all Entities
4
User Requirements
Enter data from data capture
sheet into the
form on the data entry screen
View Output Statistic via Select
query
Data entry order is the
same as that on the
data capture sheet
Display successfully
and exactly results
II.
No.
Relational information
between entities
Test Log
Test Case
Decription
Actual
Result
Expected
Resuld
Status
1.
Test Student ID input not follow
the form of condition
Input differ to the form
(studentID like 'GCH[0-4][09][0-9][0-9][0-9][0-9]')
Error
Error
Pass
2.
Test Location of Library input not Input differ to the form (location
follow the form of condition
in ('HN','CT','HCM','DN'))
Error
Error
Pass
3.
Test Date of Birth field input not
follow the form of condition
Error
Pass
4.
Test constraint in BookDetails
Entity and BookStatus
Input the date of birth is equal to Error
current time now(Date of birth =
26 -12-2021)
Delete a Book info from
Error
BookDetails Before Delete it in
BookStatus. (Delete Book Detais
where bookid = ‘Book123’)
Error
Pass
5.
Test constraint in Library Entity
and Librarian Entity
Delete LibraryID and info from
Library Before Delete this
LibraryID in Librarian(Delete
Library where libaryid = 2)
Error
Error
Pass
6.
Test constraint in BorrowInfo
Entity and BorrowDetails Entity
Error
Error
Pass
7.
Test Librarian input
Delete BorrowID and info from
BorrowInfo Before Delete this
BorrowID in BorrowDetails
(Delete borrowInfor where
borrowid = 3)
Input the duplicated data into
LibrarianID(Primary Key)
Error
Error
Pass
8.
Test BorrowInfo input
Input the duplicated data into
BorrowID(Primary Key)
Error
Error
Pass
9.
Test Account input
Input Deficient Username or
Password (Insert into Account
values
(‘GCH199999’,‘koasdkoas’,’ ’))
Error
Error
Pass
10. Test Student input
Input Text into phone
Error
Success
Not Pass
11. Test Librarian input
Input Text into phone
Error
Success
Not Pass
12. Test library statistic Output
requirement
Query to View the total number
of books borrowed in certain
duration
Success and
exactly
Success
Pass
13. Test Student Output requirement
Query to View the total books Of
one student borrow
Success and
exactly
Success
Pass
14. Test Student Output 2
requirement
Query to View the number of
times a student return overdue
date in a month
Success and
Exactly
Success
Pass
15. Test Borrow Output requirement
Query to View all information of
a borrow including its Student,
librarian, all book title, date of
each book,…
Success and
Exactly
Success
Pass
D. TECHNICAL AND USER DOCUMENTATION (P4)
I.
User Documentation
1. For Users/Students
When Users(Students) Login successfully, their app will be jumped into The main interface which be designed only
for Students using. This is user interface below:
To search book and borrow book there are 3 steps:
o Step 1: Click on “Books in Library” on the menu bar.
o Step 2: Search the book Students want and the book matching with the search result will be displayed all
information of it.
o Step 3: Student can Borrow or Cancel based on their want.
This is the next option of User Interface and this is My Borrow:
This option will display all the books that student has borrowed, It will display fully data about: the book title, Date,…
There are 3 steps to manipulate with this site:
o Step 1: Student can scroll up-down or they can search the sumber of Borrow(Validation: > 0 and must be
Integer) to find their borrow they want to re-watch
o Step 2: Watch The information.
o Step 3: Click on Cancel to out.
This is the last option of User Interface and this is My Account:
To use it , there are 3 steps:
o Step 1: Click on My Account Option on menu bar.
o Step 2: In here, Students can only watch information or Click on Edit If they want to edit their
info(Inforamtion which can be edited include Full Name, Phone and Password).
o Click Cancel to out.
2. For Librarians
When Users login with Librarians Account, Their app will jump into the form only for Librarians Account. And below is the
user interface of librarian site:
This form quite simple to use, to use it Librarians just follow some steps below:
o Step 1: Click on Add Borrow Options.
o Step 2: Fullfill information of this borrow(based on introduction in image above. Some validations are: StudentID
must like “GCH[0-9][0-9][0-9][0-9][0-9][0-9]” or,… ; BookID < 15 characters).
o Step 3: Click Add to store this borrow.
Below are the form for Librarian to add new book:
To add book Librarian Just follow these step:
o Step 1:Click on Add Book Option.
o Step 2: Fullfill information as the image introduction above(some validations: Book Title < 100 characters,
Publiser < 100 characters, First name and Last name < 50 characters, Publisher year must less than the current
time stamp, Total Pages > 0).
o Step 3: Click Add button to add new book.
The other options of Librarian also operating similarly. Additional, Librarians can click on the statistic button on top of
app to view the statistical data of Library.
II.
Technical Document
1. Introduction
The Relational Database of Library Management System has been designed with the primary goal to support librarians store
and record information about book exchange process daily happening in library. The main target group of this relational
database system are principal for manipulating with Books and information of Borrowing process. The system includes CRUD
actions and serves the requirements of library in handling with books encompassessing status of books, term of borrowing
Flexibly and easily add, delete, edit for library record and all information belong to students, books.
Figure 25: ERD diagram
2. Possible and realistic improvements
Convenient in working with information in library, easy to edit information of books, observasing the status of book
and library available in each campus of Fpt. Establishing exactly and detail borrowing information with the particular
duration. Provide exact & realistic statistic output of library. Addition:
Maintaining online records of borrowed and returned information, Period, rule, adjustments, evaluations
instead of flat files or paper folders which will require more space.
Integrate with software will be convenient for librarian to perform tasks.
Ability to Retrieve and interact with them.
Flexibly and easily add, delete, edit for library record and all information belong to students, books.
3. Current Version Number: 0.6.9HH
4. Date last changed and implemented: 5/1/2022