You are on page 1of 78

Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)

INTERNAL VERIFICATION – ASSESSMENT DECISIONS

Programme title BTEC HND in Computing

Assessor Dileepa Mihiranga Internal Verifier


Unit 04: Database Design & Development
Unit(s)
Database Solution for Polly Pipe
Assignment title

Student’s name Mahinsa Mewanthaka Jayawickrama


List which assessment criteria Pass Merit Distinction
the Assessor has awarded.

INTERNAL VERIFIER CHECKLIST

Do the assessment criteria awarded match


those shown in the assignment brief? Y/N

Is the Pass/Merit/Distinction grade awarded


justified by the assessor’s comments on the Y/N
student work?

Has the work been assessed


Y/N
accurately?
Is the feedback to the student:
Give details:
• Constructive? Y/N
• Linked to relevant assessment criteria? Y/N
• Identifying opportunities for Y/N
improved performance?
• Agreeing actions? Y/N
Does the assessment decision need
Y/N
amending?

Assessor signature Date

Internal Verifier signature Date


Programme Leader signature (if required)
Date

Confirm action completed


Remedial action taken
Give details:

Assessor signature Date

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~1~


Internal Verifier
Date
signature
Programme Leader
Date
signature (if required)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~2~


Higher Nationals - Summative Assignment Feedback Form
Student Name/ID Mahinsa Mewanthaka Jayawickrama / e130849

Unit Title Unit 04: Database Design & Development

Assignment Number 1 Assessor Dileepa Mihiranga


24/06/2022 Date Received 24/06/2022
Submission Date
1st submission
Date Received 2nd
Re-submission Date
submission
Assessor Feedback:
LO1 Use an appropriate design tool to design a relational database system for a substantial problem
Pass, Merit & Distinction P1 M1 D1
Descripts

LO2 Develop a fully functional relational database system, based on an existing system design
Pass, Merit & Distinction P2 P3 M2 M3 D2
Descripts

LO3 Test the system against user and system requirements.


Pass, Merit & Distinction P4 M4 D2
Descripts

LO4 Produce technical and user documentation.


Pass, Merit & Distinction P5 M5 D3
Descripts

Grade: Assessor Signature: Date:

Resubmission Feedback:

Grade: Assessor Signature: Date:

Internal Verifier’s Comments:

Signature & Date:

* Please note that grade decisions are provisional. They are only confirmed once internal and external moderation has taken

place and grades decisions have been agreed at the assessment board.

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~3~


Assignment Feedback
Formative Feedback: Assessor to Student

Action Plan

Summative feedback

Feedback: Student to Assessor


I got a lot of help from my teacher, and he helped me happily.

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~4~


Assessor Date
signature
mahinsamewanthaka@gmail.com 24/06/2022
Student Date
signature

Pearson Higher Nationals in


Computing
Unit 04: Database Design & Development
Assignment 01

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~5~


General Guidelines

1. A Cover page or title page – You should always attach a title page to your assignment. Use
previous page as your cover sheet and make sure all the details are accurately filled.
2. Attach this brief as the first section of your assignment.
3. All the assignments should be prepared using a word processing software.
4. All the assignments should be printed on A4 sized papers. Use single side printing.
5. Allow 1” for top, bottom , right margins and 1.25” for the left margin of each page.

Word Processing Rules

1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Use 1.5 line spacing. Left justify all paragraphs.
3. Ensure that all the headings are consistent in terms of the font size and font style.

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~6~


4. Use footer function in the word processor to insert Your Name, Subject, Assignment No,
and Page Number on each page. This is useful if individual sheets become detached for
any reason.
5. Use word processing application spell check and grammar check function to help editing
your assignment.

Important Points:

1. It is strictly prohibited to use textboxes to add texts in the assignments, except for the
compulsory information. eg: Figures, tables of comparison etc. Adding text boxes in the
body except for the before mentioned compulsory information will result in rejection of
your work.
2. Carefully check the hand in date and the instructions given in the assignment. Late
submissions will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
6. If you are unable to hand in your assignment on time and have valid reasons such as
illness, you may apply (in writing) for an extension.
7. Failure to achieve at least PASS criteria will result in a REFERRAL grade .
8. Non-submission of work without valid reasons will lead to an automatic RE FERRAL. You
will then be asked to complete an alternative assignment.
9. If you use other people’s work or ideas in your assignment, reference them properly using
HARVARD referencing system to avoid plagiarism. You have to provide both in-text
citation and a reference list.
10. If you are proven to be guilty of plagiarism or any academic misconduct, your grade
could be reduced to A REFERRAL or at worst you could be expelled from the course

