Database Assignment

Download as pdf or txt
Download as pdf or txt
You are on page 1of 102

Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)


INTERNAL VERIFICATION – ASSESSMENT DECISIONS

Programme title BTEC HND in Computing


Mr. Dileepa Mihiranga
Assessor Internal Verifier
Unit 04: Database Design & Development
Unit(s)
Database Solution for Polly Pipe
Assignment title
H.P.Dileesha Mandara Prawarshana
Student’s name
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

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

H.P.DILEESHA MANDARA 1 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Higher Nationals - Summative Assignment Feedback Form
Student Name/ID H.P.Dileesha Mandara Prawarshana

Unit Title Unit 04: Database Design & Development

Assignment Number 1 Assessor


02/05/2022 Date Received
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.

H.P.DILEESHA MANDARA 2 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Assignment Feedback
Formative Feedback: Assessor to Student

Action Plan

Summative feedback

Feedback: Student to Assessor

Assessor Date
signature

Student Date
signature

H.P.DILEESHA MANDARA 3 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Pearson Higher Nationals in
Computing
Unit 04: Database Design & Development
Assignment 01

H.P.DILEESHA MANDARA 4 UNIT 04- DATABASE DESING AND


DEVELOPMENT
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.
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

H.P.DILEESHA MANDARA 5 UNIT 04- DATABASE DESING AND


DEVELOPMENT
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.
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.

[email protected] 02/05/2022

Student’s Signature: Date:


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

H.P.DILEESHA MANDARA 6 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Higher National Diploma in Computing
Assignment Brief
Student Name /ID Number

Unit Number and Title Unit 4: Database Design & Development

Academic Year 2021/22

Unit Tutor

Assignment Title Data base system for Polly Pipe

Issue Date

Submission Date

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:

H.P.DILEESHA MANDARA 7 UNIT 04- DATABASE DESING AND


DEVELOPMENT
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

H.P.DILEESHA MANDARA 8 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Instillation Management Form

Installation InstallatioInstallatio Custome Equipment Types of Staff Period


ID n Type n Name r Required of Staff
and assignm
Address ent
234 Freshwater Oak House, Lee A. 2 air 1 x Carpenter From 1st
sun
Tropical 17 pumps 1 x Aquatics Septemb
Wroxton 200 gallons installer er 2012
Road, fish tank 1 x Electrician
Hertfordsh 1 x
ire, H5 667 standard
thermostat
654 Freshwater Bayliss Sally 2 air 5 x Carpenters 1st June
Cold House, Dench pumps 1 x Installation 2005 –
Orange 200 gallons Manager 1st June
Street, fish tank 1 x Aquatics 2011
Kent, K7 Large installer
988 Gravel Bag 1 x Plumber
2 x 3 x Labourers
standard
thermostat
s
767 Marine Eaglestone Perry 2 x 200 10 x From
Castle, Vanderru gallons fish Carpenters 30th June
Eaglestone ne tanks 2 x Installation 2012
, Kent 500 Wood Manager
panels 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
1 x
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
3 x Septemb
standard er 2012
thermostat

H.P.DILEESHA MANDARA 9 UNIT 04- DATABASE DESING AND


DEVELOPMENT
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

H.P.DILEESHA MANDARA 10 UNIT 04- DATABASE DESING AND


DEVELOPMENT
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.

H.P.DILEESHA MANDARA 11 UNIT 04- DATABASE DESING AND


DEVELOPMENT
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.

H.P.DILEESHA MANDARA 12 UNIT 04- DATABASE DESING AND DEVELOPMENT


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.

H.P.DILEESHA MANDARA 13 UNIT 04- DATABASE DESING AND DEVELOPMENT


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.

H.P.DILEESHA MANDARA 14 UNIT 04- DATABASE DESING AND DEVELOPMENT


Acknowledgement

The timely and effective completion of the book would not have been possible without the
assistance and support of many people. I'd want to use this occasion to express my gratitude
to everyone who assisted me in some way throughout this crucial project, whether directly or
indirectly. First of all, I wish to express my sincere gratitude and due respect to my
Mr. Dileepa Mihiranga lectures in department of Computing Esoft Metro Campus Matara. I
give him a great heartfelt thanks for his invaluable advice, constant encouragement, and
positive support, all of which greatly aided me during my time at work. I'd want to thank him
for always taking an active interest in my questions and making useful advice.

H.P.D.MANDARA PRAWARSHYANA

H.P.DILEESHA MANDARA 15 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Contents
Learning Outcomes:01 ............................................................................................................. 21
1.1 Polly pipe water sport provider and installer ................................................................ 21
1.2 The Database is .............................................................................................................. 22
1.3 Data Model..................................................................................................................... 23
1.4 Database development process ..................................................................................... 24
1.5 User and system requirements. ..................................................................................... 24
1.5.1 User requirements ................................................................................................... 24
1.5.2 Functional Requirements ........................................................................................ 25
1.5.4 Hardware specifications (System Requirements) ................................................... 27
1.6 Entities and Attributes of Polly pipe system .................................................................. 27
1.7 Normalization ................................................................................................................. 28
1.8 ER Diagram ..................................................................................................................... 31
1.9 The ER diagram for the POLY PIPE system is given below. ............................................ 32
1.10 Final Relational Schema ............................................................................................... 33
1.11 Polly Pipe System - Relational schema......................................................................... 34
1.11 Final Relational Schema(POLLY PIPE COMPANY) ......................................................... 35
1.12 What is validation?....................................................................................................... 36
In data processing, analysis, data verification, and data processing, data validation is
critical. Any data should be double-checked before being used. It's dangerous to make
judgement based on faulty data. As a result, every company has its own set of standards
for preserving and managing its business data. Validation rules for data examples, ......... 36
1.12 Interface for Polly Pipe company application .............................................................. 38
Learning Outcomes:02 ............................................................................................................. 44
2.2 Important of the SQL ..................................................................................................... 44
2.3 SQL Sub Language .......................................................................................................... 44
2.4 Examples for DML , DDL and DRL ( INSERT , DELETE , UPDATE , SELECT and CREATE )
from the database................................................................................................................ 48
2.5 Example for between/ in / group by / order by / having SQL statements from
database. .............................................................................................................................. 50
2.6 Polly pipe company system (VISUAL STUDIO SOFTWARE) ............................................ 53
2.7 Database security ........................................................................................................... 57
2.8 Polly Pipe DATABASE Commend. (VISUAL STUDIO DATABASE) .................................... 58
Learning Outcomes:03 ............................................................................................................. 67

H.P.DILEESHA MANDARA 16 UNIT 04- DATABASE DESING AND


DEVELOPMENT
3.1 Test plan (polly pipe system check) and system check screen shot .............................. 67
This is where testing the software created above takes place. That is the software is
tested separately. This table is used by the author for testing. .......................................... 67
Login page ............................................................................................................................ 72
close ..................................................................................................................................... 72
Login page did not close....................................................................................................... 72
Fail ........................................................................................................................................ 72
Go Next page ........................................................................................................................ 73
Go next page ........................................................................................................................ 73
Pass....................................................................................................................................... 73
. ............................................................................................................................................. 74
Fail ........................................................................................................................................ 74
3.2 Test procedure ( Interface testing ) ............................................................................... 74
3.3 Database testing ............................................................................................................ 76
3.4 Database testing (polly pipe company database) .......................................................... 77
3.5 User Feedback (POLLY PIPE company) ........................................................................... 78
Learning Outcomes:04 ............................................................................................................. 86
4.1 user documentation ...................................................................................................... 86
4.2 Technical Documentation .............................................................................................. 93
4.2 FLOW CHAER for polly pipe system ............................................................................... 94
4.3 VISUAL STUDIO CODE AND insert ,view and delete CODE ............................................ 99
4.4 Future Improvements to the Database System ........................................................... 101

