Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (5.48 MB, 25 trang )
<span class="text_page_counter">Trang 1</span><div class="page_container" data-page="1">
<b>Qualification TEC Level 5 HND Diploma in Computing </b>
<b>Unit number and title Unit 04: Database Design & Development </b>
<b>Submission date </b> 2 March 2022 <b>Date Received 1st submission</b> 2 March 2022
<b>Student Name </b> Nguyen Minh Tan <b>Student ID </b> GCS210760
<b>Class </b> GCS1001A <b>Assessor name Student declaration </b>
I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand thmaking a false declaration is a form of malpractice.
<b>Student’s signature Grading grid </b>
</div><span class="text_page_counter">Trang 3</span><div class="page_container" data-page="3"><b>Summative Feedback: Resubmission Feedback:</b>
<b>Signature & Date:</b>
</div><span class="text_page_counter">Trang 4</span><div class="page_container" data-page="4"><b>Qualification BTEC Level 5 HND Diploma in Computing </b>
<b>Unit number Unit 04: Database Design & Development Assignment title </b> Student Grading System
<b>Academic Year </b> 2022
<b>Unit Tutor </b> Nguyen Van Son
<b>Issue date </b> 2 March 2022 <b>Submission date </b> 2 March 2022
<b>IV name and date </b>
<b>Submission Format: </b>
Format: This assignment is an Individual assignment and specifically including 2 documents:
(1) sql file of your code and represent your code to your mananger (tutor) (2) a report document
You must use font Calibri size 12, set number of the pages and use multiple line spacing at 1.3. Margins must be: left: 1.25 cm; right: 1 cm; top: 1 cm and bottom: 1 cm. The reference follows Harvard referencing system. The recommended word limit is 2.000-2.500 words. You will not be penalized for exceeding the total word limit. The cover page of the report has to be the Assignment front sheet 2.
Submission Students are compulsory to submit the assignment in due date and in a way requested by the Tutors. The form of submission will be a soft copy posted on The Assignment must be your own work, and not copied by or from another student or frombooks etc. If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you must reference your sources, using the Harvard style. Make sure that you know how to reference properly, and that understand the guidelines on plagiarism. If you do not, you definitely get fail
<b>Unit Learning Outcomes: </b>
<b>LO2 Develop a fully functional relational database system, based on an existing system design. LO3 Test the system against user and system requirements. </b>
<b>LO4 Produce technical and user documentation </b>
</div><span class="text_page_counter">Trang 5</span><div class="page_container" data-page="5"><b>Assignment Brief and Guidance: </b>
You are employed as a Database Developer for a large IT consultancy company. The company has been approached by FPT university which is expanding due to the growth of the number of students. FPT is currently facing difficulties in dealing with managing the university. It decided to develop several academic
<b>systems to manage the university easier including: Online Library system, Student Grading System, Attendance System, CMS System, Scheduling System, Enrolment Systems, and so on. </b>
You are tasked to select one of those systems to develop database for FPT university. Your tasks are to: Work with FPT to find out about current requirements for each system
Analyze the requirements and produce clear statements of user and system requirements. Design a relational database system using appropriate design tools and techniques Develop a fully functional relational database system, based on an existing system design. Test the system against user and system requirements.
Produce technical and user documentation
<b>Part 2 (Assignment 2) </b>
Once the designs have been accepted by your manager you have been asked to:
1. Develop the database system using evidence of user interface, output and data validations and querying across multiple tables.
You want to include more than just the basics so you will implement a fully functional database system which will include system security and database maintenance features.
You have decided to implement a query language into the relational database system. The developed system will be demonstrated to your manager.
Your manager has asked you to include in the report:
2. Assessing whether meaningful data has been extracted through the use of query tools to produce appropriate management information.
3. Evaluating the effectiveness of the database solution in relation to user and system requirements, and suggest improvements.
4. Once the system has been developed, you will test the system and your manager will complete a witness statement indicating how your tests are performing against user and system requirements. You will produce a brief report assessing the effectiveness of the testing, including an explanation of the choice of test data used.
5. Lastly you will produce technical and user documentation which will be given to the company. You want to provide some graphical representations for ease of reference in the technical guide, so you have decided to produce a technical and user documentation for a fully functional system, including diagrams showing movement of data through the system, and flowcharts describing how the system works.
</div><span class="text_page_counter">Trang 6</span><div class="page_container" data-page="6"><b>Learning Outcomes and Assessment Criteria </b>
<b>LO2 </b>Develop a fully functional relational database system, based on an existing system design.
<b>LO3 </b>Test the system against user and system requirements.
<b>LO4 Produce technical and user documentation </b>
<b>P2</b> Develop the database system with evidence of user interface, output and data validations, and querying across multiple tables.
<b>P3</b> Implement a query language into the relational database
<b>system. </b>
<b>M2</b> Implement a fully functional database system which includes system security and database maintenance.
<b>M3</b> Assess whether meaningful data has been extracted through the use of query tools to produce appropriate
<b>management information. </b>
<b>LO2 & 3 </b>
<b>D2</b> Evaluate the effectiveness of the database solution in relation to user and system requirements, and suggest improvements.
<b>P4</b> Test the system against user and system requirements.
<b>M4</b> Assess the effectiveness of the testing, including an explanation of the choice of test data used.
<b>P5</b> Produce technical and user
<b>documentation. </b>
<b>M5</b> Produce technical and user documentation for a fully functional system, including ER Diagram and normalization statements and
<b>describing how the system works. </b>
<b><small>D3</small></b><small> Assess any future improvements that may be required to ensure the continued effectiveness of the database system.</small>
</div><span class="text_page_counter">Trang 7</span><div class="page_container" data-page="7"><b><small>Chapter 1 - Develop the database system ... 1 </small></b>
<b><small>1.1. Final Mock-up of the application: ... 1 </small></b>
<b><small>1.1.1. Application: ... 1 </small></b>
<b><small>1.1.2. ERD: ... 2 </small></b>
<b><small>1.1.3. Physical Design: ... 3 </small></b>
<b><small>1.1.4. User Interface: ... 4 </small></b>
<b><small>1.2 Queries to create database with results: ... 5 </small></b>
<b><small>Chapter 2 Produce queries ... 8 </small></b><small>–</small>
<b><small>2.1 Queries to INSERT data with illustrations of final result: ... 8 </small></b>
<b><small>2.2 Queries to UPDATE data with illustrations of final result: ... 9 </small></b>
<b><small>2.3 Queries to DELETE data with illustrations of final result: ... 11 </small></b>
<b><small>2.4 Queries to SELECT data with illustrations of final result: ... 12 </small></b>
<b><small>2.5 Advanced queries: Stored procedures, triggers, functions: ... 14 </small></b>
<b><small>2.6 Evaluate the effectiveness of the database solution: ... 15 </small></b>
<b><small>Chapter 3 Test the system ... 16 </small></b><small>–</small>
<b><small>3.1 Test cases: ... 16 </small></b>
<b><small>REFERENCES ... 17 </small></b>
</div><span class="text_page_counter">Trang 8</span><div class="page_container" data-page="8">Page 1
<b>1.1. Final Mock-up of the application: 1.1.1. Application: </b>
- The application that I used for designing the Grading System is the Microsoft SQL Server 2019 Express, a free, feature-rich version of SQL Server that may be used to study, create, and execute desktop, web, and small server applications, as well as for redistribution by independent software suppliers (ISVs).
</div><span class="text_page_counter">Trang 9</span><div class="page_container" data-page="9">Page 2
<b>1.1.2. ERD: </b>
- In order to meet the requirements, the ERD that I design must have the following entities and attributes as those entities and attributes are absolutely appropriate for being parts of the Grading System that the FPT University ever needed.
- Here are the entities and attributes that I had mentioned above:
<b>Student(studentID, classID, Name, Email, Phonenumber, Major, Course, Address) </b>
It stores the information of students.
<b>Class(classID, testID, Totalamount, Course) </b>
It stores the information of classes.
<b>Test(testID, Subject, Type, Duration, Date) </b>
It stores the information of tests.
<b>Test Detail(testdetailID, studentID, testID, Grade) </b>
It stores the information of tests9 details.
</div><span class="text_page_counter">Trang 10</span><div class="page_container" data-page="10">Page 3
<b>1.1.3. Physical Design: </b>
- In order to meet the requirements, the Physical design that I design must have the following tables and rows as those tables and rows are absolutely appropriate for being parts of the Grading System that the FPT University ever needed.
- Here are the tables and rows that I had mentioned above:
Unique
Foreign key Name Varchar(50) No Null N/A Phonenumber Int No Null,
Unique, Must > 0
N/A Major Varchar(50) No Null N/A Course Varchar(50) No Null N/A Address Varchar(50) No Null N/A
Unique
Foreign key Total amount Int No Null,
Must > 0 N/A Course Varchar(50) No Null N/A
<b>Table: Test Detail </b>
<b>Field name Data type Property Description testdetailID </b> Varchar(3) No Null,
Unique
Primary key studentID Varchar(10) No Null,
Unique <sup>Foreign key </sup>testID Varchar(3) No Null,
Unique <sup>Foreign key </sup>
</div><span class="text_page_counter">Trang 12</span><div class="page_container" data-page="12">Page 5
<b>1.2 Queries to create database with results: </b>
- Firstly, I created the database called 8Student_Grading_System9 and then I typed the command to use it.
+ This is the system before I create the database:
+ This is the system after I had created the database:
- Then I started creating relevant tables, the first one is the table called 8Student9, this table contains the information of students.
</div><span class="text_page_counter">Trang 13</span><div class="page_container" data-page="13">Page 6
- The next table I created is the table called 8Class9, this table stores the information of classes.
- The third table that I created is the table called 8Test9, so this table contains the information of tests that the students will be taken.
- The last table that I created is the table called 8TestDetail9, this is the table that stores all the tests9 details from the tests that the students had taken.
</div><span class="text_page_counter">Trang 14</span><div class="page_container" data-page="14">Page 7
- After I had created all the essential tables, I then created the Database Diagram.
+ Step 1: I find the term 8Database Diagrams9 in the 8Student_Grading_System9 database, I then right-clicked it to find the button called 8New Database Diagram9 and left-click it.
+ Step 2: After adding all the tables, I reorganized them and finished creating the database diagram.
</div><span class="text_page_counter">Trang 15</span><div class="page_container" data-page="15">Page 8
<b>2.1 Queries to INSERT data with illustrations of final result: </b>
- So about the data insertion, I had inserted data into the four tables that I had created before. + The first one is the table 8Student9:
+ The next one is the table 8Class9:
</div><span class="text_page_counter">Trang 16</span><div class="page_container" data-page="16">Page 9
+ The third table that I inserted data into is the table 8Test9:
+ The last table to be inserted data into is the table called 8TestDetail9:
</div><span class="text_page_counter">Trang 17</span><div class="page_container" data-page="17">Page 10
<b>2.2 Queries to UPDATE data with illustrations of final result: </b>
- So about the data updating, I had used the function 8update9 to update the table 8Student9, particularly, I had set the column 8Name9 to be Nguyen Ngoc Van Anh and the column 8 9 8classID9 to be 8GCS5007B9whenever the column 8studentID9 is 8GCS2101239.
- The codes:
- The result is that one column has been affected:
</div><span class="text_page_counter">Trang 18</span><div class="page_container" data-page="18">Page 11
<b>2.3 Queries to DELETE data with illustrations of final result: </b>
- So in this data deletion, I have used this function in table 8TestDetail9 for deleting away whole row if there was an 8F9 in the column 8Grade . 9
- The codes:
- The result is that there were three columns being affected:
- I have select * from TestDetail again and the result given out was that the three 8 9 8Grade9 columns that has 8F9 had made the corresponding rows to be deleted:
(7 rows remaining)
</div><span class="text_page_counter">Trang 19</span><div class="page_container" data-page="19">Page 12
<b>2.4 Queries to SELECT data with illustrations of final result: </b>
- About the data selection, I have simply used function select * from 8 …9 for the 4 tables 8Student9, 8Class , Test and TestDetail . 9 8 9 8 9
- First one to be selected is the table 8Student9:
- The next one being selected is the table called 8Class9:
</div><span class="text_page_counter">Trang 20</span><div class="page_container" data-page="20">Page 13
- The third table that I selected data from is the table 8Test9:
- The last table that was selected data from is the table called 8TestDetail9:
</div><span class="text_page_counter">Trang 21</span><div class="page_container" data-page="21">Page 14
<b>2.5 Advanced queries: Stored procedures, triggers, functions: </b>
</div><span class="text_page_counter">Trang 22</span><div class="page_container" data-page="22">Page 15
<b>2.6 Evaluate the effectiveness of the database solution: </b>
</div><span class="text_page_counter">Trang 23</span><div class="page_container" data-page="23">- I then fixed the error by simply replaced the with to make it appropriate for the codes: 8;9 8 9,
</div><span class="text_page_counter">Trang 24</span><div class="page_container" data-page="24">Page 17
1. SQL FOREIGN KEY Constraint. 2022. SQL FOREIGN KEY Constraint. [ONLINE] Available at: [Accessed 02 March 2022].
2. Stored Query Expressions. 2022. Stored Query Expressions. [ONLINE] Available at: [Accessed 02 March 2022].
3. SQL DELETE Statement. 2022. SQL DELETE Statement. [ONLINE] Available at: [Accessed 02 March 2022]. 4. SQL UPDATE Statement. 2022. SQL UPDATE Statement. [ONLINE] Available at:
[Accessed 02 March 2022].
5. SQL Tutorial. 2022. SQL Tutorial. [ONLINE] Available at:
[Accessed 02 March 2022]. 6. WilliamDAssafMSFT. 2022. Rename a Database - SQL Server | Microsoft Docs.
[ONLINE] Available at: databases/databases/rename-a-database?view=sql-server-
[Accessed 02 March 2022].
7. WilliamDAssafMSFT. 2022. Delete columns from a table - SQL Server | Microsoft Docs. [ONLINE] Available at: [Accessed 02 March 2022].
</div><span class="text_page_counter">Trang 25</span><div class="page_container" data-page="25">Page 18
8. SearchDataManagement. 2022. What is Microsoft SQL Server? A definition from WhatIs.com. [ONLINE] Available at:
[Accessed 02 March 2022].
9. Creating stored queries. 2022. Creating stored queries. [ONLINE] Available at: [Accessed 02 March 2022].
10. w3resource. 2022. MySQL Triggers - w3resource. [ONLINE] Available at: [Accessed 02 March 2022].
11. SQL Shack - articles about database auditing, server performance, data recovery, and more. 2022. How to use SQL Server built-in functions and create user-defined scalar functions. [ONLINE] Available at: [Accessed 02 March 2022].
12. SQL SELECT Statement. 2022. SQL SELECT Statement. [ONLINE] Available at: [Accessed 02 March 2022].
</div>