Docsity

Assignment 1 Database., Assignments of Database Programming

Toggle sidebar
bg1
ASSIGNMENT 1 FRONT SHEET
Qualification TEC Level 5 HND Diploma in Computing
Unit number and title Unit 04: Database Design & Development
Submission date 31/10/2021 Date Received 1st submission
Re-submission Date Date Received 2nd submission
Student Name Pham Duc Phu Trong Student ID
Class GCH0907 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.
Student’s signature Trọng
Grading grid
P1 M1 D1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download Assignment 1 Database. and more Assignments Database Programming in PDF only on Docsity!

ASSIGNMENT 1 FRONT SHEET

Qualification TEC Level 5 HND Diploma in Computing

Unit number and title Unit 04: Database Design & Development

Submission date 31 /10/2021 Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name Pham Duc Phu Trong Student ID

Class GCH0907 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.

Student’s signature Trọng

Grading grid

P1 M1 D

❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:

Signature & Date:

  • I. Introduction:.............................................................................................................................................................................................................
  • II. Statement of user and system requirements:..........................................................................................................................................................
      1. Overview about the problem:..............................................................................................................................................................................
      1. Requirements of the application:.........................................................................................................................................................................
      • 2.1. Business process:..........................................................................................................................................................................................
      • 2.2 Requirements:................................................................................................................................................................................................
        • 2.2.1 Functional requirements:........................................................................................................................................................................
        • 2.2.2 Statistical report:.....................................................................................................................................................................................
  • II. Design the relational database system....................................................................................................................................................................
      1. Analyze the requirements:...................................................................................................................................................................................
      1. Database design with explanations:.....................................................................................................................................................................
      1. Review whether the database is normalized:....................................................................................................................................................
      1. List of tables:......................................................................................................................................................................................................
      • 4.1 Physical design:............................................................................................................................................................................................
      • 4.2 Table Adding Information:...........................................................................................................................................................................
      • 4.3 Data validation:............................................................................................................................................................................................
      • 4.4 Wireframe of the application.......................................................................................................................................................................
  • III. Evaluation:............................................................................................................................................................................................................
  • IV. Conclusion:...........................................................................................................................................................................................................
  • Table 1: Entity Employee...........................................................................................................................................................................................
  • Table 2: Entity Teacher..............................................................................................................................................................................................
  • Table 3: Entity Class...................................................................................................................................................................................................
  • Table 4: Entity student...............................................................................................................................................................................................
  • Table 5: Entity subject................................................................................................................................................................................................
  • Table 6: Entity grade..................................................................................................................................................................................................
  • Table 7: Employee......................................................................................................................................................................................................
  • Table 8: Teacher.........................................................................................................................................................................................................
  • Table 9: Class.............................................................................................................................................................................................................
  • Table 10: Student.......................................................................................................................................................................................................
  • Table 11: Subject........................................................................................................................................................................................................
  • Table 12: Grade..........................................................................................................................................................................................................
  • Table 13: Data Validation...........................................................................................................................................................................................
  • Figure 1:Logical Design: Entity relationship diagram...................................................................................................................................................

I. Introduction:

Data management is an important issue that businesses and investors in many fields always put on top. Therefore, they need a solution

to fully and securely store information. And the most suitable solution must be mentioned to the database. In this report, a scenario

will be given asking students to solve them with knowledge related to the database including: problem overview, application or system

requirements, analysis requirements, design a database based on the requirements and follow the rules in database normalization and

finally evaluate the system.

II. Statement of user and system requirements:

1. Overview about the problem:

In this exercise, students are given the role of a database developer in a specific situation. They need to be exposed to the huge amount

of information coming from FPT Education as the number of students enrolling is increasing rapidly. Specifically, the school's

information management system is overloaded due to difficulties in storing grade students' assignments because the number of

assignments and memory capacity of each lesson is too large. The job of a database developer is to create a database to manage an

archive of student information and scores for assignments after they are graded.

2. Requirements of the application:

2.1. Business process:

When the system starts, employees will make schedule for both of students and teachers. In other words, employees will separate

students into specific class and teachers will have the timetable corresponding to subjects and classes. This system will connect to