Student Declaration

I hereby, declare that I know what plagiarism entails, namely to use another’s work and to
present it as my own without attributing the sources in the correct form. I further understand
what it means to copy another’s work.

1. I know that plagiarism is a punishable offence because it constitutes theft.


2. I understand the plagiarism and copying policy of Edexcel UK.
3. I know what the consequences will be if I plagiarise or copy another’s work in any of the
assignments for this program.

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~7~


4. I declare therefore that all work presented by me for every aspect of my program, will be
my own, and where I have made use of another’s work, I will attribute the source in the
correct way.
5. I acknowledge that the attachment of this document signed or not, constitutes a binding
agreement between myself and Pearson, UK.
6. I understand that my assignment will not be considered as submitted if this document is
not attached to the assignment.

mahinsamewanthaka@gmail.com
24/06/2022

Student’s Signature: Date:


(Provide E-mail ID) (Provide Submission Date)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~8~


Higher National Diploma in Computing
Assignment Brief
Student Name /ID Number Mahinsa Mewanthaka Jayawickrama / e130849

Unit Number and Title Unit 4: Database Design & Development

Academic Year 2021/22

Unit Tutor Dileepa Mihiranga

Assignment Title Data base system for Polly Pipe

Issue Date 25/01/2022

Submission Date 24/06/2022

IV Name & Date

Submission format

Part 1: The submission should be in the form of an individual written report written in a concise,
formal business style using single spacing and font size 12. You are required to make use of
headings, paragraphs and subsections as appropriate, and all work must be supported with
research and referenced using Harvard referencing system. Please also provide in-text citation
and bibliography using Harvard referencing system. The recommended word limit is 3,000–
3,500 words, although you will not be penalised for exceeding the total word limit.
Part 2: The submission should be in the form of a fully functional relational database system
demonstrated to the Tutor; and an individual written report (please see details in Part 1 above).
Part 3: The submission should be in the form of a witness statement of the testing completed
by the Tutor; technical documentation; and a written report (please see details in Part 1
above).
Unit Learning Outcomes:

LO1 Use an appropriate design tool to design a relational database system for a substantial
problem.
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.
Assignment Brief and Guidance:

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~9~


Assignment brief

Polly Pipe is a water sports provider and installer based in Braintree, England. They need you
to design and implement a database that meets the data requirements. These necessities are
defined in this scenario and below are samples of the paper records that the Polly Pipe
preserves.

Polly Pipe is focused in placing aquariums at business customers. Customers can request
several installations, but each installation is tailor-made for a specific customer. Facilities are
classified by type. One or more employees are assigned to each facility. Because these
facilities are often very large, they can include carpenters and masons as well as water
installers. The facilities use equipment such as aquariums, air pumps and thermostats. There
can be multiple computers in a facility.

Below are examples of paper records that Polly Pipe currently maintains.

Staff Management Record


Staff Number Name Type
SHA1 Dave Clark Plumber
SHA8 John Smith Installation Manager
SHA2 Freddy Davies Aquatics installer
SHA11 McCloud Aquatics installer
SHA23 Satpal Singh Plumber
SHA66 Winstn Kodogo Aquatics installer
SHA55 Alison Smith Brick Layer

Equipment Type Table


Type Equipment
Tanks 20 gallon tank, 50 gallon tank, 100
gallon tank, 200 gallon tank
Thermostats Standard, Super
Air Pumps Standard, Super
Filters Air driven, Undergravel

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~10~


Instillation Management Form

Installation Installation Installation Customer Equipment Types of Staff Period of