H.P.DILEESHA MANDARA 17 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Figure 1- 1NF (stack overflow.com / 2021) ............................................................................. 29
Figure 2 -2NF (stack overflow.com / 2021) ............................................................................. 29
Figure 3- -3NF (stack overflow.com / 2021) .......................................................................... 30
Figure 4 - ER DESIGN Symbols (stack overflow.com / 2021) ................................................ 31
Figure 5- Final Relational Schema .......................................................................................... 35
Figure 6 - Insert SOL command(author / 2022) ...................................................................... 36
Figure 7 -update data (the author/2022) ................................................................................. 37
Figure 8 - Update Data (M SQL.com/2022) ............................................................................ 37
Figure 9 -(The Polly pipe company login page)(mock flow) ................................................... 38
Figure 10 - (Login incorrect Email and password)(mock flow) .............................................. 39
Figure 11 - (Display Massage box)(mock flow) ...................................................................... 39
Figure 12- (user dashboard)(mock flow) ................................................................................. 40
Figure 13 - ( Input the customer details)(mock flow) .............................................................. 41
Figure 14 - (display details)(mock flow).................................................................................. 41
Figure 15- (payment page)(mock floe) .................................................................................... 42
Figure 16- (payment types)(mock flow) ................................................................................... 42
Figure 17 -(Order details)(mock flow) .................................................................................... 43
Figure 18 - (show ordre details) (mock flow) .......................................................................... 43
Figure 19 - SQL sub language(techsnib.com/2022) ................................................................ 45
Figure 20 - select commend (the author/2022) ........................................................................ 48
Figure 21 select commend (the author/2022) .......................................................................... 48
Figure 22 - INSERT command(the author/2022) .................................................................... 49
Figure 23- update command(the author/2022) ........................................................................ 49
Figure 24 - delete commend(the author/2022) ........................................................................ 50
Figure 25 - WHERE(The author/2022) .................................................................................. 50
Figure 26 - IN command(the author/2022).............................................................................. 51
Figure 27 - between(the author/2022) ..................................................................................... 51
Figure 28- group by(the author/2022) ..................................................................................... 52
Figure 29 - order by(the author/2022) .................................................................................... 52
Figure 30- LOGIN PAGE (the author/2022) ........................................................................... 53
Figure 31- dashboard(the author/2022) .................................................................................. 53
Figure 32- customer register page(the author/2022) .............................................................. 54
Figure 33 -Installation page(the author/2022) ........................................................................ 54
Figure 34 - staff page(the author/2022) .................................................................................. 55
Figure 35 - supplies page(the author/2022) ............................................................................ 55
Figure 36 - order page (the author/2022) ............................................................................... 56
Figure 37 - staff database(the author/2022) ............................................................................ 58
Figure 38 - customer database(the author/2022) .................................................................... 59
Figure 39 - user name and password database table .............................................................. 60
Figure 40 - correct the user name and password(the author/2022) ........................................ 61
Figure 41 - order database table(the author/2022) ................................................................. 62
Figure 42 - staff details add(the author/2022)......................................................................... 63
Figure 43 - add details(the author/2022) ................................................................................ 63
Figure 44 - payment table(the author/2022) ............................................................................ 64
Figure 45 add data(the author/2022) ...................................................................................... 64
H.P.DILEESHA MANDARA 18 UNIT 04- DATABASE DESING AND
DEVELOPMENT
Figure 46 -staff data insert(the author/2022) .......................................................................... 65
Figure 47-customer data insert(the author/2022) ................................................................... 65
Figure 48 -installation data insert(the author/2022) ............................................................... 65
Figure 49 insert data user name and password(the author/2022) .......................................... 66
Figure 50 - database link(the author/2022) ............................................................................. 66
Figure 51 - incorrect User name(the author/2022) ................................................................. 68
Figure 52 - message box(the author/2022) .............................................................................. 68
Figure 53 - incorrect password(the author/2022) .................................................................. 69
Figure 54 - incorrect password and incorrect user name(the author/2022|) .......................... 70
Figure 55 - successfully logged(the author/2022) ................................................................... 71
Figure 56 - login page exit(the author/2022) .......................................................................... 72
Figure 57 - click the login(the author/2022) ........................................................................... 73
Figure 58 -dashboard(the author/2022) .................................................................................. 73
Figure 59 - database testing tools(javatpoint/2019)................................................................ 76
Figure 60 - user guide line(the author/2022) .......................................................................... 86
Figure 61 - LOGIN (the author/2022) ..................................................................................... 94
Figure 62 - insert data(the author/2022) ................................................................................. 95
Figure 63 - UPDATE DATA(the author/2022) ........................................................................ 96
Figure 64 - DELETE DATA(the author/2022) ........................................................................ 97
Figure 65 - SELECT DATA (the author/2022) ........................................................................ 98
Figure 66 - login and database connect code(the author/2022) ............................................. 99
Figure 67 - DATA VIEW CODE(THE AUTHOR/2022) .......................................................... 99
Figure 68 - INSERT CODE(THE AUTHOR/2022) ............................................................... 100
Figure 69 - DELETE code(the author/2022) ......................................................................... 100