another system is "assignments storage system". When students finished their assignment, the works will be saved in assignments

ClassID Class Name EmployeeID

GCH0901 Valorant E

GCH0901 Leage Of Legend E

GCH0901 CSGO E

GCH0901 Pikachu E

SubjectID Status TeacherID

1620 Started GCH

1620 Started GCH

1620 Started GCH

1620 Started GCH

StudentID FirstName LastNam

e

Campus Date Of

Birth

Gender Phone number Email ClassID StudentID

GCH200001 Phú Trọng Hà Nội 2002-06-29 Male 0000000007 [email protected] GCH0901 GCH

GCH200002 Mạnh Tùng Yên Bái 2002-01-23 Male 0000000008

[email protected] GCH0901 GCH

GCH200003 Quốc Việt Cẩm Phả 2002-02-15 Male 0000000009 [email protected] GCH0902 GCH

GCH200004 Đức Hưng Hà Nội 2002-03-14 Male 0000000010 [email protected] GCH0902 GCH

GCH200005 Anh Quân Hà Nội 2002-06-24 Male 0000000011

[email protected] GCH0903 GCH

GCH200006 Lê Duy Hà Nội 2002-08-21 Male 0000000012

[email protected] GCH0903 GCH

GCH200007 Hương Lan Hà Nội 2002-09-15 Male 0000000013 [email protected] GCH0904 GCH

GCH200008 Thúy Hiền Hà Nội 2002-11-11 Male 0000000014

[email protected] GCH0904 GCH

StudentID TeacherID SubjectID Assignment 1 Assignment 2 Final result StudentID

GCH200001 GCH000001 1620 7 7.5 7.25 GCH

GCH200002 GCH000001 1620 6 7 6.5 GCH

GCH200003 GCH000002 1621 5 7 6 GCH

GCH200004 GCH000002 1621 6 7 6.5 GCH

GCH200005 GCH000003 1622 0 0 0 GCH

GCH200006 GCH000003 1622 0 0 0 GCH

GCH200007 GCH000004 1623 9 9 9 GCH

GCH200008 GCH000004 1623 9 8 8.5 GCH

II. Design the relational database system

1. Analyze the requirements:

_ List of data should be stored:

  • Employee information: Employee ID, first name, last name, phone number, email.

  • Teacher information: Teacher ID, first name, last name, phone number, email.

  • Class information: Class ID, class name.

  • Subject information: Subject ID, Status.

  • Student information: Student ID, first name, last name, campus, date of birth, gender, email, phone number.

  • Grade: ID, Assignment 1, Assignment 2, final result.

_ List of entities: Employee, Teacher, Class, Subject, Student, Grade.

  • Class entity: Classes will consist of students arranged by staff. Students will be able to know their class name and class code to

participate and or have a request for employees to change class.

  • Teacher entity: Teacher is the person who will grade each of assignment for students. Their information like: email and phone

number use to connect with students to help and give request.

  • Subject entity: Each teacher will be in charge of one or more subjects for a period of time. They will need to know what subject they

will be teaching and at what time through the subject ID and the status of started or not started.

  • Student entity: Once a student is placed in a class, they will have the right to request a change of class or update their personal

information by contacting staff or simply storing the student's information so that it can be checked. check in the future. Besides,

student information will help teachers easily find students and can interact or communicate with students easily.

  • Grade entity: Grades are an indispensable thing to assess a student's ability after a learning process. There will be 2 exercises

corresponding to 2 types of students' scores. After that will be the final score showing the final result of the student. Students can view

their grades and the teacher will update the student's scores.

_ Explanation about the relationship between each of table together:

  • Employee and class: because of FPT school have many students, therefore all of students must be divided to a particular class to

manage. And employee will have the mission to make schedule for student. One employee can make schedule or separate for many

students.

  • Employee and teacher: similar with students, teacher will be the person who teaches student. Each of class will have one teacher

mange. And employee will make timetable for teacher. One employee can manage and make timetable for many teachers.

  • Class and student: Of course, class will have many students and all of students will have only one class for the duration of their

schooling and will remain unchanged.

  • Teacher and subject: This relationship shows that each teacher has the ability and knowledge to teach many subjects.

  • Student and grade: One student can have many grades; it depends on how many assignments that they have to do. In addition,