ID Type Name and Required Staff
Address assignm
ent
234 Freshwater Oak Lee A. 2 air 1 x Carpenter From 1st
sun
Tropical House, 17 pumps 1 x Aquatics Septemb
Wroxton 200 gallons installer er 2012
Road, fish tank 1 x Electrician
Hertfordsh 1x
ire, H5 667 standard
thermostat
654 Freshwater Bayliss Sally 2 air 5x 1st June
Cold House, Dench pumps Carpenters 2005 –
Orange 200 gallons 1x 1st June
Street, fish tank Installation 2011
Kent, K7 Large Manager
988 Gravel Bag 1 x Aquatics
2x installer
standard 1 x Plumber
thermostat 3 x Labourers
s
767 Marine Eaglestone Perry 2 x 200 10 x From
Castle, Vanderru gallons fish Carpenters 30th June
Eaglestone ne tanks 2x 2012
, Kent 500 Wood Installation
panels Manager
1 x Aquatics
installer
1 x Plumber
3 x Labourers
943 Marine 23 Eric 2 air No staff required
Sackville Mackinto pumps
Street, sh 200 gallons
Wilts. W55 fish tank
1x
standard
thermostat
157 Freshwater Humbertso Perry 2 air 1 x Aquatics 1st
Tropical n Castle, Vanderru pumps installer Septemb
Kent, K8 ne 400 gallons er 2005
fish tank – 1st
3x Septemb
standard er 2012
thermostat

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~11~


Activity 1
1.1. Identify the user and system requirements to design a database for the above scenario
and design a relational database system using conceptual design (ER Model) by including
identifiers (primary Key) of entities and cardinalities, participations of relationships.
Convert the ER Model into logical database design using relational database model
including primary keys foreign keys and referential Integrities. It should contain at least
five interrelated tables. Check whether the provided logical design is normalised. If not,
normalize the database by removing the anomalies.

(Note: -It is allowed to have your own assumptions and related attributes within the scope of the case study
given)

1.2. Design set of simple interfaces to input and output for the above scenario using
Wireframe or any interface-designing tool. Evaluate the effectiveness of the given design
(ERD and Logical design) in terms of the identified user and system requirements.

Activity 2
Activity 2.1
a. Develop a relational database system according to the ER diagram you have created
(Use SQL DDL statements). Provide evidence of the use of a suitable IDE to create a
simple interface to insert, update and delete data in the database. Implement proper
security mechanisms in the developed database.
Evaluate the database solution developed and its effectiveness with relevant to the
user and system requirements identified, system security mechanisms (EX: -User
groups, access permissions) and the maintenance of the database.
Activity 2.2
a. Explain the usage of DML with below mentioned queries by giving at least one single
example per each case from the developed database. Assess the usage of the below
SQL statements with the examples from the developed database to prove that the
data extracted through them are meaningful and relevant to the given scenario.
Select/ Where / Update / Between / In / Group by / Order by / Having

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~12~


Activity 3
Activity 3.1
Provide a suitable test plan to test the system against user and system requirements.
provide relevant test cases for the database you have implemented. Assess how the
selected test data can be used to improve the effectiveness of testing.
Note:- Learner needs to give expected results in a tabular format and screenshots of the actual results with
the conclusion

Activity 3.2
Get independent feedback on your database solution from the non-technical users and
some developers (use surveys, questioners, interviews or any other feedback collecting
method) and make recommendations and suggestions for improvements in a separate
conclusion/recommendations section.

Activity 4

Produce a technical documentation and a user guide for the developed database system.
Suitable diagrams diagrams (Use case diagram, class diagram, flow charts, DFD level 0 and
1) should be included in the technical documentation to show data movement in the system.
Assess the developed database by suggesting future enhancements to ensure the
effectiveness of the system.

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~13~


Grading Criteria Achieved Feedback

LO1 Use an appropriate design tool to design a relational


database system for a substantial problem

P1 Design a relational database system using appropriate


design tools and techniques, containing at least four
interrelated tables, with clear statements of user and system
requirements.
M1 Produce a comprehensive design for a fully functional
system that includes interface and output designs, data
validations and data normalization.

D1 Evaluate the effectiveness of the design in relation to user


and system requirements.

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~14~


LO2 Develop a fully functional relational database system,
based on an existing system design

P2 Develop the database system with evidence of user


interface, output, and data validations, and querying across
multiple tables.

P3 Implement a query language into the relational database


system

M2 Implement a fully functional database system that


includes system security and database maintenance.

M3 Assess whether meaningful data has been extracted


using query tools to produce appropriate management
information.

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~15~


