Uploaded by Vidura Vishwajith (vish)

e117596-1633803747375-89548-madushan-silva-unit-04-database-design-and-development-2021

advertisement
lOMoARcPSD|19676896
E117596-1633803747375-89548- Madushan Silva Unit 04
Database design and Development 2021
database design development (ESOFT Metro Campus)
Studocu is not sponsored or endorsed by any college or university
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
DATABASE DESIGN AND
DEVELOPMENT
MADUSHAN SILVA
REG NO: COL 00070163
UNIT 04 DDD
ASSIGNMENT NO:03
SUNDAY BATCH
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Higher Nationals
Internal verification of assessment decisions – BTEC (RQF)
INTERNAL VERIFICATION – ASSESSMENT DECISIONS
BTEC HND in Computing
Programme title
Assessor
Internal Verifier
Unit 04: Database Design & Development
Unit(s)
Database Solution for Polly Pipe
Assignment title
MADUSHAN SILVA
Student’s name
Pass
List which assessment criteria
the Assessor has awarded.
Merit
Distinction
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
student work?
Y/N
Has the work been assessed
accurately?
Y/N
Is the feedback to the student:
Give details:
• Constructive?
• Linked to relevant assessment criteria?
• Identifying opportunities for
improved performance?
• Agreeing actions?
Y/N
Y/N
Y/N
Does the assessment decision need
amending?
Y/N
Y/N
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
signature
Date
Programme Leader
signature (if required)
Date
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Higher Nationals - Summative Assignment Feedback Form
Student Name/ID
MADUSHAN SILVA / COL 00070163
Unit Title
Unit 04:
Assignment Number
1
Database Design & Development
MISS MADUSHI
Assessor
Submission Date
Date Received
1st submission
Re-submission Date
Date Received 2nd
submission
Assessor Feedback:
LO1 Use an appropriate design tool to design a relational database system for a substantial problem
Pass, Merit & Distinction
Descripts
P1
M1
D1
LO2 Develop a fully functional relational database system, based on an existing system design
Pass, Merit & Distinction
Descripts
P2
P3
M2
M3
D2
LO3 Test the system against user and system requirements.
Pass, Merit & Distinction
Descripts
P4
M4
D2
LO4 Produce technical and user documentation.
Pass, Merit & Distinction
Descripts
Grade:
P5
M5
Assessor Signature:
D3
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.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Assignment Feedback
Formative Feedback: Assessor to Student
Action Plan
Summative feedback
Feedback: Student to Assessor
Assessor
signature
Date
Student
signature
Date
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Pearson Higher Nationals in
Computing
Unit 04: Database Design & Development
Assignment 01
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
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
The font size should be 12 point, and should be in the style of Time New Roman.
Use 1.5 line spacing. Left justify all paragraphs.
Ensure that all the headings are consistent in terms of the font size and font style.
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.
1.
2.
3.
4.
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
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
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.
Student’s Signature:
(Provide E-mail ID)
MADUSHAN SILVA
Date:
(Provide Submission Date)
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
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
Data base system for Polly Pipe
Assignment Title
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:
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
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
SHA1
SHA8
SHA2
SHA11
SHA23
SHA66
SHA55
Name
Dave Clark
John Smith
Freddy Davies
McCloud
Satpal Singh
Winstn Kodogo
Alison Smith
Type
Plumber
Installation Manager
Aquatics installer
Aquatics installer
Plumber
Aquatics installer
Brick Layer
Equipment Type Table
Type
Tanks
Equipment
20 gallon tank, 50 gallon tank, 100
gallon tank, 200 gallon tank
Standard, Super
Standard, Super
Air driven, Undergravel
Thermostats
Air Pumps
Filters
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Instillation Management Form
Installation
ID
Installation
Type
234
Freshwater Oak
Tropical
House, 17
Wroxton
Road,
Hertfordsh
ire, H5 667
654
Freshwater Bayliss
Cold
House,
Orange
Street,
Kent, K7
988
Sally
Dench
767
Marine
Eaglestone
Castle,
Eaglestone
, Kent
Perry
Vanderru
ne
943
Marine
23
Sackville
Street,
Wilts. W55
Eric
Mackinto
sh
157
Freshwater Humbertso Perry
Tropical
n Castle,
Vanderru
Kent, K8
ne
MADUSHAN SILVA
Installation Customer Equipment
Name and
Address
Types of Staff
Required
Lee A.
sun
1 x Carpenter
1 x Aquatics
installer
1 x Electrician
2 air
pumps
200 gallons
fish tank
1x
standard
thermostat
2 air
pumps
200 gallons
fish tank
Large
Gravel Bag
2x
standard
thermostat
s
2 x 200
gallons fish
tanks
500 Wood
panels
5x
Carpenters
1x
Installation
Manager
1 x Aquatics
installer
1 x Plumber
3 x Labourers
Period of
Staff
assignm
ent
From 1st
Septemb
er 2012
1st June
2005 –
1st June
2011
10 x
From
Carpenters
30th June
2x
2012
Installation
Manager
1 x Aquatics
installer
1 x Plumber
3 x Labourers
No staff required
2 air
pumps
200 gallons
fish tank
1x
standard
thermostat
2 air
1 x Aquatics
pumps
installer
400 gallons
fish tank
3x
standard
thermostat
1st
Septemb
er 2005
– 1st
Septemb
er 2012
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
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
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
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.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Contents
Activity 1.1............................................................................ Error! Bookmark not defined.
Description about Database ........................................................................................... 15
File oriented system ....................................................................................................... 15
Functional requirements (User requirements)................................................................ 17
Non – functional requirements (System requirement) ................................................... 17
Conceptual design .......................................................................................................... 18
Relationship ................................................................................................................... 24
Cardinality ...................................................................................................................... 24
Entity relationship (ER) diagram ................................................................................... 26
Activity 1.2......................................................................................................................... 27
User Interface ................................................................................................................. 27
Comparing of the requirement ....................................................................................... 32
Activity 2.1......................................................................................................................... 39
Structured query language (SQL) .................................................................................. 39
DDL (Data Definition Language) .................................................................................. 39
Implementation of validation methods .......................................................................... 46
Importance of the security mechanism .......................................................................... 50
Activity 2.2......................................................................................................................... 52
Data Manipulation Language (DML) ............................................................................ 52
Activity 3.1......................................................................................................................... 59
Activity 3.2......................................................................................................................... 59
Test plane ....................................................................................................................... 59
Test plane of the author .................................................................................................. 59
Interface testing .............................................................................................................. 65
Explanation of how the selected test data is to improve the effectiveness of ................ 68
Testing ............................................................................................................................ 68
User feedback forms ...................................................................................................... 68
Activity 4............................................................................................................................ 71
User guide ...................................................................................................................... 71
UML diagrams ............................................................................................................... 79
Author suggestions future improvements of the database ............................................. 80
Optimize queries ............................................................................................................ 80
Create optimal indexes ................................................................................................... 80
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Get a stronger CPU ........................................................................................................ 80
Allocate more memory................................................................................................... 81
Data defragmentation ..................................................................................................... 81
Disk types ....................................................................................................................... 81
Database version ............................................................................................................ 82
Summary ........................................................................................................................ 82
List of figures
Figure 1 entity .................................................................................................................... 18
Figure 2 simple attribute .................................................................................................... 19
Figure 3 composite attribute ............................................................................................. 19
Figure 4 derived attribute .................................................................................................. 20
Figure 5 single-value attribute ........................................................................................... 20
Figure 6 multi-value attribute ............................................................................................ 20
Figure 7 key attribute ......................................................................................................... 21
Figure 8 primary key .......................................................................................................... 22
Figure 9 relationship .......................................................................................................... 24
Figure 10 one-to-one ......................................................................................................... 25
Figure 11 one-to-many....................................................................................................... 25
Figure 12 many-to-many .................................................................................................... 25
Figure 13 entity relation(ER) diagram ................................................................................ 26
Figure 14 login interface .................................................................................................... 27
Figure 15 home interface ................................................................................................... 27
Figure 16 customer details interface ................................................................................. 28
Figure 17 payment details interface .................................................................................. 28
Figure 18 product details interface .................................................................................... 29
Figure 19 employee details interface ................................................................................ 29
Figure 20 job details interface ........................................................................................... 30
Figure 21 installation details interface .............................................................................. 30
Figure 22 depot details interface ....................................................................................... 31
Figure 23 equipment detail interface ................................................................................ 31
Figure 24 1st requirement ................................................................................................. 32
Figure 25 2nd requirement ................................................................................................ 33
Figure 26 3rd requirement ................................................................................................. 34
Figure 27 4th requirement ................................................................................................. 35
Figure 28 5th requirement ................................................................................................. 36
Figure 29 6th requirement ................................................................................................. 37
Figure 30 7th requirement ................................................................................................. 38
Figure 31 create ................................................................................................................. 40
Figure 32 create. ................................................................................................................ 40
Figure 33 alter .................................................................................................................... 41
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Figure 34 drop .................................................................................................................... 41
Figure 35 Polly pipe system ............................................................................................... 42
Figure 36 Polly pipe system. .............................................................................................. 43
Figure 37 insert customer details ...................................................................................... 43
Figure 38 update customer details .................................................................................... 44
Figure 39 delete customer details ..................................................................................... 44
Figure 40 search customer details ..................................................................................... 45
Figure 41 implementation of validation methods ............................................................. 46
Figure 42 inner join ............................................................................................................ 47
Figure 43 left outer join ..................................................................................................... 48
Figure 44 right outer join ................................................................................................... 48
Figure 45 full outer join ...................................................................................................... 49
Figure 46 login .................................................................................................................... 50
Figure 47 login c# code ...................................................................................................... 51
Figure 48 insert .................................................................................................................. 52
Figure 49 update ................................................................................................................ 53
Figure 50 select .................................................................................................................. 53
Figure 51 group by ............................................................................................................. 54
Figure 52 order by .............................................................................................................. 55
Figure 53 having ................................................................................................................. 56
Figure 54 between ............................................................................................................. 57
Figure 55 where ................................................................................................................. 58
Figure 56 test plane............................................................................................................ 59
Figure 57 interface testing ................................................................................................. 65
Figure 58 user feedback form ............................................................................................ 68
Figure 59 user guide ........................................................................................................... 71
Figure 60 UML diagrams .................................................................................................... 79
Activity 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.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Description about Database
A database is a collection of information that is organized so that it can be easily accessed,
managed, and updated.
Data is organized into rows, columns, and tables, and it is indexed to make it easier to find
relevant information. Data is updated, expanded, and deleted as new information is added.
Databases process workloads to create and update themselves, querying the data they
contain and running applications against it.
File oriented system
A transport company has approached Smart Movers. Smart Movers Company transports
chemical products from one location to another.
So far, they have been keeping traditional files. Now, Smart Movers Company is a
developed company. Because of that need to have an automated system to handle day-today operational activities to meet customer demands.
There are many disadvantages of the system as follows,
1. Data redundancy
2. Data inconsistency
3. Data not shareable
4. Data dependence
5. Data isolation
6. Difficult to access
7. Less data security
Data redundancy
Independent data files record the same data duplicated.
Data inconsistency
Many versions of the same data may exist. The same update must be done in all the
occurrences of date items.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Data not shareable
Users have very little opportunity to share data outside of their applications.
Data dependence
Descriptions of files, records, and data items are embedded within individual application
programs.
Data isolation
No logical links among data in several files.
Difficult to access
In the traditional file approach data difficult to access and manipulate.
Less data security
Since programs are working with the file in an ad hoc manner, difficult to enforce security
constraints.
Requirement
There are two types of requirements. Namely,
1. Functional requirements (User requirements)
2. Non-functional requirements (System requirements)
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Functional requirements (User requirements)
Functional requirement specification documents the operations and activities that a system
must offer to the customer. In other words, a functional requirement will describe a
particular behavior of function of the system when certain conditions are met.
Mainly this company has seven functional requirements. They are shown below
1. Manipulating chemical product details.
2. Manipulating customer’s details.
3. Manipulating jobs details.
4. Manipulating load details.
5. Manipulating the transport unit details.
6. Manipulating payment details.
7. Manipulating depots details.
Non – functional requirements (System requirement)
on- functional requirements define the qualities or attributes of the resulting system. Nonfunctional requirements place restrictions on the product being developed. Examples of
Non- functional requirements include security, usability, reliability, performance,
Extendibility, Modifiability, Availability requirements.
1. Security – Security requirement is one of the essential and sensitive components of
the required system, security requirements may include specific elements. Such as
Authentication,Confidentiality,Integrity,Availability,Authorization,and Non-repudiation
2. Usability – Usability is a quality attribute that assesses how easy systems are to use.
Usability based on this component. Memorability, Errors, Satisfaction, Efficiency,
Learnability
3. Reliability - The system provides the right tools for discussion, problem-solving it
must be made sure that the system is reliable in its operations and for securing the
sensitive details.
4. Performance – Performance requirements concern the speed of operation of a
system. Mainly performance testing deals with Workload, Throughput, Resource
utilization, Response time.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
5. Extendibility- Features can be enriched, hence ensuring service evolution.
6. Modifiability - Services should be easily modified under the evolution of company
resources.
7. Availability- If the internet service gets disrupted while sending information to the
server, the information can be sent again for verification.
Conceptual design
This is an analysis stage of the development of the database. Firstly, the developer identifies
the scope of database requirements for the proposed information system and 2nd step is to
analyze overall data requirements for company functions supported by the database. After
that, the developer develops a preliminary conceptual data model including entities and
relationships. Then, compare the preliminary conceptual data model with the enterprise
data model. After that developers develop a detailed conceptual data model, including all
entities, relationships, attributes, and company rules. Then, make a conceptual data model
consistent with other models of information systems. The final of this stage developer
populates the repository with all conceptual database specifications.
ER Model is based on
• Entities and their Attributes
• Relationship among entities
Entity
The entity is a person, place, object, event, or concept where an application wishes to
maintain the data. There are two types of entities namely,
• Weak Entity – An entity type that has an existence dependency on some other
entity type
• Strong Entity – An entity that exists independently of other entity types.
Employee
Figure 1 entity
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Attribute
The attribute is a property or a characteristic of an entity type that is of interest to the
organization. (Shown in oval). Types of attributes available.
Simple attribute
The value of the attribute cannot be broken down into parts.
NIC
Figure 2 simple attribute
Composite attribute
The value of the attribute can be subdivided into parts.
Figure 3 composite attribute
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Derived attribute
Derived attributes are the attributes that do not exist in the physical database, but their
values are derived from other attributes present in the database.
Figure 4 derived attribute
Single-value attribute
Single-value attributes contain a single value.
Figure 5 single-value attribute
Multi-value attribute
Multi-value attributes may contain more than one value.
Figure 6 multi-value
attribute
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Key attribute
The key attribute is the unique characteristic of the entity.
Figure 7 key attribute
Entities
Key attributes Simple
(Primary key) attributes
Customer_Id
Address,
Customer_type,
NIC, Gender
Composite
attributes
Name
multivalued
Derived
attributes
attributes
Phone_number -
2. Payment
Payment_Id
-
-
-
3. Product
Product_Id
-
-
-
4.
Employee
Employee_Id
Name
Phone_number Age
5. Job
Job_Id
-
-
-
6.
Installation
Installation_Id
Installation_type, Date
-
-
7. Depot
Depot_Id
Location
-
-
-
8.
Equipment
Equipment_Id
Tanks,
Thermostats,
Air Pumps,
Filters
-
-
-
1.
Customer
MADUSHAN SILVA
Discount,
Unit_price,
Total_price,
Payment_date
Product_name,
Brand_name,
Quantity, Price,
Product_type
Employee_type,
Gender, NIC,
Salary, Address,
Date_of_birth,
Name, Job_type
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Primary key
The primary key is a key in a relational database that is unique for each record.
Figure 8 primary key
Entities
Primary key
1. Customer
Customer_Id
2. Payment
Payment_Id
3. Product
Product_Id
4. Employee
Employee_Id
5. Job
Job_Id
6. Installation
Installation_Id
7. Depot
Depot_Id
8. Equipment
Equipment_Id
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Attributes
Entity
Attributes
1. Customer
Cus_No,Cus_Type,F_Name,M_Name,_L_Name,Tel,Address
2. Payment
Pay_No,Installation_Type,Cus_Type,Prod_Type
3. Product
Prod_Type,Price,Prod_No
4. Employee
Emp_No,B_Day,F_Name,M_Name,L_Name,Tel,Addres
5. Job
J_No
6. Installation
Installation_type,Installation_No
7. Depot
D_No,D_Name
8. Equipment
Equipment_type,Equipment_No
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Relationship
The logical association among entities is called relationship. Relationships are mapped
with entities in many ways. Mapping cardinalities define the number of association
between two entities.
Figure 9 relationship
Cardinality
Cardinality defines the number of entities in one entity set, which can be associated with
the
number of entities of another set via relationship. Common cardinalities are:
• One-to-one
• One-to-many or many-to-one
• Many to many
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
one-to-one (1:1)
When only one instance of an entity is associated with the relationship, it is marked as
'1:1'. The following image reflects that only one instance of each entity should be
associated with the relationship. It depicts one-to-one relationship.
Figure 10 one-to-one
one-to-many (1:M)
When more than one instance of an entity is associated with a relationship, it is marked as
'1:N'. The following image reflects that only one instance of entity on the left and more
than one instance of an entity on the right can be associated with the relationship. It depicts
one-to-many relationship.
Figure 11 one-to-many
many-to-many (M:M)
Many-to-many − The following image reflects that more than one instance of an entity on
the left and more than one instance of an entity on the right can be associated with the
relationship. It depicts many-to-many relationship.
Figure 12 many-to-many
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Entity relationship (ER) diagram
The ER diagram for the scenario is as follows.
Figure 13 entity relation(ER) diagram
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Activity 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.
User Interface
The author designed the user interface given below.
1. Login interface
Polly Pipe
Figure 14 login interface
2. Home interface
Installation details
Equipment details
Figure 15 home interface
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
3. Customer details interface
Figure 16 customer details interface
4. Payment details interface
Figure 17 payment details interface
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
5. Product details interface
Figure 18 product details interface
6. Employee details interface
Figure 19 employee details interface
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
7. Job details interface
Figure 20 job details interface
8. Installation details interface
INSTALLATION
DETAILS
Installation Id
Installation type
Date
Figure 21 installation details interface
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
9. Depot details interface
Figure 22 depot details interface
10. Equipment details interface
EQUIPMENT DETAILS
Equipment Id
Tanks
Thermostats
Air pumps
Filters
Figure 23 equipment detail interface
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Comparing of the requirement
1st requirement – Manipulating chemical product details
1. Insert product
2. Update product
3. Delete product
4. Search product
For the 1st requirement author build ER diagram and logical design bellow
Figure 24 1st requirement
According to examples, the author fulfills the requirement of manipulating chemical
product details.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
2nd requirement – Manipulating customer’s details
1. Insert customer
2. Update customer
3. Delete customer
4. Search customer
For the 2nd requirement author build ER diagram and logical design bellow.
Figure 25 2nd requirement
According to examples, the author fulfills the requirement of manipulating the customer’s
details.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
3rd requirement – Manipulating job details
1. Insert job
2. Update job
3. Delete job
4. Search job
For the 3rd requirement author build ER diagram and logical design bellow.
Figure 26 3rd requirement
According to examples, the author fulfills the requirement of manipulating the job details.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
4th requirement – Manipulating installation details.
1. Insert installation
2. Update installation
3. Delete installation
4. Search installation
For the 4th requirement author build ER diagram and logical design bellow.
Figure 27 4th requirement
According to examples, the author fulfills the requirement of manipulating load details.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
5th requirement – Manipulating equipment unit details
1. Insert equipment unit
2. Update equipment unit
3. Delete equipment unit
4. Search equipment unit
For the 5th requirement author build ER diagram and logical design bellow
Figure 28 5th requirement
According to examples, the author fulfills the requirement of manipulating the transport
unit details.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
6th requirement – Manipulating payments details
1. Insert payments
2. Update payments
3. Delete payments
4. Search payments
For the 6th requirement author build ER diagram and logical design bellow
Figure 29 6th requirement
According to examples, the author fulfills the requirement of manipulating payment
details.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
7th requirement – Manipulating depots details
1. Insert depots
2. Update depots
3. Delete depots
4. Search depots
For the 7th requirement author build ER diagram and logical design bellow
Figure 30 7th requirement
According to examples, the author fulfills the requirement of manipulating depots details.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Activity 2.1
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.
Structured query language (SQL)
SQL is a database programming language designed for the retrieval and management of
data in the relational database management system (RDBMS).
SQL is a database sublanguage consists of two main parts. They are Data Definition
Language and Data Manipulation Language.
• DDL – Data Definition Language commands are used to define a database
including
creating, altering, dropping tables, and establishing integrity constraints.
• DML – Data Manipulation Language commands are used to query a database
and
maintain a database including, inserting, modifying, and deleting data.
• DCL – Data Control Language commands are used to control a database,
including
administering features such as security and concurrency.
DDL (Data Definition Language)
DDL is a language that is used for defining a database schema or modifies an existing
one. It also supports to maintain data integrity in a database. It includes,
• Creating indexes for relations
• Creating a physical storage structure for each relation
• Maintaining integrity constrains
• Creating domain definitions
• Creation of schema for each relation
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Mainly three DDL querying in SQL. Namely,
• CREATE
• ALTER
• DROP
CREATE
CREATE TABLE command is used to create a new table in a database.
Syntax of the CREATE –
CREATE TABLE table_name (column_name1 data_type, column_name2
data_type,
column_name3 data_type,….column_n data_type)
Figure 31 create
Figure 32 create.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
ALTER
The ALTER TABLE statement is used to add, delete, or modify columns in an existing
table. This statement is also used to add and drop various constraints on an existing
table.
Syntax of the ALTER –
ALTER TABLE table_name DROP COLUMN column_name
ALTER TABLE table_name ADD column_name data_type
ALTER TABLE table_name ALTER COLUMN column_name data_type
Figure 33 alter
DROP
The DROP TABLE statement is used to drop an existing table in a database.
Syntax of the DROP –
DROP TABLE table_name
Figure 34 drop
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
IDE
IDE is an Integrated Development Environment. Collection of integrated programs,
assemble, execute, and debug programs.
E.g. - Visual Studio, PHPStorm, NetBeans, etc.
Polly pipe system
Suppose the user wanted to find customer details. Then he must go through these faces.
The
user is allowed to log in to the system only if he/she knows the password and username.
Figure 35 Polly pipe system
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Figure 36 Polly pipe system.
After logging in, the user can insert a customer to the database, update existing
customer’s details, delete a customer from the database, and search for customer details.
Examples of them are given below.
Figure 37 insert customer details
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Figure 38 update customer details
Figure 39 delete customer details
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Figure 40 search customer details
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Implementation of validation methods
The user may make some mistakes while using this system. These validation methods
are applied to prevent them. If the author does not keep these validation methods, the
system may enter incorrect information. Below are some mistakes mentioned that the
user may make.
Figure 41 implementation of validation methods
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
JOIN query
A JOIN clause is used to combine rows from two or more tables, based on a related
column between them.
Syntax of the JOIN query –
SELECT table_name1.*, table_name2.*
FROM
table_name1, table_name2
WHERE
table_name1. table_name2_primarykey = table_name2.table_name2_primarykey
Below is a JOIN query showing all the information about payment details, job details,
customer details
Mainly there are three types of JOIN queries. Such as,
• INNER JOIN
• LEFT OUTER JOIN
• RIGHT OUTER JOIN
• FULL OUTER JOIN
INNER JOIN
The INNER JOIN keyword return rows when there is at least one match in both tables.
Syntax of the INNER JOIN query –
SELECT table_name1.*, table_name2.*
FROM table_name1
INNER JOIN table_name2
ON table_name1. table_name2_primarykey = table_name2. table_name2_primarykey
Figure 42 inner join
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
LEFT OUTER JOIN
The left outer join returns a result set table with the matched data from the two tables
and then the remaining rows of the left table and null from the right table's columns.
Syntax of the LEFT OUTER JOIN query –
SELECT table_name1.*, table_name2.*
FROM table_name1
LEFT OUTER JOIN table_name2
ON table_name1. table_name2_primarykey = table_name2. table_name2_primarykey
Figure 43 left outer join
RIGHT OUTER JOIN
The right outer join returns a result set table with the matched data from the two tables
being joined, then the remaining rows of the right table and null for the remaining left
table's columns.
Syntax of the RIGHT OUTER JOIN query –
SELECT table_name1.*, table_name2.*
FROM table_name1
RIGHT OUTER JOIN table_name2
ON table_name1. table_name2_primarykey = table_name2. table_name2_primarykey
Figure 44 right outer join
FULL OUTER JOIN
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
The full outer join returns a result set table with the matched data of two tables then the
remaining rows of both left tables and then the right table.
Syntax of the FULL OUTER JOIN query –
SELECT table_name1.*, table_name2.*
FROM table_name1
FULL OUTER JOIN table_name2
ON table_name1. table_name2_primarykey = table_name2. table_name2_primarykey
Figure 45 full outer join
Security mechanisms
Security mechanisms are technical tools and techniques that are used to implement
security services. A mechanism might operate by itself, or with others, to provide a
particular service. As a general rule now, if the user’s company collects any data about
customers, suppliers, or the wider community, it is stored on a database somewhere.
This data may be sensitive and private and can be subject to strict privacy agreements
including those referred to above. For example, user’s customers may provide you with
an email address, postal address, and phone number when they purchase something
from the user. However, if this data is accessed without authority, sold to third parties,
or otherwise misused, the user could be subject to strict legal action from the people
whose privacy has been compromised. Database security is any form of security used to
protect databases and the information they contain from compromise. Examples of how
stored data can be protected include:
• Software – software is used to ensure that people can’t gain access to the database
through viruses, hacking, or any similar process.
• Physical controls – an example of a physical component of database security could be
the constant monitoring of the database by company personnel to allow them to identify
any potential weaknesses and/or compromises.
• Administrative controls – this refers to things like the use of passwords, restricting the
access of certain people to certain parts of the database, or blocking the access of some
company personnel altogether
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Importance of the security mechanism
Database security is more than just important: it is essential to any company with any
online component. Sufficient database security prevents data to bring lost or
compromised, which may have serious ramifications for the company both in terms of
finances and reputation. Database security mechanism helps:
• Company’s block attacks, including ransomware and breached firewalls,
which in turn keeps sensitive information safe.
• Prevent malware or viral infections, which can corrupt data, bring down a
network, and spread to all end devices.
• Ensure that physical damage to the server does not result in the loss of data.
• Prevent data loss through the corruption of files or programming errors.
The author added a login interface to the Polly pipe company’s system to improve the
security of the system. The author designed a login interface to log in to the system.
Because of the login interface, not anyone can access the database without a username
and password.
Figure 46 login
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Polly pipe
Figure 47 login c# code
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Activity 2.2
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
Data Manipulation Language (DML)
Data Manipulation Language commands are used to query a database and maintain a
database including, inserting, modifying, and deleting data.
SQL supports data Manipulation. DML is a language that provides a set of operations to
support the basic data manipulation operations on the data held in the databases. Data
manipulation operations usually include the followings:
• Insertion of new data into the database
• Modification of data stored in the database
• Deletion of data from the database
• Retrieval of data contained in the database
INSERT INTO, UPDATE, DELETE FROM, SELECT is the commands of the Data
Manipulation Language.
INSERT
INSERT is used to adds one or more records to a database table.
Syntax of the INSERT –
INSERT INTO [table_name] [column(s)] VALUES [value(s)]
Figure 48 insert
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
UPDATE
UPDATE command modifies data of one or more records.
Syntax of the UPDATE –
UPDATE [table_name] SET [column_name = value] WHERE[condition]
Figure 49 update
SELECT
SELECT command retrieves data from a database.
Syntax of the DELETE –
SELECT [column_name(s)] FROM [table_name] WHERE [conditions]
Figure 50 select
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
SQL statements
Mainly there are five SQL statements. Such as,
• GROUP BY
• ORDER BY
• HAVING
• BETWEEN
• WHERE
GROUP BY
The GROUP BY statement groups’ rows that have the same values into summary rows
like "find the number of customers in each country".
Syntax of the GROUP BY –
SELECT column_name(s)
FROM table_name
WHERE condition
GROUP BY column_name(s)
ORDER BY column_name(s)
Figure 51 group by
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
ORDER BY
The ORDER BY keyword is used to sort the result-set in ascending or descending order.
The ORDER BY keyword sorts the records in ascending order by default. To sort the
records in descending order, use the DESC keyword.
Syntax of the ORDER BY –
SELECT column_name1, column_name2, ...column_namen
FROM table_name
ORDER BY column_name1, column_name2, ...colomn_namen ASC|DESC
Figure 52 order by
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
HAVING
The HAVING clause was added to SQL because the WHERE keyword could not be
used with aggregate functions.
Syntax of the HAVING –
SELECT column_name(s)
FROM table_name
WHERE condition
GROUP BY column_name(s)
HAVING condition
ORDER BY column_name(s)
Figure 53 having
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
BETWEEN
The BETWEEN operator selects values within a given range. The values can be
numbers, text, or dates. The BETWEEN operator is inclusive: begin and end values are
included.
Syntax of the BETWEEN –
SELECT column_name(s)
FROM table_name
WHERE column_name BETWEEN value1 AND value2
Figure 54 between
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
WHERE
The WHERE clause is used to filter records. The WHERE clause is used to extract only
those records that fulfill a specified condition. The WHERE clause is not only used in
the SELECT statement, it is also used in UPDATE, DELETE statement…etc.
Syntax of the WHERE –
SELECT column_name1, column_name2, ...column_namen
FROM table_name
WHERE condition
Figure 55 where
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
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.
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.
Test plane
A test plan is a detailed document that outlines the test strategy, objectives, schedule,
estimation, and deliverables and resources required for testing.
Test plane of the author
9th October 2021
Figure 56 test plane
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Introduction
Polly pipe company told to create a system to
make their work easier. This is the final test plan
of that system.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Interface testing
Figure 57 interface testing
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Explanation of how the selected test data is to improve the effectiveness of
Testing
The author has checked everything that can happen in the database and system. This
made the writer realize that the system was flawless. But if there was some kind of error
in the system.
From these results, it is clear that the system and database behave the way the author
wants it to. If the system does not behave the way the author wants it to, the author
identifies it and improve the system because of test plan data.
User feedback forms
Figure 58 user feedback form
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Feedback form 1
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Feedback form 2
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Activity 4
Produce a technical documentation and a user guide for the developed database system.
Suitable diagrams diagram (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.
User guide
A user guide is essentially a book-length document containing instructions on installing,
using or troubleshooting a hardware or software product.
Polly pipe system
October 2021
Figure 59 user guide
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
UML diagrams
A UML diagram means Unified Modelling Language. UML diagram is a diagram based
on the UML with the purpose of visually representing a system along with its main
actors, roles, actions, artefacts or classes, in order to better understand, alter, maintain,
or document information about the system.
Figure 60 UML diagrams
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
Author suggestions future improvements of the database
The author suggests these suggestions future improvement of the database
• Optimize queries
• Create optimal indexes
• Get a stronger CPU
• Allocate more memory
• Data defragmentation
• Disk types
• Database version
Optimize queries
In most cases, performance issues are caused by poor SQL queries performance. When
trying to optimize those queries, the author will run into many dilemmas, such as whether
to use IN or EXISTS, whether to write a subquery or a join. While the author can pay a
good dime on consulting services, the author can also speed up SQL queries using query
optimizers such as EverSQL Query Optimizer, which will both speed up the query and
explain the recommendations, so the author could learn for the future. Essentially,
EverSQL is one of the most effective online SQL query optimizers currently available; it
is capable of optimizing not just MySQL, but MariaDB and PerconaDB queries as well and the author can try it out entirely free!
Create optimal indexes
Indexing, when done properly, can help to optimize the author’s query execution duration
and increase overall database performance. Indexes accomplish this by implementing a
data structure that helps to keep things organized and makes locating information easier;
basically, indexing speeds up the data retrieval process and makes it more efficient,
thereby saving the author (and author’s system) time and effort.
Get a stronger CPU
The better author’s CPU, the faster and more efficient the author’s database will be.
Therefore, if the author’s database underperforms, the author should consider upgrading
to a higher-class CPU unit; the more powerful author’s CPU is, the less strain it will be
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
under when tasked with multiple applications and requests. Also, when assessing CPU
performance, it’s important to keep track of all aspects of CPU performance, including
CPU ready times (which can tell the author about the times' author’s system attempted to
use the CPU but couldn’t because all of the CPU’s resources were too busy or otherwise
occupied).
Allocate more memory
Similar to how having a CPU that is not powerful enough can impact the efficiency of a
database, so too can a lack of memory. After all, when there is not enough memory
available in the database to perform the work that is being asked of, database performance
is understandably going to take a hit. Having more memory available will help to boost
the system’s efficiency and overall performance. A good way to check if the author needs
more memory is to look at how many page faults author’s systems has; if the number of
faults is high (in the thousands, for example) it means that author’s host is running low on
(or potentially entirely out of) available memory space. Therefore, when trying to
improve database performance it’s important to both look at how much memory the
author has total as well as page faults (to determine if you need additional memory to
improve efficiency). Also, the author can consider increasing the amount of memory used
by MySQL. author's recommendation is to allow it to allocate 70% of the total memory
(assuming the database is the only application on that server). The author can modify the
amount of memory allocated to the database using the innodb_buffer_pool_size key in
MySQL’s configuration file, my.cnf.
Data defragmentation
If the author having trouble with a slow database, another possible solution is data
defragmentation. When many records are written to the database and time goes by, the
records are fragmented in MySQL’s internal data files and on the disk itself. The
defragmentation of the disk will allow grouping the relevant data together, so I/O related
operations will run faster, which will directly impact on overall query and database
performance. Also, on a somewhat related note it’s important to have enough disk space
in general when running a database; if the author looking to truly optimize database
performance, make sure to utilize disk defragmentation while also keeping plenty of free
disk space available for author’s database.
Disk types
Fetching the results of even a single query can require millions of i/o operations from the
disk, depending on the amount of data the query needs to access for processing, and
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
depending on the amount of data returned from the query. Therefore, the type of disks in
the author’s server can greatly impact the performance of your SQL queries. Working
with SSD disks can significantly improve the author’s overall database performance and
specifically the author’s SQL query performance.
Database version
Another major factor in database performance is the version of MySQL author currently
deploying. Staying up to date with the latest version of the author’s database can have a
significant impact on overall database performance. One query may perform better in
older versions of MySQL than in new ones, but when looking at overall performance,
new versions tend to perform better.
Summary
Ultimately, whether the author chooses to utilize one or more of these methods, the author
can rest assured that there are plenty of options for improving the author’s database
performance. Test them one by one to see which one will have the largest impact on the
author’s database.
MADUSHAN SILVA
REG NO:COL 00070163
UNIT 04 DDD
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
lOMoARcPSD|19676896
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.
MADUSHAN SILVA
REG NO:COL 00070163
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
UNIT 04 DDD
lOMoARcPSD|19676896
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.
MADUSHAN SILVA
REG NO:COL 00070163
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
UNIT 04 DDD
lOMoARcPSD|19676896
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.
MADUSHAN SILVA
REG NO:COL 00070163
Downloaded by Vidura Vishwajith (viduravishwajith355@gmail.com)
UNIT 04 DDD
Download