students can see their scores to assess the result.

  • Teacher with grade: teacher have to assess and give grade for each of assignment. One teacher can grade for many assignments.

After grading process is done, teacher will update the result into the system.

  • Subject with grade: One subject will contain many grades and result of student. System will save all of grades in particular subject to

help the finding process is simpler.

3. Review whether the database is normalized:

_ First normal form: in this database, each of record has one and only one value in all of table, does not exist any record has multi-

values. Therefore, this database has passed the first normal form.

_ Second normal form:

At the table employee, teacher, class, student, subject has one primary key. Therefore, all of this table in list above have passed the

second normal form.

At the table grade, the primary key is StudentID, TeacherID, SubjectID.

StudentID, TeacherID, SubjectID -> Assignment 1, Assignment 2, final result.

Clearly, these three attributes are all dependent and have no partial dependencies. This means that they depend entirely on the primary

key. Therefore, all of tables have passed the second normal form.

_Third normal form:

Continuing to look at the grade table, we see that this table has a primary key is StudentID, TeacherID, SubjectID.:

StudentID, TeacherID, SubjectID -> Assignment 1

StudentID, TeacherID, SubjectID -> Assignment 2

There are no question that primary key identify Assignment 1 and Assignment 2. But from Assignment 1 and Assignment 2, we can

identify final result. But in fact, we can break the standard in order to help the query process and give results faster. Therefore, in this

database it will be possible to allow the "final result" attribute to be defined without going through a third standard.

StudentID Char(9)

FirstName Nvarchar(10)

LastName Nvarchar(10)

Campus Nvarchar(10) x

Date of birth Date x

Gender Varchar(6) x

Phone number Char(10) x

Email Varchar(50) x

ClassID Char(7)

Table 5 : Entity subject

Column Name Datatype Allow nulls

SubjectID Int

Status varchar(20) x

TeacherID Char(9)

Table 6 : Entity grade

Column Name Datatype Allow nulls

StudentID Char(9)

TeacherID Char(9)

SubjectID Int

Assignment 1 Float

Assignment 2 Float

Final result Float

4.2 Table Adding Information:

Table 7 : Employee

EmployeeID FirstName LastName Phone number Email

E0001 Minh Trí 0000000001

[email protected]

E0002 Minh Quân 0000000002 [email protected]

Table 8 : Teacher

TeacherID FirstName LastName Phone number Email EmployeeID

GCH000001 Lan Chi 0000000003

[email protected] E

GCH000002 Minh Thu 0000000004 [email protected] E

GCH000003 Minh Phương 0000000005 [email protected] E

GCH000004 Quỳnh Anh 0000000006

[email protected] E

Table 9 : Class

ClassID Class Name EmployeeID

GCH0901 Valorant E

GCH0901 Leage Of Legend E

GCH0901 CSGO E

GCH0901 Pikachu E

Table 10 : Student

StudentID FirstName LastNam

e

Campus Date Of Birth Gender Phone number Email ClassID

GCH

Phú Trọng Hà Nội 2002-06-29 Male 0000000007

[email protected] GCH

GCH

Mạnh Tùng Yên Bái 2002-01-23 Male 0000000008

[email protected] GCH

GCH

Quốc Việt Cẩm Phả 2002-02-15 Male 0000000009 [email protected] GCH

GCH

Đức Hưng Hà Nội 2002-03-14 Male 0000000010 [email protected] GCH

GCH

Anh Quân Hà Nội 2002-06-24 Male 0000000011 [email protected] GCH

GCH20000 Lê Duy Hà Nội 2002-08-21 Male 0000000012 [email protected] GCH

Email Nvarchar(50) X Like ‘%@fpt.edu.vn’

Date Of Birth Date < getdate()

EmployeeID Char(4) Like ‘E [0-9] [0-9] [0-9]’

ClassID Char(7) Like ‘G_H[0-9] [0-9] [0-9] [0-9]’

TeacherID Char(9) Like ‘G_H[0-9] [0-9] [0-9] [0-9] [0-9]

[0-9]’

StudentID

4.4 Wireframe of the application