LO3 Test the systems against user and system requirements

P4 Test the system against user and system requirements.

M4 Assess the effectiveness of the testing, including an


explanation of the choice of test data used.
LO2 & LO3
D2 Evaluate the effectiveness of the database solution in
relation to user and system requirements, and suggest
improvements.
LO4 Produce technical and user documentation

P5 Produce technical and user documentation.

M5 Produce 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.

D3 Evaluate the database in terms of improvements


needed to ensure the continued effectiveness of
the system.

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~16~


Acknowledgment

I want to express my special thanks to my teacher Mr. Dileepa Mihiranga, who allowed
me to do this Database Design & Development assignment. I came to know about so
many new things I am thankful for them. Secondly, I would like to thank those who helped
me a lot with this assignment within the limited time frame.

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~17~


Table of content

Contents
Acknowledgment ............................................................................................................... 17

Table of content.................................................................................................................. 18

Table of figure .................................................................................................................... 20

Table ................................................................................................................................... 21

Database (DB) .................................................................................................................... 22

User requirements for Polly pipe ....................................................................................... 22

Functional requirements ................................................................................................. 23

Non-functional requirements ......................................................................................... 23

System requirements for Polly pipe ................................................................................... 23

Entities and attributes for Polly pipe .................................................................................. 24

ER diagram for Polly pipe.................................................................................................. 25

Logical relational schema .................................................................................................. 26

Data normalization ............................................................................................................. 27

Normal forms ................................................................................................................. 27

Validation ........................................................................................................................... 28

Data validation ............................................................................................................... 28

Insert ............................................................................................................................... 28

Update ............................................................................................................................ 28

Delete ............................................................................................................................. 28

Interface for Polly pipe....................................................................................................... 29

Structured Query Language (SQL) .................................................................................... 38

Importance of SQL ......................................................................................................... 38

SQL sublanguages .......................................................................................................... 38

Data Definition Language (DDL) .................................................................................. 39

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~18~


Data Manipulation Language (DML) ............................................................................ 40

Polly Pipe system ............................................................................................................... 42

Database security ............................................................................................................... 63

SQL statements .................................................................................................................. 64

Test plan ............................................................................................................................. 67

Test forms....................................................................................................................... 69

Test procedure ................................................................................................................ 72

Database testing ............................................................................................................. 73

Technical and user documentation ..................................................................................... 74

Conclusion.......................................................................................................................... 78

References .......................................................................................................................... 78

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~19~


Table of figure

Figure 1 (Database) (c-sharpcorner, 2021) ........................................................................ 22


Figure 2 (ER diagram for Polly pipe) (Author, 2022) ....................................................... 25
Figure 3 (Logical relational schema for Polly pipe) (Author, 2022) ................................. 26
Figure 4 (Wireframe for login) (Author, 2022) ................................................................. 30
Figure 5 (Wireframe for dashboard) (Author, 2022) ......................................................... 31
Figure 6 (Wireframe for employee) (Author, 2022) .......................................................... 32
Figure 7 (Wireframe for customer) (Author, 2022) ........................................................... 33
Figure 8 (Wireframe for installation) (Author, 2022) ........................................................ 34
Figure 9 (Wireframe for product) (Author, 2022) ............................................................. 35
Figure 10 (Wireframe for payment) (Author, 2022) .......................................................... 36
Figure 11 (Wireframe for package) (Author, 2022)........................................................... 37
Figure 12 (Login form) (Author, 2022) ............................................................................. 42
Figure 13 (Dashboard main form) (Author, 2022)............................................................. 43
Figure 14 (Dashboard form) (Author, 2022)...................................................................... 44
Figure 15 (Customer form) (Author, 2022) ....................................................................... 45
Figure 16 (Employee form) (Author, 2022) ....................................................................... 46
Figure 17 (Installation form) (Author, 2022) .................................................................... 47
Figure 18 (Product form) (Author, 2022) .......................................................................... 48
Figure 19 (Payment form) (Author, 2022) ......................................................................... 49
Figure 20 (Package form) (Author, 2022).......................................................................... 50
Figure 21 (Login code 1) (Author, 2022)........................................................................... 51
Figure 22 (Login code 2) (Author, 2022)........................................................................... 52
Figure 23 (Dashboard code 1) (Author, 2022) ................................................................... 53
Figure 24 (Dashboard code 2) (Author, 2022) ................................................................... 54
Figure 25 (Dashboard code 3) (Author, 2022) ................................................................... 55
Figure 26 (Dashboard form code) (Author, 2022) ............................................................. 56
Figure 27 (Customer code) (Author, 2022)........................................................................ 57
Figure 28 (Employee code) (Author, 2022) ....................................................................... 58
Figure 29 (Installation code) (Author, 2022) ..................................................................... 59
Figure 30 (Product code) (Author, 2022) ........................................................................... 60
Figure 31 (Payment code) (Author, 2022) ......................................................................... 61

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~20~


