Professional Documents
Culture Documents
Unit number and title Unit 04: Database Design & Development
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
Grading grid
P2 P3 P4 P5 M2 M3 M4 M5 D2 D3
1
❒ Summative Feedback: ❒ Resubmission Feedback:
2
3
Contents
I. INTRODUCTION.................................................................................................................................6
II. SYSTEM REQUIREMENTS...........................................................................................................7
1. Real world scenario.............................................................................................................................7
2. Data requirements for storage..............................................................................................................7
3. Relationship between entities..............................................................................................................8
III. DATABASE DESIGN.......................................................................................................................8
1. ER Diagram.........................................................................................................................................8
2. Convert ER Diagram to Relation Diagram..........................................................................................9
3. Normalization....................................................................................................................................10
4. Relational database system................................................................................................................11
5. Implement a query language..............................................................................................................13
IV. DATABASE DEVELOPMENT.....................................................................................................13
1. Application design.............................................................................................................................13
2. Application Code...............................................................................................................................20
V. TESTCASE AND TEST LOG...........................................................................................................24
1. Test Form Login................................................................................................................................24
2. Test Form Sign Up.............................................................................................................................25
3. Test Form Library..............................................................................................................................25
4. Test Form Book.................................................................................................................................26
5. Test Form Publisher...........................................................................................................................27
6. Test Form Customer..........................................................................................................................28
7. Test Form Bill....................................................................................................................................29
VI. TECHNICAL USER DOCUMENTATION..................................................................................31
1. How to login and sign up account.....................................................................................................31
2. How to use the program's functions...................................................................................................32
VII. CONCLUSION................................................................................................................................46
VIII. REFERENCE LIST.....................................................................................................................47
4
I. INTRODUCTION
In this exercise, I will write a program to manage books for a university library. Every book has
Information such as <id, name, ...> each book will be identified by an ID
to determine which library the book belongs to. Each author also has information such as <name,
phone
numbers, addresses, ...> and each author has an ID to identify which author of which book.
5
II. SYSTEM REQUIREMENTS
Description
Entity Attribute Description of Attribute
of Entity
It is a unique identifier for each book in the
BookID
library
6
Address Address of people
7
Figure 3.1 Example illustration for ER
8
Figure 3.2 Convert ER Diagram to Relation Diagram
3. Normalization
a. Define
(microsoft. 2020)
Normalization is the process of organizing data in a database. This includes creating tables
and establishing relationships between those tables according to rules designed both to
protect the data and to make the database more flexible by eliminating redundancy and
inconsistent dependency.
b. Purpose
(microsoft. 2020)
- Eliminate repeating groups in individual tables.
- Create a separate table for each set of related data.
- Identify each set of related data with a primary key.
- Create separate tables for sets of values that apply to multiple records.
- Relate these tables with a foreign key.
9
- Eliminate fields that do not depend on the key.
10
Figure 3.5 Add table
- After adding all the tables, we have an ER diagram with Microsoft SQL Server
Management Studio
11
5. Implement a query language
- Statement adds data to the table
12
Figure 4.1 System interface login
b. Form Sign up design
13
Figure 4.2 System interface sign up
14
Figure 4.3 System library interface
15
Figure 4.4 System Book interface
16
Figure 4.5 System publisher interface
17
Figure 4.6 System customer interface
g. Form Bill design
18
Figure 4.7 System bill interface
2. Application Code
a. Code Login
19
Figure 4.8 Code Login
b. Code Sign up
20
c. Code ADD
21
Figure 4.12 Code Delete
f. Code Search
22
Figure 4.14 Code Back
h. Code Exit
23
Test Actua
2. Action
Test How Data Expected results Date l
taken
Use results
Enter Username Correct both
and Password into Username and
Data in
textBox and click Password is login
1. textbo 15/8/2020 Ok None
Login successful.
x
Otherwise, login
fails
Test Form Sign Up
3. Test
Actual Action
Test How Data Expected results Date
results taken
Use
If the Username is
not duplicated with
the existing
account, the
Password is not
Enter and select the
empty, the
information into
Data in information is
1. the corresponding 15/8/2020 Failed Retest
textbox entered in the
textBox, and click
correct data type,
Sign Up
then create a new
account
successfully.
Otherwise, account
creation failed
If the Username is
not duplicated with
the existing
account, the
Password is not
Enter and select the
empty, the
information into
Data in information is
2. the corresponding 15/8/2020 OK None
textbox entered in the
textBox, and click
correct data type,
Sign Up
then create a new
account
successfully.
Otherwise, account
creation failed
Test Form Library
24
Test
Actual Action
Test How Data Expected results Date
results taken
Use
Data entry order is
Enter data from the same as that on
data capture sheet Data the data capture
1. 15/8/2020 OK None
into the form on the Set sheet
data entry screen
If the information is
entered in the
correct data type,
Library ID is not
Enter data into the repeated with
Data
2. textboxes on the existing Library 15/8/2020 OK None
Set
form and click Add ID, then the
addition is
successful.
Otherwise, addition
is failed
If the information is
entered in the
correct data type,
Enter data into the Library ID already
textboxes on the Data exists in the list
3. 15/8/2020 OK None
form and click Set table, information
Update is changed
successfully.
Otherwise, Update
is failed
If library ID exists
Enter Library ID in the list table,
Data delete is successful.
4. into the textbox and 15/8/2020 OK None
Set Otherwise, Delete
click Delete
is failed
Displays a list of
Enter the Library
Library with names
Name into search
Data that match or
5. in the textbox of 15/8/2020 OK None
Set partially match with
the search section
the keyword
and click Search
searched
25
Test
Actual Action
Test How Data Expected results Date
results taken
Use
Data entry order is
Enter data from the same as that on
data capture sheet Data the data capture
1. 15/8/2020 OK None
into the form on the Set sheet
data entry screen
If the information is
entered in the
correct data type,
Book ID is not
Enter data into the
Data duplicated with the
2. textboxes on the 15/8/2020 OK None
Set existing Book ID,
form and click Add
the addition is
successful. If not,
the addition is
unsuccessful
If the information is
entered in the
correct data type,
Enter data into the Book ID already
textboxes on the Data exists in the list
3. 15/8/2020 OK None
form and click Set table, information
Update is changed
successfully.
Otherwise, Update
is failed
If Book ID exists in
Enter Book ID into the list table, delete
Data is successful.
4. the textbox and 15/8/2020 OK None
Set Otherwise, Delete
click Delete
is failed
Displays a list of
Enter the Book
Book with names
Name into search
Data that match or
5. in the textbox of 15/8/2020 OK None
Set partially match with
the search section
the keyword
and click Search
searched
26
Test
Actual Action
Test How Data Expected results Date
results taken
Use
Data entry order is
Enter data from the same as that on
data capture sheet Data the data capture
1. 15/8/2020 OK None
into the form on the Set sheet
data entry screen
If the information is
entered in the
correct data type,
Publisher ID is not
Enter data into the repeated with
Data
2. textboxes on the existing Publisher 15/8/2020 OK None
Set
form and click Add ID, then the
addition is
successful.
Otherwise, addition
is failed
If the information is
entered in the
correct data type,
Publisher ID
Enter data into the
already exists in the
textboxes on the Data
3. list table, 15/8/2020 OK None
form and click Set
information is
Update
changed
successfully.
Otherwise, Update
is failed
If Publisher ID
exists in the list
Enter Publisher ID
Data table, delete is
4. into the textbox and 15/8/2020 OK None
Set successful.
click Delete
Otherwise, Delete
is failed
Displays a list of
Enter the Publisher
Publisher with
Name into search
Data names that match
5. in the textbox of 15/8/2020 OK None
Set or partially match
the search section
with the keyword
and click Search
searched
27
Test
Actual Action
How Data Expected results Date
results taken
Use
Data entry order is
Enter data from the same as that on
data capture sheet Data the data capture
1. 15/8/2020 OK None
into the form on the Set sheet
data entry screen
If the information is
entered in the
correct data type,
ID is not repeated
Enter data into the
Data with existing
2. textboxes on the 15/8/2020 OK None
Set Publisher ID, then
form and click Add
the addition is
successful.
Otherwise, addition
is failed
If the information is
entered in the
correct data type,
Enter data into the ID already exists in
textboxes on the Data the list table,
3. 15/8/2020 OK None
form and click Set information is
Update changed
successfully.
Otherwise, Update
is failed
If ID exists in the
Enter ID into the list table, delete is
Data successful.
4. textbox and click 15/8/2020 OK None
Set Otherwise, Delete
Delete
is failed
Displays a list of
Enter the Customer
Customer with
Name into search
Data names that match
5. in the textbox of 15/8/2020 OK None
Set or partially match
the search section
with the keyword
and click Search
searched
28
Test
Actual Action
How Data Expected results Date
results taken
Use
Data entry order is
Enter data from the same as that on
data capture sheet Data the data capture
1. 15/8/2020 OK None
into the form on the Set sheet
data entry screen
If the information is
entered in the
correct data type,
Bill ID is not
Enter data into the repeated with
Data
2. textboxes on the existing Publisher 15/8/2020 OK None
Set
form and click Add Bill ID, then the
addition is
successful.
Otherwise, addition
is failed
If the information is
entered in the
correct data type,
Enter data into the Bill ID already
textboxes on the Data exists in the list
3. 15/8/2020 OK None
form and click Set table, information
Update is changed
successfully.
Otherwise, Update
is failed
If Bill ID exists in
Enter Bill ID into the list table, delete
Data is successful.
4. the textbox and 15/8/2020 OK None
Set Otherwise, Delete
click Delete
is failed
Displays a list of
Enter the Bill
Bill with names
Name into search
Data that match or
5. in the textbox of 15/8/2020 OK None
Set partially match with
the search section
the keyword
and click Search
searched
29
- If you already have an account or fill out the username and password in the corresponding
boxes as below, then please click login to log into the program.
30
Figure 6.2 login
- After clicking on it will appear the registration interface as shown below. Then please fill
out the information to create an account, then click sign up.
31
Figure 6.4 How to use add button
After clicking the add button the data will be added to the table as shown below
32
Figure 6.5 How to use add button
- Update click:
If you want to edit the information in the table, first click on the data you want to edit it
will appear in the information box. Ok now you can edit it done then press the update
button to finish
33
Figure 6.6 How to use update button
After clicking the update button the data will be added to the table as shown below
34
Figure 6.7 How to use update button
- Delete click
If you want to delete information in the table, firstly click on the data you want to
delete it will appear in the information box. Ok now you can finish deleting and press
the delete button to finish
35
Figure 6.8 How to use delete button
After clicking the delete button, the data will be deleted as shown below
36
Figure 6.9 How to use delete button
- Back Click:
If you want to return to the login interface please click the back button as shown below
- Exit click:
If you want exit please click the exit button as shown below
37
- Clear click:
If you want to clear information in the table information, please click the Clear button
as shown below
After clicking the clear button, the information will be clear as shown below
38
Figure 6.13 How to use clear button
39
Figure 6.13 How to use other button
After clicking on the above functions it will display information of the corresponding
tables for your selection. note the function buttons are the equivalent of the library
buttons so I won't say it again!
40
Figure 6.14 book library
41
Figure 6.15 Publisher
42
Figure 6.14 Customer
43
Figure 6.14 bill
44
VII. CONCLUSION
In summary, in this exercise, I finished writing a library management program for a university
and insert data into tables, design an interface for the program.
45
VIII. REFERENCE LIST
Thinhnotes. 2020. ERD La Gi? | Thinhnotes.Com. [online] Available at:
<https://thinhnotes.com/chuyen-nghe-ba/erd-la-gi/> [Accessed 28 July 2020].microsoft.
2020. Database Normalization Description - Office. [online] Available at:
<https://docs.microsoft.com/en-us/office/troubleshoot/access/database-normalization-
description#:~:text=Normalization%20is%20the%20process%20of,eliminating%20redundancy
%20and%20inconsistent%20dependency.> [Accessed 28 July 2020].
46