Professional Documents
Culture Documents
04 DDD - Assignment Brief 2
04 DDD - Assignment Brief 2
04 DDD - Assignment Brief 2
Issue date 23th February 2021 Submission date 10th March 2021
Submission Format:
LO2 Develop a fully functional relational database system, based on an existing system design.
LO3 Test the system against user and system requirements.
LO4 Produce technical and user documentation
Page 1
You are employed as a Database Developer for a large IT consultancy company namely CST. Your company
has many projects in many fields. And now, with your new position you need to develop several systems
for CST such as: Online Library system, Student Grading System, Online shopping system,
HealthCare system, ...And CST wants to develop some new systems to start up from any staff’s idea in
CST.
You are tasked to select one of those systems to develop database for CST or choose a new one. Your tasks
are to:
Work with CST 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
Part 2 (Assignment 2)
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.
Page 2
Learning Outcomes and Assessment Criteria
LO2 Develop a fully functional relational database system, based on an existing system design.
LO3 Test the system against user and system requirements.
LO4 Produce technical and user documentation
P5 Produce technical and user M5 Produce technical and user D3 Assess any future improvements that
documentation. documentation for a fully functional may be required to ensure the continued
effectiveness of the database system.
system, including ER Diagram and
normalization statements and
describing how the system works.
Page 3
Table of content
Answer .............................................................................................................................................................. 6
1. Develop the database system ..................................................................................................................... 6
1.1. User interface ...................................................................................................................................... 6
1.1.1. Student Login Page ...................................................................................................................... 6
1.1.2. Student Register Page .................................................................................................................. 7
1.1.3. First page of online examination ................................................................................................. 8
1.1.4. Examination page ........................................................................................................................ 9
1.1.5. User login page .......................................................................................................................... 10
1.1.6. Add question page ..................................................................................................................... 11
1.2. Output Database ................................................................................................................................ 12
1.3. Data Validation ................................................................................................................................. 15
2. Query language ........................................................................................................................................ 18
2.1. Insert data .......................................................................................................................................... 19
2.2. Update data ....................................................................................................................................... 20
2.3. Delete data......................................................................................................................................... 21
2.4. Advanced queries .............................................................................................................................. 22
3. Test log .................................................................................................................................................... 23
3.1. Command .......................................................................................................................................... 23
3.2. Testing ............................................................................................................................................... 24
4. Technical and user document .................................................................................................................. 26
4.1. The instruction for installing the database ........................................................................................ 26
4.2. The instruction for updating and deleting record from table ............................................................ 29
4.3. The instructions for getting data form database ................................................................................ 31
5. Document Control ................................................................................................................................... 34
6. References................................................................................................................................................ 35
Page 4
Table of figure
Figure 1: Download SQL Server management studio 19 ................................................................................ 27
Figure 2: Installing SQL Server management studio 19 ................................................................................. 27
Figure 3: Connect to SQL Server instance ...................................................................................................... 28
Figure 4: Connect to SQL Server instance done ............................................................................................. 28
Figure 5: SQL Query ....................................................................................................................................... 29
Figure 6: Database ........................................................................................................................................... 29
Figure 7: Table ................................................................................................................................................. 30
Figure 8: Edit top 200 row ............................................................................................................................... 31
Page 5
Answer
1. Develop the database system
Page 6
1.1.2. Student Register Page
Page 7
1.1.3. First page of online examination
Page 8
1.1.4. Examination page
Page 9
1.1.5. User login page
Page 10
1.1.6. Add question page
Page 11
1.2. Output Database
Field name: dbo.Users
Page 12
Field name: dbo.Students
Page 13
Field name: dbo.ExamResults
Page 14
1.3. Data Validation
SQL constraints are used to specify rules for the data in a table.
Constraints are used to limit the type of data that can go into a table. This ensures the accuracy and reliability
of the data in the table. If there is any violation between the constraint and the data action, the action is
aborted.
Page 15
➢ I used constraint to limit data that user can create maximum is 5000 accounts for this table.
➢ I used constraint to limit data that user can create maximum is 1000 groups for this table.
➢ I used constraint to limit data that can create maximum is 2000 exams and each exam can create
minimum 1 minutes and maximum 280 minutes to finish this examination into table.
Page 16
➢ I used constraint to limit data that user can create maximum is 10000 students and check this student
is above 16 ages for this table.
➢ I used constraint to limit data that user can create maximum is 20 questions and check this question
has 4 answers for this table.
➢ I used constraint to limit data that check this question has 4 answers for this table.
Page 17
2. Query language
In this section, we create stored procedure with INSERT, SELECT, UPDATE AND DELECT query. With
one statement, thus we can save time to add new rows, update values or delete records from database.
Page 18
2.1. Insert data
We insert fulfill the data in the required fields. And @StatementType is Insert.
And we select data from Users then we see a new row added to database table.
Page 19
2.2. Update data
After that, if we see any name or any value wrong is this database table. We use update statement as below:
Page 20
2.3. Delete data
For deleting database, we check Users table with UserID = 17235 and we do not need to fill values in this
required fields but we need to enter some values if we cannot remember.
And we check Users table following deleted data where id is 17235, it does not exist.
Page 21
2.4. Advanced queries
QUERY 1: SELECT * FROM Question_Answer
It lists the details of the students including students' names, username, password, age and contact.
It has changed the id of the exam with question_answer ID 10 from ‘5001' to ‘5002'.
Page 22
3. Test log
3.1. Command
Set 1: INSERT INTO Users
VALUES
RETURNS bit as
BEGIN
DECLARE @bitRetVal as Bit
IF (@EMAIL <> '' AND @EMAIL NOT LIKE '_%@__%.__%')
SET @bitRetVal = 0 -- Invalid
ELSE
SET @bitRetVal = 1 -- Valid
RETURN @bitRetVal
END
Page 23
3.2. Testing
Test What is being How Test Expected Date Actual Action
tested data Result results taken
TC1 Add new user Enter data from Set 1 The user March Ok None
data capture sheet was stored 7, 2021
into insert into the
database
TC2 Show list of Select all users in Set 2 Show all March Ok None
users the Users table with values Uses 7, 2021
query Select
TC4 Delete Delete the User Set 4 Delete User March Ok None
UserID = with id 18223 with id 7, 2021
18223 18223
TC5 Show Name Use the query Set 5 The result March Ok None
and Select to show will show 7, 2021
UserName of Name and Name and
Students UserName of UserName
having Age Students having of Students
<= 21 Age <= 21 having Age
<= 21
TC6 Add new Enter data from Set 6 Data cannot March Ok None
Students data capture sheet store 7, 2021
having Age < into insert because
16 statement
conflicted
with the
CHECK
constraint
Page 24
TC7 Order of input Enter data from Set 1 Data entry March Ok None
on data entry data capture sheet order is the 7, 2021
screen into the form on the same as that
data entry screen on the data
capture
sheet
TC8 Validation of Enter typical Set 7 Good data March Email not Recode,
input values, boundary accepted; 7, 2021 validating add
value, values that bad data constraint
should be rejected rejected and re-test
Testing has been done in parallel with database development and execution. The stage of the testing process
has been described below.
• During the database design process, it is checked whether the business rules and data integrity
constraints are preserved, normalization is performed properly or not. and whether functions are
preserved after normalization.
• Then during database development and implementation, the code was checked for typos. Once the
database has been developed, the data is carefully inserted according to business rules, user
requirements, and data integrity constraints.
• Finally, during query execution, it is checked to see if there are all tables in the database, are all the
tables filled with matching records or not, the data is enough to check it or not.
• Followed by a table containing details about the use cases. It helps to make a detailed comparison of
the expected and actual results of the different use cases, and comments are also added to indicate
whether the results match.
Page 25
4. Technical and user document
1. Download SQL Server 2019 express edition in the internet - (Link: https://www.microsoft.com/en-
us/sql-server/sql-server-downloads )
Page 26
Figure 1: Download SQL Server management studio 19
2. Installing SQL Server management studio 19 and connect with relational database management
system to work on it.
Page 27
3. Using SA user that you have chosen during the installation in SQL Server management studio 19 to
connect to SQL Server instance.
1) In the left side of the interface, it has a window which name “object explorer”. Clicking on the
“Examination_Online” database.
Figure 6: Database
4) Choose the choice “edit top 200 row” to add or remove data.
Page 30
Figure 8: Edit top 200 row
Page 31
For example: Select * from Users
From many tables: In the query, please enter some the code below:
For example, 1:
Page 32
2/ Select [column], [column], etc. From [ table name] as ….
For example, 2:
Page 33
5. Document Control
Title: Examination Online System
Issue: Issue 1
March 7, 2021 Issue 1 Draft Nguyen Duc Hoang First complete draft
1
March 8, 2021 Issue 1 Draft Nguyen Duc Hoang Review and update
2
March 8, 2021 Issue 1 Draft Nguyen Duc Hoang Review and Submit
3
Page 34
6. References
[1] SQL Server Tutorial. 2021. SQL Server Views - Learn about Views in SQL Server. [online] Available at:
<https://www.sqlservertutorial.net/sql-server-views/> [Accessed 6 March 2021].
[2] Sites.google.com. 2021. Chapter 4- Purpose, Scope and Applicability - Online Examination Synopsis.
[online] Available at: <https://sites.google.com/site/mcabcaprojectandsynopsis/purpose-scope-and-
applicability> [Accessed 6 March 2021].
Page 35