Figure 32 (Package code) (Author, 2022) .......................................................................... 62
Figure 33 (Select SQL statements) (Author, 2022) ........................................................... 64
Figure 34 (Where SQL statements) (Author, 2022)........................................................... 64
Figure 35 (Update SQL statements) (Author, 2022) .......................................................... 65
Figure 36 (Between SQL statements) (Author, 2022) ....................................................... 65
Figure 37 (Group By SQL statements) (Author, 2022) ..................................................... 66
Figure 38 (Order By SQL statements) (Author, 2022) ...................................................... 66
Figure 39 (Test Case No 01) (Author, 2022) ..................................................................... 69
Figure 40 (Test Case No 02) (Author, 2022) ..................................................................... 70
Figure 41 (Test Case No 03) (Author, 2022) ..................................................................... 71
Figure 42 (User guide) (Author, 2022) .............................................................................. 74
Figure 43 (User guide) (Author, 2022) .............................................................................. 75
Figure 44 (User guide) (Author, 2022) .............................................................................. 76
Figure 45 (User guide) (Author, 2022) .............................................................................. 77

Table

Table 1 (Entities and attributes) (Author, 2022) ................................................................ 24


Table 2 (Normalization) (Author, 2022) ............................................................................ 27
Table 3 (Normalization) (Author, 2022) ............................................................................ 27
Table 4 (Test Case No 01) (Author, 2022) ........................................................................ 67
Table 5 (Test Case No 02) (Author, 2022) ........................................................................ 68
Table 6 (Test Case No 03) (Author, 2022) ........................................................................ 68
Table 7 (Test procedure) (Author, 2022) ........................................................................... 72
Table 8 (Database Testing) (Author, 2022) ....................................................................... 73

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~21~


Activity 1

Database (DB)

A Database is an information set up for easy access, management and updating. Computer
databases typically store aggregations of data records or files that contain information.
Databases are used for storing, updating, and accessing any data. (Ben Lutkevich, 2022)

Figure 1 (Database) (c-sharpcorner, 2021)

User requirements for Polly pipe

There are two types of requirements with different purposes. They are,

1. Functional requirements
2. Non-functional requirements

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~22~


Functional requirements

All the tasks needed to upgrade the database are called functional requirements. Updating
the required data to feature the system is one of the main requirements for the user. The
customer database should be able to enter the customer's data from the Poly Pipe
company's database. And the ability to enter information about employees, what duties
they're allotted, etc., offer the package details and product required for an installation or
order, what sort of product the organization needs, and the user needs to have information
within the system. (Polly Pipe system should provide the ability to give customer details,
employee details, payments, packages, installation, and product details.)

Non-functional requirements

Non – functional requirements cover all remaining requirements for not covered areas by
functional requirements. Functional requirements implemented the details in the system
design. Various types of non – functional requirements are accessibility, audit, efficiency,
security, accuracy, availability, backup and restore, capacity, certification, compliance,
reliability, responsibility, virus guard, and compatibility of software. (ReQtest, 2012)

System requirements for Polly pipe

System requirements are the primary system configuration must-have for a hardware or
software application to run efficiently without lag or struck. Failure to meet these system
requirements can result in installation problems, crashes, or performance problems. The
former may prevent a device or application from getting installed, whereas the latter may
cause a product to malfunction, perform below expectation, or even hang or crash.
(Techopedia, 2015)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~23~


• OS - Windows 10 or higher.
• Processor - Intel core i5 or higher.
• Ram - 4GB.
• Hard disk space – 10GB.
• Graphics card – DirectX 9.
• 50Mbps Network speed.