H.P.DILEESHA MANDARA 19 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Table 1 - advantages and disadvantages ................................................................................. 23
Table 2- entities and describe (the author/2022) ...................................................................... 28
Table 3 difference of normalization ......................................................................................... 30
Table 4- SQL advantages and disadvantages(the author/2022) .............................................. 47
Table 5- test case table(the author/2022) ................................................................................ 67
Table 6- test case 1(the author/2022) ...................................................................................... 67
Table 7 - test case 2(the author/2022) ..................................................................................... 69
Table 8- test case 01|(the author/202 ...................................................................................... 70
Table 9 test case 4(the autho9r/2022)...................................................................................... 71
Table 10 - test case 5(the author/2022) ................................................................................... 72
Table 11 - test case 5(the author/2022) ................................................................................... 73
Table 12 - test case 5(the author/2022) ................................................................................... 74
Table 13 - Test procedure (the author/2022) ........................................................................... 75
Table 14 - database test(the author/2022) ............................................................................... 77
Table 15- user feedback form(the author/2022) ...................................................................... 78
Table 16 - FIRST USER(THE AUTHOR/2022) ....................................................................... 79
Table 17-second user(the author/2022) ................................................................................... 80
Table 18 - thired user(the author/2022) .................................................................................. 81
Table 19 - Fourth user(the author/2022) ................................................................................. 82
Table 20 - Five user(the author/2022) ..................................................................................... 83
Table 21 Six user(the author/2022) ......................................................................................... 84
Table 22 all information(the author/2022) .............................................................................. 85

H.P.DILEESHA MANDARA 20 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Learning Outcomes:01

1.1 Polly pipe water sport provider and installer


Polly Pipe is a water sports provider and installer based in Braintree, England.(ASSIGNMENT
BRIFE) The company focuses on building an aquarium for a business customer. The company
also has a talented staff with experience. They are also Plumbers, installation managers,
bricklayers, aquarium installers, carpenters and masonry. Equipment owned by the company
includes tanks, thermostats, air pumps and filters.

Information about all the employees and equipment of this institution is kept on paper. This is
a bit difficult so the company is ready to create a database. Below is all the information related
to creating it.
This company has 5 main roes. That is, it has an internal roles 3 and an external roles 2.this is
described separately below.(Assignment Brief)

⚫ Installations manager
Chief of the company who supervise everything happen within the company.

⚫ System user
This person maintain the system and performs operations such as collecting , updating and
deleting data. The person who enter information such as customer, equipment, suppliers
and ECT.

⚫ Staff members
That is, this is the company working staff. Assignment employs a wide variety of
employees.Plumbers, installation managers, bricklayers, aquarium installers, carpenters
and masonry work for this company.

⚫ Supplier
These are the people who supply the materials relevant to the company. (Tanks, Filters and
more)

H.P.DILEESHA MANDARA 21 UNIT 04- DATABASE DESING AND


DEVELOPMENT
⚫ Customer
Is the person who buys the goods and services

Although the company used manual data storage to store data, the company was later ready to
create a database.

1.2 The Database is


In short, a database is a place where data is stored. Data storage took place in two ways. That
is , it is manual data storage and electronic data storage. These two methods are further
described below.

Manual Data Storage


In the early days, data was handwritten and stored. But this system had to face many problems.
These issues are described separately below.

⚫ Data redundancy
Here the data is repeated again and again. This led to unnecessary data collection.
⚫ Data inconsistency
The same data was deposited in different places. It also takes up more space to store data.
⚫ Data not shareable
It is difficult to share data with others.
⚫ Difficult to limit access
Data access cannot be restricted. Anyone can view the data.
⚫ Less data security
Data security is compromised because duplicates are difficult to obtain.

This method has many disadvantages in depositing data and people are tempted to replace this
method electronically. The above disadvantages could be avoided when storing data
electronically.
Database ( electronically storage data )
In this method, computer assisted data storage took place. This method also allows you to create
a new file ,remove file, data insert, data delete, data update and data search.

H.P.DILEESHA MANDARA 22 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Advantages and disadvantages of electronically storing data (database)

Advantages Disadvantages

Minimal data redundancy Are Complex (requires technical knowledge)

Minimal data inconsistency The cost of high

Shareable data Higher impact of failure

Can limit access Performance problem

High data security (backup)

Table 1 - advantages and disadvantages

1.3 Data Model

Data modal is the storage of all data in tables so that it can be organize, manage and stored.
The division of data into tables consists of four parts.
➢ Flat data model
Flat data model is the storage of all data in a single table. This is a simple database that
represents all the data in a single data.

➢ Hierarchical data model


Hierarchical data format is the storage of data in separate tables rather than in a single
table. That is, storing the data in separate tables.

➢ Network data model


That is, it makes a connection between tables. These are connected by a semi-link.

➢ Relational data model


This is a currently used database format and also used a special code to link table. This
method makes it easy to find data.

H.P.DILEESHA MANDARA 23 UNIT 04- DATABASE DESING AND


DEVELOPMENT
1.4 Database development process
Here you can create a database in five steps. These steps are described separately below.
1. Planning
Determining how long it will take to create this and whether it is possible to create this.
2. Analysis
Get all the details about the system
3. Design
Here ER DIRGAM is created (ER and Attribute mapping)
4. Implementation
Here a database is created. For example SQL language.
5. Maintenance
Performs a check on the created database.(error detection )

1.5 User and system requirements.


Once a system has been created, it describes the functionality and interruptions of the services
provided by that system. That is .it is divided into 2 part as user requirements and system
requirements.

1.5.1 User requirements


This is a set of requirements for the user. How to execute required input and conditions, to go.
User requirements are the primary in get for creating system requirements. Divide the user
needs into 2 main parts. That is, functional requirements and non functional requirements.

Polly Pipe the basic user requirements of the company

a) Customer can buy equipment only and decline staff services based on their preference.
b) Must be able to obtain information related to the required equipment.
c) Customer should be able to request several installation
d) Customer can select or deselect staff services.

H.P.DILEESHA MANDARA 24 UNIT 04- DATABASE DESING AND


DEVELOPMENT
1.5.2 Functional Requirements
Functional requirements are qualities that must be present in a system. That is , the
requirements that a system user inevitably expects. For example, a company’s employee
database must have features such as update, new data insert , data search and deletions. This is
explained separately below.

Insert option
⚫ When recruiting a new employee to the company.
⚫ To include customer information.
⚫ When entering information on equipment.
⚫ When entering other information of the company.
⚫ Insert order details.

Update option
⚫ When updating employee information.
⚫ When updating an order.
⚫ When changing a customers information.
⚫ Update details of staff
⚫ Update equipment

Search option
⚫ When retrieving employee information.
⚫ To obtain customer information.
⚫ To get information on equipment’s.
⚫ Search existing staff members details
⚫ Search invoices.

Delete option
⚫ When an employee leaves the company.
⚫ When deleting customer information.
⚫ Delete existing supplier details.
⚫ Delete existing equipment.
H.P.DILEESHA MANDARA 25 UNIT 04- DATABASE DESING AND
DEVELOPMENT
1.5.3 Non-Functional Requirements
This is not mandatory for system activation and should have these features for the convenience
of the user.by setting these properties in a system, the efficiency of the system can be increased.
These characteristics are explained separately below.

➢ Security
You need to pay more attention to the security of the data save in the system. That is,
hackers have the ability to enter the system and steal data. There for , more care should
be taken about security when designing a system. Anti virus software , firewall software
can be used to protect a system.

➢ Speed of the application


More attention should also be paid to the speed of a system. If the speed is low, the user
may not be able to handle the system properly.

➢ Backup
Must be able to get system backup. If the system crashes and all data is erased, the
company may shut down. Because it can take a long time to recover that data. You must
be able to obtaina backup to avoid it. (backup cloud storage can be stored on memory
such as USB or CD and hard disk.)

➢ Ability to maintain
Must be able to run a system. Running a system for a loan time can cause various
problems. The system may potentially crash as a result of a problem.. That is ,when a
system is created, it must be able to maintain it for a loran time.

➢ Error handling
Errors detection in a system can be done by manipulating the error. That is ,if the system
shows an errors during data input, processing and output , the errors can be avoided by
displaying the relevant details. Error handling means that if there is a system error, the
user can fix the error by providing the user with a description of where the error
occurred along with the error code.
H.P.DILEESHA MANDARA 26 UNIT 04- DATABASE DESING AND
DEVELOPMENT
EX-windows 11 error/ Try again and if that doesn’t work, contact Microsoft support for help
Error code 0*8007007f ( extraction=google .com/search?q=Erroe+handline/Appual 2014)

➢ Data Availability
The system user should be able to log in to the system and retrieve the required data at
any time. Must be able to access information at any time without error.
➢ Environmental requirement
➢ Maintainability
➢ Interoperability

1.5.4 Hardware specifications (System Requirements)

Hardware specification is the technical specifications that a hardware must meet in order for
software to function properly. The hardware specification vary from software to software. The
hardware specification are as follows.
⚫ Processor intel i3 or higher
⚫ 2GB of RAM
⚫ 500 MB of hard drive space
⚫ Windows operating system
⚫ 1280 X 800 display

1.6 Entities and Attributes of Polly pipe system


Distinguishable real-world object are called entities and describe their basic features as
attributes. The name used to identify a table is simply called entities (table name) and the
corresponding column attributes.

Below are the entities and attributes of the database created for the Polly pipe company.

H.P.DILEESHA MANDARA 27 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Entities Attributes

Staff_Id , F_name , L_name , Address , Type ,


Staff Contect_No ,

C_NIC , F_Name , L_Name , Address , Contect_No ,


Customer Description

SUP_ID , F_Name , L_Name , Address , Contect_No,


Supplier Description

EQU_ID , Equipment Name , Type ,


Equipment

Order_Id , Order_Data , Advance , Equipment ,


Order Description

P_Id , Payment_Type , Data and Time , Price


Payment

INS_ID , Location , Data


Installations

Table 2- entities and describe (the author/2022)

1.7 Normalization
Normalisation is the technology used to prevent duplication of database data. It also enhances
the integrity of the database. Here Edgar F. Codd proposes a there-stage process. Completing
the third normal format And BCNF (3NF/BCNF) of the database can also be referred to as
normalizations.

It consists of five parts 1NF , 2NF ,3NF and BCNF. The meanings of each general model are
as follows. This is explained separately below

H.P.DILEESHA MANDARA 28 UNIT 04- DATABASE DESING AND


