You are on page 1of 12

ASSIGNMENT 2 FRONT SHEET

Qualification TEC Level 5 HND Diploma in Computing

Unit number and title Unit 04: Database Design & Development

Date Received
Submission date
1st submission

Date Received
Re-submission Date
2nd submission

Student Name Pham Manh Quan Student ID BHAF190226

Class BH-AF-2005-2.3 Assessor name Dinh Thi Minh Nguyet

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:

Grade: Assessor Signature: Date:


Signature & Date:

2
Table of Contents
I. Introduce......................................................................................................................................................4
II. Overview of the Database design in ASM1...............................................................................................4
1. Requirement............................................................................................................................................4
2. Logical design.........................................................................................................................................4
3. Physical design........................................................................................................................................5
a. Introduction to MS SQL server...........................................................................................................5
b. Demonstration of table creation, establishing relationships, data constraints.....................................5
III. Implementation.........................................................................................................................................5
1. Insert, Update, Delete data in the database.............................................................................................5
2. Data displaying using SQL.....................................................................................................................6
3. System implementation...........................................................................................................................7
a. Connect the app to the database to access and modify data................................................................7
b. Add data to the database from the application....................................................................................7
c. Display data from database to the application.....................................................................................8
d. Update data to the database using application...................................................................................10
e. Delete data from database using application.....................................................................................10
IV. User Document.......................................................................................................................................11
V. Conclusion...............................................................................................................................................12

3
I.Introduce

In this report I will detail how to add data in database. I also associate SQL with
Visual Studio. Besides, I will guide users how to use it easily

II. Overview of the Database design in ASM1

1. Requirement

Enrolment system

- Allows to store and retrieve student information. For each student, it is necessary
to manage the following information: SV code, Full name, gender, date of birth,
place of birth, address, ID number or citizen identification, class
- Store and retrieve information about the school's subjects including subject code,
subject name, subject description, curriculum unit number, teacher's name, teacher
number, teacher recruitment date.
+ Each subject will be assigned a unique standard code by the primary school: F
*** where F is fixed. * is the number from 1 to 9.
+ Number of curriculum units are real numbers> 0 and <7.
+ Each subject can have 1-3 teachers participating in teaching
- Each time a student registers a subject, he / she will save the following
information: name, class of registered student, subject code, subject name,
semester, school year. Inside:
+ School year in the format eg 2019-2020
+ Each year there are only 2 semesters: HK1 and HK2
+ A course must not exceed 100 students, each student cannot register more than 5
subjects / semester
+ Do not register for a course twice in the same semester
- Each student has 1 account to log into the system, after successfully logging in,
students can register or view the subjects they have registered.
2. Logical design
Since I was missing an entity in the previous section, I will add more in this report

- In conclusion, the ERD for this system is

4
3. Physical design
a. Introduction to MS SQL server
- Microsoft SQL Server is an application used to create computer databases for the
Microsoft Windows family of server operating systems. Microsoft SQL Server
provides an environment used to generate databases that can be accessed from
workstations, the Internet, or other media such as a personal digital assistant
(PDA).
b. Demonstration of table creation, establishing relationships, data constraints.

- I have used a few more features as follows:


+ Identity: Automatically issue ID
+ Unique: Uniqueness does not have 2 students who have the same ID number
+ Not null: not empty

III. Implementation

1. Insert, Update, Delete data in the database


- Insert

- Update
+ Update StudentID=2

5
- Delete

2. Data displaying using SQL


- List detailed information for 1 student

- Inner join

- Order by

6
- Top

- Like

3. System implementation
a. Connect the app to the database to access and modify data
- I use Visual Studio to connect to SQL

b. Add data to the database from the application.


- Before adding, this student had to register for 3 subjects

7
- To add data I will use the following code

- And here is the result after adding it

c. Display data from database to the application


- To display the data we want, we will first create an interface that students can
input

8
- Code:

- After entering, students will see their information

9
d. Update data to the database using application
- During the course registration time, many students may want to change subjects,
so to edit information, I have the following code

- Results after update

e. Delete data from database using application.


- Many students register for the subject, but because they are too many, they want to
delete it
- For example, a student with ID = 1 wants to delete a subject

10
- Code

- And here are the results after deleting

IV. User Document

Here I will guide the usage that I created above

- First, each student will have a personal account, to enter the system students will
have to enter the correct username and password.

11
- After writing the correct username and password, the user will press the Login
button to enter the system
- Next, when entering the system, users will be shown detailed information about
themselves

- In addition, students can view and register, edit, and delete subjects that they want
or do not want

- There will be 4 buttons for users to choose from depending on the user's
requirements
+ Save button: just add new edited data
+ Delete button: delete the subject that the user does not want to learn
+ Cancel button: cancel the entered information
+ Logout button: exit out

V. Conclusion

To summarize this report, I have detailed about adding, editing, deleting data and linking SQL
with Visual Studio application. In addition, I also guide users to use the features that I create

12

You might also like