Entities and attributes for Polly pipe

In Polly pipe company, customers can view the packages, and when ordered installation,
it will be installed by employees, and customers pay a payment. The entities and
attributes are,

Entities Attributes
Employee Id, Name, dob, PhoneNum, Address, Type
Customer Id, Name, dob, PhoneNum, Address
Installation Id, Type, StartTime, EndTime, Address
Package Id, Type, Price, Description
Product Id, Type, Name, Price
Payment Id, Type, Date, Amount
Table 1 (Entities and attributes) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~24~


ER diagram for Polly pipe

Figure 2 (ER diagram for Polly pipe) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~25~


Logical relational schema

Figure 3 (Logical relational schema for Polly pipe) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~26~


Data normalization

Data normalization is a database design technique that reduces data redundancy and
removes unwanted characteristics like Insertion, Updates and Deletion Anomalies.
Normalization rules divide larger tables into smaller tables and link them using
relationships. Normalization in SQL aims to eliminate redundant (repetitive) data and
ensure data is stored logically. (Richard Peterson, 2022)

Normal forms

 1NF (First Normal Form)


 2NF (Second Normal Form)
 3NF (Third Normal Form)
 BCNF (Boyce-Codd Normal Form)
 4NF (Fourth Normal Form)
 5NF (Fifth Normal Form)
 6NF (Sixth Normal Form)

Employee
Id Name Type
SHA1 Dave Clark Plumber
SHA8 John Smith Installation Manager
SHA2 Freddy Davies Aquatics installer
SHA11 McCloud Aquatics installer
SHA23 Satpal Singh Plumber
SHA66 Winstn Kodogo Aquatics installer
SHA55 Alison Smith Brick Layer
Table 2 (Normalization) (Author, 2022)

Employee
Id Type
SHA1 Plumber
SHA8 Installation Manager
SHA2 Aquatics installer
SHA11 Aquatics installer
SHA23 Plumber
SHA66 Aquatics installer
SHA55 Brick Layer
Table 3 (Normalization) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~27~


Validation

Data validation is a technique for checking the accuracy and quality of your data, typically
performed before importing and processing. It can also be knowing a form of data
cleansing. Data validation makes sure that your data is complete. There are no blank or
null values (empty) or unique (values that are not duplicated), and the range of values is
compatible with what you expect. (Garrett Alley, 2019)

Data validation

 Insert
 Update
 Delete

Insert

INSERT INTO tblEmployee


VALUES (‘SHA20’, ‘Dave’, ‘Smith’, ‘20/05/1995’, ‘0770368150’, ‘Plumber’, ‘SL’);

Update

UPDATE tblEmployee
SET Address = ‘Matara, Sri Lanka’
WHERE Id = ‘SHA20’;

Delete

DELETE FORM tblEmployee


WHERE Id = ‘SHA20’;

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~28~


Interface for Polly pipe

There is a simple interface design to get an idea of the system. It can be designed on a
wireframe or any interface designing tool.
Polly pipe company has six interface forms that the author created. They are,

 Login form
 Dashboard form
 Employee form
 Customer form
 Installation form
 Product form
 Payment form
 Package form

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~29~


Login form

Figure 4 (Wireframe for login) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~30~


Dashboard form

Figure 5 (Wireframe for dashboard) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~31~


Employee form

Figure 6 (Wireframe for employee) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~32~


Customer form

Figure 7 (Wireframe for customer) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~33~


Installation form

Figure 8 (Wireframe for installation) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~34~


Product form

Figure 9 (Wireframe for product) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~35~


Payment form

Figure 10 (Wireframe for payment) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~36~


Package form

Figure 11 (Wireframe for package) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~37~


Activity 2

Structured Query Language (SQL)

Structured Query Language (SQL) is used to transmit data into the database. According
to ANSI (American National Standards Institute), it is the standard language for relational
database management systems. SQL statements perform tasks such as updating data on a
database or retrieving data from a database. Some typical relational database management
systems that use SQL are Oracle, Sybase, Microsoft SQL Server, Access, Ingres, etc.
(Sqlcourse, 2022)

Importance of SQL

SQL language is efficient and easy to use.