DEVELOPMENT
⚫ 1NF (first normal form)
1NF is the first step in the normalization process. In this method only one data is stored
in a single cell. Always have individual data and do not allow for their composite
properties of combinations. Below are two table of 1NF.

Figure 1- 1NF (stack overflow.com / 2021)


.

⚫ 2NF (second normal form)


2NF is the step after the first normal form. To proceed to this step ,the table must be in
first normal form. Below is a table of conversions to second normal form (2NF).

Figure 2 -2NF (stack overflow.com / 2021)

H.P.DILEESHA MANDARA 29 UNIT 04- DATABASE DESING AND


DEVELOPMENT
⚫ 3NF (third normal form)
3NF is the division into other tables. To convert a table to 3NF ,the table must first be
of second normal form. Below is a table of conversions to third normal form (3NF).

Figure 3- -3NF (stack overflow.com / 2021)

⚫ BCNF ( Boyce codd normal form)


This is the step between 3NF and 4NF. To BCNF (Boyce codd normal form) a table
,the table must be in third normal form.

⚫ Each column in a tale must have a single value


1NF
⚫ Must have a primary key
⚫ If there are recurring attributes they should be moved to a new
table.

⚫ The table should be in the first normal form.


2NF
⚫ No non-primitive attribute rests on a subset of the table.

⚫ Table must be in second normal form


3NF
⚫ Transitive functional dependency of non-prime attributes on
any super key should be removed.

⚫ This is larger then 3NF so it is also know as 3.5.


BCNF

Table 3 difference of normalization