SQL is an open-source language that can be used easily by users.
SQL is even used on smart devices and uses iOS and Android.
SQL has managed billions of data in the world.

SQL sublanguages

• DDL – Data Definition Language.


• DML – Data Manipulation Language.
• DRL/DQL – Data Retrieval Language/Data Query Language.
• TCL – Transaction Query Language.
• DCL – Data Control Language.
• SCL – Session Control Language.

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~38~


Data Definition Language (DDL)

Data Definition Language (DDL) can change commands automatically. DDL does
things like create tables, etc. DDL commands,

• Create
• Drop
• Alter
• Truncate

Create

Syntax

CREATE TABLE Table_Name (Column_Name DataTypes());

Example

CREATE TABLE tblEmployee(Name VARCHAR(50), ADDRESS VARCHAR(100),


DOB DATE);

Drop

Syntax

DROP TABLE Table_Name;

Example

DROP TABLE tblProduct;

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~39~


Alter

Syntax

ALTER TABLE Table_Name ADD Column_Name DataType;

Example

ALTER TABLE tblCustomer ADD(ADDRESS VARCHAR(100));

Truncate

Syntax

TRUNCATE TABLE Table_Name;

Example

TRUNCATE TABLE tblPayment;

Data Manipulation Language (DML)

Data Manipulation Language (DML) is used to modify databases. DML cannot execute
automatic commands like DDL. DML commands,

• Insert
• Update
• Delete

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~40~


Insert

Syntax

INSERT INTO Table_Name


VALUES (Value1, Value2, Value3,);

Example

INSERT INTO tblEmployee (“Address”, “Name”) VALUES (“Matara”, “Saman”);

Update

Syntax

UPDATE Table_Name SET Column_Name = “Value” WHERE Column_Name =


Value;

Example

UPDATE tblCustomer SET Name = “Sanju” WHERE empID = 2839;

Delete

Syntax

DELETE FROM Table_Name WHERE Column_Name = “Value”;

Example

DELETE FROM tblProduct WHERE ProID = “20”;

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~41~


Polly Pipe system

Login form

Figure 12 (Login form) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~42~


Dashboard main form

Figure 13 (Dashboard main form) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~43~


Dashboard form

Figure 14 (Dashboard form) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~44~


Customer form

Figure 15 (Customer form) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~45~


Employee form

Figure 16 (Employee form) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~46~


Installation form

Figure 17 (Installation form) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~47~


Product form

Figure 18 (Product form) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~48~


Payment form

Figure 19 (Payment form) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~49~


Package form

Figure 20 (Package form) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~50~


Login code

Figure 21 (Login code 1) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~51~


Figure 22 (Login code 2) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~52~


Dashboard code

Figure 23 (Dashboard code 1) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~53~


Figure 24 (Dashboard code 2) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~54~


Figure 25 (Dashboard code 3) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~55~


Dashboard form code

Figure 26 (Dashboard form code) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~56~


Customer code (Insert, Update, Delete)

Figure 27 (Customer code) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~57~


Employee code (Insert, Update, Delete)

Figure 28 (Employee code) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~58~


Installation code (Insert, Update, Delete)

Figure 29 (Installation code) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~59~


Product code (Insert, Update, Delete)

Figure 30 (Product code) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~60~


Payment code (Insert, Update, Delete)

Figure 31 (Payment code) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~61~


Package code (Insert, Update, Delete)

Figure 32 (Package code) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~62~


Database security

Database security can protect confidentiality, integrity, and availability of data.


Database security threats in the following situation,

• Theft attacks
• Hacker attacks
• Confidentiality loss
• Data privacy loss
• Integrity loss
• Data availability loss

Database security mechanism types are,

• Access controls
• Data encryption

Access controls

Access control can protect the database from unauthorized access.

Data encryption

Encryption gives protection to sensitive data communicated on public networks.

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~63~


SQL statements

Below are Select, Where, Update, Between, Group By, and Order By statements.

Select

Figure 33 (Select SQL statements) (Author, 2022)

Where

Figure 34 (Where SQL statements) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~64~


Update

Figure 35 (Update SQL statements) (Author, 2022)

Between

Figure 36 (Between SQL statements) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~65~


Group By

Figure 37 (Group By SQL statements) (Author, 2022)

Order By