H.P.DILEESHA MANDARA 30 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Conclusion -
All information about normalization is describe above. According to the author, all the tables
in the database created for the Polly pipe company are converted to 3NF (third normal form.
This is further explained in the relational schema.

1.8 ER Diagram
This is the design part of the database development process. Before a database is create, it is
represented by a diagram. For then, an ER note will be drawn. Special symbols for drawing
an ER note have also been introduced. Below are the relevant symbols.

Figure 4 - ER DESIGN Symbols (stack overflow.com / 2021)

H.P.DILEESHA MANDARA 31 UNIT 04- DATABASE DESING AND


DEVELOPMENT
1.9 The ER diagram for the POLY PIPE system is
given below.

H.P.DILEESHA MANDARA 32 UNIT 04- DATABASE DESING AND DEVELOPMENT


1.10 Final Relational Schema
After creating an ER diagram, it should be converted into table. That is , describing how table
are linked together by a programmer is abbreviated as relational schema. For relationship can
be identified to make a connection between tables. That is

➢ 1:1 (one to one)


That is, a foreign key in a table can be used as its primary key. One of the primary key in
any of the two tables connected at the same time is a foreign key in the other table. For
example ,the relationship between Polly pipe company customer and payment table.

CUSTOMER (1)

C_NIC F_NAME L_NAME ADDRESS

PAYMENT (1)

P_ID PAYMENT_TYPE PRICE DATE/TIME C_NIC

➢ 1:M (one to many)


In this connection, the same primary key creates two attributes that take two values. Here
the primary key in table 1 (one) is the foreign key in table M (many). for example ,between
the staff table and the suppliers tables.

STAFF (1)
STAFF_ID F_NAME L_NAME ADDRESS TYPE

SUPPLIERS (M)
SUP_ID NAME ADDRESS STAFF_ID

H.P.DILEESHA MANDARA 33 UNIT 04- DATABASE DESING AND


DEVELOPMENT
➢ M:1 (many to one)
This is similar to the 1:M mentioned earlier. Here the primary key in table 1 (one) is the
foreign key in table M (many). for example ,between the staff table and the suppliers tables.

CUSTOMER (1)
C_NIC F_NAME L_NAME ADDRESS

ORDER (M)
ORDER_ID ORDER DATE ADVANCE DESCRIPTION C_NIC

➢ M:N (many to many)


In the case of M:N (many to many) a new table is created. That is .this new table is created
using the primary keys of the two tables.

ORDER (M)
ORDER_ID ORDER DATE ADVANCE DESCRIPTION

INSTALLATIONS DETAILS(new table)


ORDER_ID INS_ID

INSTALLATIONS (N)

INS_ID LOCATION DATE

H.P.DILEESHA MANDARA 34 UNIT 04- DATABASE DESING AND


DEVELOPMENT
1.11 Final Relational Schema(POLLY PIPE COMPANY)

Figure 5- Final Relational Schema

H.P.DILEESHA MANDARA 35 UNIT 04- DATABASE DESING AND


DEVELOPMENT
1.12 What is validation?

In data processing, analysis, data verification, and data processing, data validation is critical.
Any data should be double-checked before being used. It's dangerous to make judgement based
on faulty data. As a result, every company has its own set of standards for preserving and
managing its business data. Validation rules for data examples,

• Data type
• Range check
• Uniqueness
• Consistent expressions
• No null values

Data validation
• Insert data
The process of entering rows into a table is known as data insertion. The following are data
insertion techniques and an example of SQL query specification. Methods for inserting
data. To insert rows, use the INSERT command.

Figure 6 - Insert SOL command(author / 2022)

H.P.DILEESHA MANDARA 36 UNIT 04- DATABASE DESING AND


DEVELOPMENT
• Update data
To update software or alter data in a file or database. Edit and update. To make changes to
text, data, photos, and video, the phrases "update" and "edit" are interchangeable.

Figure 7 -update data (the author/2022)

• Delete data
Use the DELETE command to remove one or more data sets or elements of a partitioned
data set from the system. When the system deletes a whole data set, the catalogue entry is
also deleted.

Figure 8 - Update Data (M SQL.com/2022)

H.P.DILEESHA MANDARA 37 UNIT 04- DATABASE DESING AND


DEVELOPMENT
1.12 Interface for Polly Pipe company application

Creates and completes the ER diagram and relational schema diagram of the Polly pipe
company system. Next ,applications should be designed for Polly pipe company. To do this,
your must first created interfaces.
An interface is a front interface that is designed to be user-friendly. When creating an interface
it should be designed in a way that is easy for the user to navigate.

Below are some of the interface that are being created related to Polly pipe company.

Login Page in Polly Pipe application


The user enter their Email address and Password and the interface for logging page.

Figure 9 -(The Polly pipe company login page)(mock flow)

H.P.DILEESHA MANDARA 38 UNIT 04- DATABASE DESING AND


DEVELOPMENT
By entering the wrong Email address and password
Display an error message when the user enters an incorrect Email address and Password.

Figure 10 - (Login incorrect Email and password)(mock flow)

Massage box
Enter the wrong email and password will give the user a message box indicating that it is
incorrect.

Figure 11 - (Display Massage box)(mock flow)

H.P.DILEESHA MANDARA 39 UNIT 04- DATABASE DESING AND


DEVELOPMENT
USER DARSHBORD
The user can see the Dashboard by entering the correct email and password.

Figure 12- (user dashboard)(mock flow)

Here the user can enter, delete ,update and search staff ,customer ,order, payment, supplier,
installations and equipment. You can enter information and view the entered information.

H.P.DILEESHA MANDARA 40 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Input the customer details
The interface used by the user to enter customer information. It is designed to insert ,update
,search and delete customer information.

Figure 13 - ( Input the customer details)(mock flow)

Display customer details


Parts showing customer information entered.

Figure 14 - (display details)(mock flow)

H.P.DILEESHA MANDARA 41 UNIT 04- DATABASE DESING AND


DEVELOPMENT
PAYMENT DETAILS
This tab should be used when making payments related to the order.

Figure 15- (payment page)(mock floe)

CLICK ON THE PAYMENT TYPE


You must select the appropriate type of payment. This is designed so that you can choose the
type and pay easily.

Figure 16- (payment types)(mock flow)

H.P.DILEESHA MANDARA 42 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Order details
In this tab, you can enter a new order, update and delete an order. In addition, this is designed
so that you can find an order.

Figure 17 -(Order details)(mock flow)

Display order details


Parts showing order information entered.

Figure 18 - (show ordre details) (mock flow)

H.P.DILEESHA MANDARA 43 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Learning Outcomes:02
.
2.1 what is the SQL ?
SQL is a domain-specific programming language that was created to manage data in a linked
database management system or to streamline contact database management system streaming.
The Structured Query Language (SQL) is a specialized language for querying databases and
updating, removing, and requesting data.
SQL is an ANSI and ISO standard that is the de facto standard database query language’s was
accepted as a standard by the American National Standards Institute (ANSI) in 1986, and the
International Organization for Standardization (ISO) in 1987. The following is the significance
of the SQL language.

2.2 Important of the SQL


• SQL is in high demand by many multinational firms.
• SQL is also used on mobile platforms, such as IOS and Android.
• SQL is a global language.
• SQL is a free and open source language that anybody may learn and use.
• SQL allows you to handle databases without having to know much about coding.
• SQL is adaptable because it works with a variety of database systems, including Oracle,
IBM, Microsoft, and others.
• SQL is a language that is used to access data in a relational database.

2.3 SQL Sub Language

SQL consists of many sub-languages that provide different capabilities for SQL. The
capabilities provided by SQL sub-languages are design, data handling, querying and control.
SQL (Structured Query Language) statements are divided into sub-languages, which include
the data query language (DQL), the data definition language (DDL), the data control language
(DCL), and the data manipulation language (DML) (DML). The following are the sub-
language of the SQL Language.

H.P.DILEESHA MANDARA 44 UNIT 04- DATABASE DESING AND


DEVELOPMENT
SQL has 5 sub-languages.

Figure 19 - SQL sub language(techsnib.com/2022)

DDL – Data Definition Language.


DL has the ability to modify commands on the fly. It's stored in the database indefinitely. DDL
performs operations such as table creation and deletion. As a command, DDL
• Create
CREATE TABLE table name (
column1 datatype,
column2 datatype,
column3 datatype,
....
); (w3 school)

• Alter
ALTER TABLE table name
ADD column name datatype; (w3 school)

• Truncate
TRUNCATE TABLE table_name; (w3 school)

H.P.DILEESHA MANDARA 45 UNIT 04- DATABASE DESING AND


DEVELOPMENT
• Rename
RENAME tableName TO newTableName; (w3 school)

• Drop
DROP TABLE table_name; (w3 school)

DML – Data Manipulation Language.


DML is a database modification language. However, unlike DDL, DML is unable to perform automated
instructions. DML may be used to reverse data. Here is a list of DML commands.

• Insert
INSERT INTO TABLE_NAME
2. VALUES (value1, value2, value3, .... valueN); (w3 school)

• Update
UPDATE table_name SET [column_name1= value1,...column_nameN = valueN]
[WHERE CONDITION] (w3 school)

• Delete
DELETE FROM table _name [WHERE condition]; (w3 school)

DRL/DQL – Data Retrieval Language/Data Query Language.


Data Retrieval Language/Data Selection Language is the acronym for Data Retrieval
Language/Data Selection Language. It is a series of instructions for retrieving data from a
database server. It manipulates database data for presentation purposes, similar to the aggregate
function. The DML command, SELECT, is used in DRL/DSL to retrieve the data.

• Select
SELECT column1, column2, ...
FROM table_name; (w3 school)

TCL – Transaction Query Language.

H.P.DILEESHA MANDARA 46 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Transaction Control Language (TCL) instructions are used to handle database transactions.
These are used to keep track of the modifications that DML - statements make. It also allows
you to organize statements into logical transactions.
⚫ Commit
⚫ Roll-back
⚫ Save-point

DCL – Data Control Language.


A data control language (DCL) is a syntax for controlling access to data contained in a database
that is comparable to that of a computer programming language (authorization). It is an element
of the Structured Query Language in particular (SQL). One of the logical groups of SQL
Commands is Data Control Language.
⚫ Grate
⚫ Revoke

The advantages and disadvantages of SQL as follows.

Advantages Disadvantage

Cost - Some versions are too expensive for


Multiple data views – programmers.

The database does not have perfect control


Interactive Language due to hidden business rules.

Data retrieval does not necessitate a huge SQL has a challenging interface that makes
number of lines of code, hence no coding some users feel uneasy when working with
skills are necessary. the database.

Standardized Language

Table 4- SQL advantages and disadvantages(the author/2022)

H.P.DILEESHA MANDARA 47 UNIT 04- DATABASE DESING AND


DEVELOPMENT
2.4 Examples for DML , DDL and DRL ( INSERT , DELETE , UPDATE ,
SELECT and CREATE ) from the database.
The following is how to create a database related to polly pipe company. Below is a basic
commend that is relevant for that.

SELECT Command (DRL)


Data selection is done by this command. Below is the code for a selection.

Figure 20 - select commend (the author/2022)

Figure 21 select commend (the author/2022)

H.P.DILEESHA MANDARA 48 UNIT 04- DATABASE DESING AND


DEVELOPMENT
INSERT Command (DML)
The code is used to enter data. The following is the data entry to the database of polly pipe
company.

Figure 22 - INSERT command(the author/2022)

UPDATE Command (DML)


This code will be used to further update the entered data.

Figure 23- update command(the author/2022)

H.P.DILEESHA MANDARA 49 UNIT 04- DATABASE DESING AND


DEVELOPMENT
DELETE commend (DML)
This code used to delete unwanted data. Below is the relevant code to delete.

Figure 24 - delete commend(the author/2022)

2.5 Example for between/ in / group by / order by / having SQL statements


from database.

‘Where’ statement
When adding data from a single table or merging multiple tables, the SQL WHERE clause is
used to set a condition.

Figure 25 - WHERE(The author/2022)

H.P.DILEESHA MANDARA 50 UNIT 04- DATABASE DESING AND


DEVELOPMENT
In ’ Statement

Figure 26 - IN command(the author/2022)

‘Between’ statement
Values can be in the form of numbers, text, or dates. The BETWEEN operator takes into
consideration both the start and finish values.

Figure 27 - between(the author/2022)

H.P.DILEESHA MANDARA 51 UNIT 04- DATABASE DESING AND


DEVELOPMENT
‘Group by’ statement

Figure 28- group by(the author/2022)

‘Order by’ statement

Figure 29 - order by(the author/2022)

H.P.DILEESHA MANDARA 52 UNIT 04- DATABASE DESING AND


DEVELOPMENT
2.6 Polly pipe company system (VISUAL STUDIO SOFTWARE)
Microsoft Visual Studio is a development environment from Microsoft.. It's used to create,
among other things, websites, web apps , online services, and mobile apps. Below is the
software developed by visual studio for polly pipe company.

Login page

Figure 30- LOGIN PAGE (the author/2022)

Dashboard (Polly pipe)

Figure 31- dashboard(the author/2022)

H.P.DILEESHA MANDARA 53 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Customer page
Customer information entry, deletion and updates are done on this page.

Figure 32- customer register page(the author/2022)

Installation page
Installation information entry, deletion and updates are done on this page.

Figure 33 -Installation page(the author/2022)

H.P.DILEESHA MANDARA 54 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Staff page
staff information entry, deletion and updates are done on this page.

Figure 34 - staff page(the author/2022)

Supplies page
Supplies information entry, deletion and updates are done on this page.

Figure 35 - supplies page(the author/2022)

H.P.DILEESHA MANDARA 55 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Order page
Order information entry, deletion and updates are done on this page.

Figure 36 - order page (the author/2022)

Consolation-
The above is the software developed for polly pipe company. Namely the company login page,
dashboard page and related other pages are created above. In addition, a database has been
created for this company. Example codes are shown above and below is the database created
by visual studio software.

SQL Software (query tool)


The Query Tool allows you to run real-time queries, gather and analyse data, and generate
business reports. Regardless of where the data is stored: Microsoft SQL Server, Oracle,
MySQL, Teradata, IBM DB2/UDB, and other databases are all options.

A query is a request for data results as well as data action. A query can be used to find out the
answer to a simple question., conduct computations, aggregate data from many databases, or
even add, edit, or delete data from a table.

H.P.DILEESHA MANDARA 56 UNIT 04- DATABASE DESING AND


DEVELOPMENT
2.7 Database security
Data confidentiality, integrity, and availability may all be protected using database security.
Database security is the protection of a database against threats. There are various actions that
organizations take to ensure that their databases are protected from internal and external threats.
Database security includes the protection of the database, its contents, its database management
system, and the various applications that access it.

Benefits of Database Security


• Data security has been improved.
• Update mistakes were reduced, and consistency was improved.
• Reduced updating errors and increased consistency.
• The use of host and query languages has increased data access for users.
• Data integrity and application independence are enhanced.

Database security issues


• Data integrity and application independence are enhanced.
• Encryption flaws and data breaches are linked.
• Cyber security software that isn't up to par equals a database that isn't up to par.
• Database Security Issues Due to Flaws in Features

Types Database security mechanisms.

1. Backup and recovery of data


Every database management system should provide backup facilities for database
recovery after failure. It is always advisable to make backups of the database and log
the files periodically and ensure that the copies are in a safe place.

2. Encryption of data
The process of transforming plain text (unencrypted) data into cipher text is known as
data encryption (encrypted). Data that has been encrypted can be accessed with an
encryption key, whereas data that has been decrypted may be accessed with a
decryption key. Maintaining the security of your data.

H.P.DILEESHA MANDARA 57 UNIT 04- DATABASE DESING AND


DEVELOPMENT
3. Access controls
The three main forms of access control systems are discretionary access control (DAC),
role-based access control (RBAC), and mandatory access control (MAC).

4. Data integrity
Data integrity is an important part of information security. "Data integrity" refers to the
quality and consistency of data recorded in a database, data warehouse, data mart, or
other structure in its widest sense.

2.8 Polly Pipe DATABASE Commend. (VISUAL STUDIO DATABASE)

The STAFF database table


Below is the database created for the staff page.

Figure 37 - staff database(the author/2022)

H.P.DILEESHA MANDARA 58 UNIT 04- DATABASE DESING AND


DEVELOPMENT
The Customer database table
Below is the database created for the customer page.

Figure 38 - customer database(the author/2022)

H.P.DILEESHA MANDARA 59 UNIT 04- DATABASE DESING AND


DEVELOPMENT
The User name and password database

Below is the database created for the user name and password.

Figure 39 - user name and password database table

H.P.DILEESHA MANDARA 60 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Database add the correct user name and correct password

You must type this user name and password correctly to login to the system.

User name is “mandara’


Password is “123”

Figure 40 - correct the user name and password(the author/2022)

H.P.DILEESHA MANDARA 61 UNIT 04- DATABASE DESING AND


DEVELOPMENT
The order database table

Below is the database created for the order

Figure 41 - order database table(the author/2022)

H.P.DILEESHA MANDARA 62 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Adding accurate details to the database.

Figure 42 - staff details add(the author/2022)

Figure 43 - add details(the author/2022)

H.P.DILEESHA MANDARA 63 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Payment database table

Figure 44 - payment table(the author/2022)

Figure 45 add data(the author/2022)

H.P.DILEESHA MANDARA 64 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Data insert

Staff data insert

Figure 46 -staff data insert(the author/2022)


Customer data insert

Figure 47-customer data insert(the author/2022)

Installation data insert

Figure 48 -installation data insert(the author/2022)

H.P.DILEESHA MANDARA 65 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Insert data user name and password

Figure 49 insert data user name and password(the author/2022)

Database link

The database created by visual studio should be linked to the software of the polly pipe
company. The database should be linked. Below is a screen shot of the link to the database.

Figure 50 - database link(the author/2022)

Consolation
Above is a screen short of the polly pipe company database. Here are the codes for entering
data, creating table and linked to the database. The author used the SQL language to created
the database and visual studio to created the system

H.P.DILEESHA MANDARA 66 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Learning Outcomes:03
3.1 Test plan (polly pipe system check) and system check screen shot
This is where testing the software created above takes place. That is the software is tested
separately. This table is used by the author for testing.

Test case Input data Expected Actual result Test result


result (Pass /Fail)

Table 5- test case table(the author/2022)

The following is a test of the software.

Test case – 01
Enter incorrect user name and correct password
Correct user name - mandara
Test name - Pasindu

Test case Input data Expected Actual result Test result


result (Pass /Fail)

Enter incorrect User name – Your user Your user pass


User name and E soft name or name or
Correct Password –123 password password
password incorrect. Try incorrect. Try
again again
Table 6- test case 1(the author/2022)

H.P.DILEESHA MANDARA 67 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Incorrect User name and correct Password.

Figure 51 - incorrect User name(the author/2022)

Message box

Figure 52 - message box(the author/2022)

H.P.DILEESHA MANDARA 68 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Test case – 02
Enter incorrect password and correct user name
Correct password – 123
Test name – mandara

Test case Input data Expected Actual result Test result


result (Pass /Fail)

Enter incorrect User name – Your user Your user pass


password and Mandara name or name or
correct user Password –567 password password
name incorrect. Try incorrect. Try
again again
Table 7 - test case 2(the author/2022)

Figure 53 - incorrect password(the author/2022)

H.P.DILEESHA MANDARA 69 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Test case – 03
Enter incorrect user name and incorrect password
Correct user name is - mandara and correct password is – 123
Test name – dileepa mihiranga

Test case Input data Expected Actual result Test result


result (Pass /Fail)

Enter incorrect User name – Your user Your user pass


password and E soft name or name or
incorrect user Password –567 password password
name incorrect. Try incorrect. Try
again again
Table 8- test case 01|(the author/202

Figure 54 - incorrect password and incorrect user name(the author/2022|)

H.P.DILEESHA MANDARA 70 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Test case – 04
Enter correct user name and correct password
Correct user name is - mandara and correct password is – 123
Test name – mahinsa

Test case Input data Expected Actual result Test result


result (Pass /Fail)

Enter correct User name – Login Success Login Success pass


password and mandara
correct user Password –123
name

Table 9 test case 4(the autho9r/2022)

Figure 55 - successfully logged(the author/2022)

H.P.DILEESHA MANDARA 71 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Test case – 05
Login page exit
Click the exit button
Test name – chalani

Test case Input data Expected Actual result Test result


result (Pass /Fail)

Login page Close button Login page Login page did Fail
exit click close not close.

Table 10 - test case 5(the author/2022)

Figure 56 - login page exit(the author/2022)

Test case why it fail?


This did not work because the wrong code was written. The correct code is written to the correct
this. Correct code is [ close(); ]

H.P.DILEESHA MANDARA 72 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Test case – 06
Go to the next page
Go to the next page
Test name – Thanuji

Test case Input data Expected Actual result Test result


result (Pass /Fail)

Go to the next Go to the next Go Next page Go next page Pass


page page

Table 11 - test case 5(the author/2022)

Figure 57 - click the login(the author/2022)

Figure 58 -dashboard(the author/2022)

H.P.DILEESHA MANDARA 73 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Test case – 07
Go to the login page
Go to the login page
Test name – thamasha

Test case Input data Expected Actual result Test result


result (Pass /Fail)

Go to the login Go to the Go to the Go to the Fail


page login page login page login page
.

Table 12 - test case 5(the author/2022)

Test case why it fail?


This did not work because the wrong code was written. The correct code is written to the correct
this.

3.2 Test procedure ( Interface testing )

A test method is a written description of the test cases that will be run on one or more target
software modules. Test processes can be run. The VERIFIER process runs a test procedure on
its target modules and generates an exception report that shows which test cases, if any, failed.
⚫ Road Map to the Testing Process.
⚫ Communication Methods
⚫ Test Environment Requirements.
⚫ Improved Functional Coverage.
⚫ Prevents Unnecessary Testing.

The following is a test procedure of software developed for polly pipe .

H.P.DILEESHA MANDARA 74 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Interface testing

Test case Input data Tester name Test date

01 Enter incorrect Pasindu 24/04/2022


User name and
Correct password
02 Enter incorrect Mandara 24/04/2022
password and
correct user name

03 Enter incorrect Dileepa mihiranga 24/04/2022


password and
incorrect user name

04 Enter correct user Mahinsa 24/04/2022


name and correct
password

05 Login page exit Chalani 25/04/2022

06 Go to the next page Thanuji 25/04/2022

07 Go to the login page Thamasha 25/04/2022

Table 13 - Test procedure (the author/2022)

H.P.DILEESHA MANDARA 75 UNIT 04- DATABASE DESING AND


DEVELOPMENT
3.3 Database testing
Database testing is a type of software testing that examines the structure, tables, triggers, and
other aspects of the database under test. It also examines data consistency and integrity, which
may entail writing complicated queries to load and stress test the database and analyse its
response.

We can cover the following database activities during the database testing:
o Testing data integrity
o Checking data validity
o Performance check relate
o Triggers and Functions in the database
o Testing various procedures

The following are the database testing tools,

Figure 59 - database testing tools(javatpoint/2019)

H.P.DILEESHA MANDARA 76 UNIT 04- DATABASE DESING AND


DEVELOPMENT
3.4 Database testing (polly pipe company database)

Database testing

01 Select Mandara 31/04/2022

02 Where Mandara 31/04/2022

03 Update Mandara 31/04/2022

04 Order by Mandara 31/04/2022

Group by Mandara 31/04/2022


05

06 In Mandara 31/04/2022

07 Between Mandara 31/04/2022

08 Delete Mandara 31/04/2022

09 Insert Mandara 31/04/2022

Table 14 - database test(the author/2022)

H.P.DILEESHA MANDARA 77 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Consolation
The software has been tested three times. That is , namely test case , interface testing and
database testing. There have been seven test case and two of them have failed. The reason for
this failure is this is because the author did not write the code correctly. Once this is identified,
the author will correct it immediately. In addition, interface testing and database testing were
performed and no errors were detected. In addition, this software should be available to several
users. The details are as follows.

3.5 User Feedback (POLLY PIPE company)


To get software information you need to give it to a select few users and get information about
it form them. The following leaflet will be used for this purpose.

Date

Customer name / position

Excellent GOOD BAD

1. Access speed

2. Ease of handling

3. Logging in to the system

4. Data insert , data delete and


data update

5. Dashboard test( turn to the


next page)

6. Exit the software (close


button click)

Signature

Table 15- user feedback form(the author/2022)

H.P.DILEESHA MANDARA 78 UNIT 04- DATABASE DESING AND


DEVELOPMENT
FIRST USER

Date 01/05/2022

Customer name / position PASINDU / IT STUDENT

Excellent GOOD BAD

7. Access speed YES

8. Ease of handling YES

9. Logging in to the system YES

10. Data insert , data delete and YES


data update

11. Dashboard test( turn to the YES


next page)

12. Exit the software (close YES


button click)

Signature [email protected]

Table 16 - FIRST USER(THE AUTHOR/2022)

H.P.DILEESHA MANDARA 79 UNIT 04- DATABASE DESING AND


DEVELOPMENT
SECOND USER

Date 01/05/2022

Customer name / position DILEEPA MIHIRANGA / TEACHER

Excellent GOOD BAD

13. Access speed YES

14. Ease of handling YES

15. Logging in to the system YES

16. Data insert , data delete and YES


data update

17. Dashboard test( turn to the YES


next page)

18. Exit the software (close YES


button click)

Signature [email protected]

Table 17-second user(the author/2022)

H.P.DILEESHA MANDARA 80 UNIT 04- DATABASE DESING AND


DEVELOPMENT
THIRED USER

Date 01/05/2022

Customer name / position MANDARA /STUDENT

Excellent GOOD BAD

19. Access speed YES

20. Ease of handling YES

21. Logging in to the system YES

22. Data insert , data delete and YES


data update

23. Dashboard test( turn to the YES


next page)

24. Exit the software (close YES


button click)

Signature [email protected]

Table 18 - thired user(the author/2022)

H.P.DILEESHA MANDARA 81 UNIT 04- DATABASE DESING AND


DEVELOPMENT
FOURTH USER

Date 01/05/2022

Customer name / position CHALANI / IT STUDENT

Excellent GOOD BAD

25. Access speed YES

26. Ease of handling YES

27. Logging in to the system YES

28. Data insert , data delete and YES


data update

29. Dashboard test( turn to the YES


next page)

30. Exit the software (close YES


button click)

Signature [email protected]

Table 19 - Fourth user(the author/2022)

H.P.DILEESHA MANDARA 82 UNIT 04- DATABASE DESING AND


DEVELOPMENT
FIVE USER

Date 01/05/2022

Customer name / position MAHINSA / IT STUDENT

Excellent GOOD BAD

31. Access speed YES

32. Ease of handling YES

33. Logging in to the system YES

34. Data insert , data delete and YES


data update

35. Dashboard test( turn to the YES


next page)

36. Exit the software (close YES


button click)

Signature [email protected]

Table 20 - Five user(the author/2022)

H.P.DILEESHA MANDARA 83 UNIT 04- DATABASE DESING AND


DEVELOPMENT
SIX USER

Date 01/05/2022

Customer name / position CHAMALEE

Excellent GOOD BAD

37. Access speed YES

38. Ease of handling YES

39. Logging in to the system YES

40. Data insert , data delete and YES


data update

41. Dashboard test( turn to the YES


next page)

42. Exit the software (close YES


button click)

Signature [email protected]

Table 21 Six user(the author/2022)

H.P.DILEESHA MANDARA 84 UNIT 04- DATABASE DESING AND


DEVELOPMENT
All information

Date

Customer name / position

Excellent GOOD BAD

43. Access speed 05 01

44. Ease of handling 02 04

45. Logging in to the system 04 02

46. Data insert , data delete and 03 03


data update

47. Dashboard test( turn to the 03 03


next page)

48. Exit the software (close 05 01


button click)

Signature

Table 22 all information(the author/2022)

Consolation

Feedback was received from six user. Accordingly no user has said anything bad. Five people
have commented on the speed of the software. Only two have commented on the ease of
operating the software. Four people have said good things about the logging system. Three
people said good to the data insert , data delete and data update. Three people said good things
about the dashboard and five people said good things about the exit button. Here is a table with
all the relevant information.

H.P.DILEESHA MANDARA 85 UNIT 04- DATABASE DESING AND


DEVELOPMENT
Learning Outcomes:04

4.1 user documentation


The material you supply to the end user in order for them to be more successful with your
product or service is known as user documentation. User documentation, often known as user
guides, instruction manuals, or user manuals, is designed to help your customers through the
process of learning about your product. The following is a list of user dominating by polly pipe
company.

PAGE 1

USER DOCUMENTATION
POLLY PIPE SYSTEM

2022

Figure 60 - user guide line(the author/2022)

H.P.DILEESHA MANDARA 86 UNIT 04- DATABASE DESING AND


DEVELOPMENT
PAGE 2

BASIC REQUIREMENTS OF SYSTEM


Computer Must Have Following Requirements

⚫ OPERATING SYSTEM - WINDOWS 10


⚫ RAM - 4GB OR MORE
⚫ PROCCESSOR - i5 DUAN COREPROCCESSOR
3-3.5 GHz
⚫ HARD DISK - HDD / SSD
500 GB OR MORE
⚫ INPUT DEVICES - PRINTER / FAX / SCANNER

OTHER REQUIREMENTS

⚫ RESTORE AND BACKUP OPTION


⚫ NETWORK INTERFACE BANDWITH 100Mbps

H.P.DILEESHA MANDARA 87 UNIT 04- DATABASE DESING AND


DEVELOPMENT
PAGE 3

LOGIN PAGE (OPEN THE SYSTEM)

According to this login from you can insert correct user name you have and
Insert your correct password correctly you can login to Polly pipe system
If you don't want to login system you can click close button.

OR

Additionally you can log in to the system via EMAIL , FACEBOOK


INSTERGRAM AND TWITER,

H.P.DILEESHA MANDARA 88 UNIT 04- DATABASE DESING AND


DEVELOPMENT
PAGE 4

DARSH BORD

Here the user has created an easy interface. Coming to this after logging in
Correctly.
CLICKING on the file here will show you the revelation page
Here you have a page is ,
CUSTOMER
INSTALATION
SATFF
SUPPLES
EQUIPEMENT
PAYMENT and
OEDER.

H.P.DILEESHA MANDARA 89 UNIT 04- DATABASE DESING AND


DEVELOPMENT
PAGE 5

CUSTOMER PAGE

You can add your data above customer from add click insert button. You want to
Update your data before you fill your can click update button after insert.
If you want to delete some data before you filled in above from text
Box delete button, click properly.

You want to next form such as order page , installation page ,


Equipment page or payment page please back to the dashboard and select
The necessary page you want to go.

H.P.DILEESHA MANDARA 90 UNIT 04- DATABASE DESING AND


DEVELOPMENT
PAGE 6

STAFF PAGE

You can add your data above staff from add click insert button. You want to
Update your data before you fill your can click update button after insert.
If you want to delete some data before you filled in above from text
Box delete button, click properly.

You want to next form such as order page , installation page ,


Equipment page or payment page please back to the dashboard and select
The necessary page you want to go.

H.P.DILEESHA MANDARA 91 UNIT 04- DATABASE DESING AND


DEVELOPMENT
PAGE 7

ORDER PAGE

You can add your data above ORDER from add click insert button. You want to
Update your data before you fill your can click update button after insert.
If you want to delete some data before you filled in above from text
Box delete button, click properly.

You want to next form such as staff page , installation page ,


Equipment page or payment page please back to the dashboard and select
The necessary page you want to go.

H.P.DILEESHA MANDARA 92 UNIT 04- DATABASE DESING AND


DEVELOPMENT
4.2 Technical Documentation
Technical documentation is information on how a product or service operates. It was
established with a developer in mind to define the usage, functionality, or architecture of a
product, system, or service in technical terms.

Benefits of technical documentation


• It gets less difficult to solve problems.
• Instead of relying on people's presence, you rely on their expertise.
• Strong technical documentation saves money and effort in support.
• It saves time for your personnel.
• It facilitates decision-making.

Below shows polly pipe company of the technical documentation .

SOFTWARE SPECIFICATION

Microsoft SQL server 2014 or above


Microsoft .NET framework 4.5 or above
Office 2007 or above
Microsoft Visual Studio 2019 Runtime Libraries
Operating system: Microsoft Windows 7 or above

HARDWARE SPECIFICATION
Processor: Core i5 TH GRN or above
RAM -4GB
HARD DISK – 500GB minimums
DVD writer

H.P.DILEESHA MANDARA 93 UNIT 04- DATABASE DESING AND


DEVELOPMENT
4.2 FLOW CHAER for polly pipe system

In terms of inputs and outputs, a data flow diagram (DFD) depicts how data is handled by a
system. The concentration, as its name suggests, is on the flow of information, including
where it originates from, where it flows, and how it is kept.

LOGIN DATA FLOW DIAGRAM

Figure 61 - LOGIN (the author/2022)

H.P.DILEESHA MANDARA 94 UNIT 04- DATABASE DESING AND


DEVELOPMENT
INSERT DATA FLOW DIAGRAM

Figure 62 - insert data(the author/2022)

H.P.DILEESHA MANDARA 95 UNIT 04- DATABASE DESING AND


DEVELOPMENT
UPDATE DATA FLOW DIAGRAM

Figure 63 - UPDATE DATA(the author/2022)

H.P.DILEESHA MANDARA 96 UNIT 04- DATABASE DESING AND


DEVELOPMENT
DELETE DATA FLOW DIAGRAM

Figure 64 - DELETE DATA(the author/2022)

H.P.DILEESHA MANDARA 97 UNIT 04- DATABASE DESING AND


DEVELOPMENT
SELECT DATA FLOW DIAGRAM

Figure 65 - SELECT DATA (the author/2022)

H.P.DILEESHA MANDARA 98 UNIT 04- DATABASE DESING AND


DEVELOPMENT
4.3 VISUAL STUDIO CODE AND insert ,view and delete CODE

LOGIN code and DATABASE connect code

Figure 66 - login and database connect code(the author/2022)

DATA VIEW code

Figure 67 - DATA VIEW CODE(THE AUTHOR/2022)

H.P.DILEESHA MANDARA 99 UNIT 04- DATABASE DESING AND


DEVELOPMENT
DATA INSERT CODE

Figure 68 - INSERT CODE(THE AUTHOR/2022)

DATA DELETE CODE

Figure 69 - DELETE code(the author/2022)

H.P.DILEESHA MANDARA 100 UNIT 04- DATABASE DESING AND


DEVELOPMENT
4.4 Future Improvements to the Database System

SQL databases may be phased out in favor of more distributed models in the future, with
NoSQL and Hadoop vying for first place. For years, SQL has had a stranglehold over
databases. The relational database concept first appeared in the 1970s and soon became
popular.

• Database archiving might be used to minimize storage space and limit the quantity of
data saved that isn't needed.
• The database system does not yet include automated error handling, but it may be
introduced in the future to give customers with quick answers to failures.
• The database system now only allows administrators access, however it might be
enhanced to provide other levels of user access.
• The system might employ notifications for particular activities, such as when a work is
ready to be sent, and so on.

H.P.DILEESHA MANDARA 101 UNIT 04- DATABASE DESING AND


DEVELOPMENT
References

1. www.javatpoint.com. 2021. SQL Commands: DDL, DML, DCL, TCL, DQL - javatpoint.
[online] Available at: https://www.javatpoint.com/dbms-sql-command [Accessed 17 APIRL
2022].
2. Oracle.com. 2021. What is a database?. [online] Available at:
https://www.oracle.com/database/what-is-database/ [Accessed 17 APIRAL 2022].

3. Oracle.com. 2022. What is a database?. [online] Available at:


<https://www.oracle.com/database/what-is-database/> [Accessed 1 May 2022].

4 Your Bibliography: 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 1 May 2022].

5 Your Bibliography: Mysql.com. 2022. MySQL :: MySQL Workbench. [online] Available at:

<https://www.mysql.com/products/workbench/> [Accessed 1 May 2022].

6 Watt, A., 2021. Chapter 12 Normalization. [online] Opentextbc.ca. Available at:

https://opentextbc.ca/dbdesign01/chapter/chapter-12-normalization/ [Accessed 1

MAY 2022].

7 Your Bibliography: Google.com. 2022. Before you continue to Google Search. [online] Available

at:

<https://www.google.com/search?q=mockflow&oq=MOC&aqs=chrome.1.69i57j69i59j0i67i131i

433j0i67l3j46i67i131i433j0i67l3.2141j0j15&sourceid=chrome&ie=UTF-8>

8 [Accessed 30 April 2022].

H.P.DILEESHA MANDARA 102 UNIT 04- DATABASE DESING AND


DEVELOPMENT

You might also like