Figure 38 (Order By SQL statements) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~66~


Activity 3

Test plan

Database Testing can check schemas, tables etc., of the database. Database system
testing is effectively validated to ensure the quality of the system.

Test Case No – 01
Test Case Name – Enter the incorrect email and password
Tester Name – Ishani Tharaka

Test case Input data Expected Actual result Test result


result (Pass /Fail)

Enter the Email – Check your Check your Pass


incorrect Pollypipe@gmail.com Username or Username or
email and Password – Admin Password Password
password

Table 4 (Test Case No 01) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~67~


Test Case No – 02
Test Case Name – Enter the correct email and incorrect password
Tester Name – Parindya Samarasinghe

Test case Input data Expected Actual result Test result


result (Pass /Fail)

Enter the Email – Check your Check your Pass


correct email admin@gmail.com Username or Username or
and incorrect Password – admin Password Password
password

Table 5 (Test Case No 02) (Author, 2022)

Test Case No – 03
Test Case Name – Enter the correct email and correct password
Tester Name – Mahinsa Jayawickrama

Test case Input data Expected Actual result Test result


result (Pass /Fail)

Enter the Email – Welcome To Welcome To Pass


correct email admin@gmail.com Polly Pipe Polly Pipe
and correct Password –
password admin123

Table 6 (Test Case No 03) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~68~


Test forms

Test NO – 01

Figure 39 (Test Case No 01) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~69~


Test NO – 02

Figure 40 (Test Case No 02) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~70~


Test NO – 03

Figure 41 (Test Case No 03) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~71~


Test procedure

Interface Testing

Test case no Input data Tester name Test date

01 Enter the incorrect Ishani Tharaka 20/06/2022


email and password

02 Enter the correct Parindya 20/06/2022


email and incorrect Samarasinghe
password

03 Enter the correct Mahinsa 20/06/2022


email and correct Jayawickrama
password

Table 7 (Test procedure) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~72~


Database testing

Database Testing

01 Select Mahinsa 24/06/2022


Jayawickrama
02 Where Mahinsa 24/06/2022
Jayawickrama
03 Update Mahinsa 24/06/2022
Jayawickrama
04 Between Mahinsa 24/06/2022
Jayawickrama
05 Group By Mahinsa 24/06/2022
Jayawickrama
06 Order By Mahinsa 24/06/2022
Jayawickrama
Table 8 (Database Testing) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~73~


Activity 4

Technical and user documentation

User Guide

Figure 42 (User guide) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~74~


Figure 43 (User guide) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~75~


Figure 44 (User guide) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~76~


Figure 45 (User guide) (Author, 2022)

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~77~


Conclusion

The author developed a system for a company called Polly Pipe. The author learned how
to create a software and database and got a lot of experience from this assignment.

References

SearchDataManagement. 2022. What is a Database? Definition from


SearchDataManagement. [online] Available at:
<https://www.techtarget.com/searchdatamanagement/definition/database> [Accessed 24
June 2022].

ReQtest. 2022. Functional vs Non-Functional Requirements - Understand the


Difference. [online] Available at: <https://reqtest.com/requirements-blog/functional-vs-
non-functional-
requirements/#:~:text=Non%2Dfunctional%20requirements%20cover%20all,accessing
%20it%20within%202%20seconds.%E2%80%9D> [Accessed 24 June 2022].

Techopedia.com. 2022. What are System Requirements? - Definition from Techopedia.


[online] Available at: <https://www.techopedia.com/definition/4371/system-
requirements> [Accessed 24 June 2022].

Guru99. 2022. What is Normalization in DBMS (SQL)? 1NF, 2NF, 3NF, BCNF
Database with Example. [online] Available at: <https://www.guru99.com/database-
normalization.html> [Accessed 24 June 2022].

Alley, G., 2022. What is Data Validation? | Alooma. [online] Alooma.com. Available
at: <https://www.alooma.com/blog/what-is-data-validation> [Accessed 24 June 2022].

SQL Course. 2022. What is SQL (Structured Query Language)? - SQLCourse. [online]
Available at: <https://www.sqlcourse.com/beginner-course/what-is-sql/> [Accessed 24
June 2022].

Mahinsa Mewanthaka Jayawickrama Database Design & Development ~78~

You might also like