Uploaded by Cool Martt

e116765-1634752502190-110100-unit-04-database-design-and-development-pamudi

advertisement
lOMoARcPSD|15318833
E116765-1634752502190-110100-Unit 04 - Database design
and Development - Pamudi
HND in Computing (ESOFT Metro Campus)
StuDocu is not sponsored or endorsed by any college or university
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Higher Nationals
Internal verification of assessment decisions – BTEC (RQF)
INTERNAL VERIFICATION – ASSESSMENT DECISIONS
Programme title
BTEC HND in Computing
Assessor
Dileepa Mihiranga
Internal Verifier
Unit 04: Database Design & Development
Unit(s)
Database Solution for Polly Pipe
Assignment title
L.B Pamudi Manushika
Student’s name
List which assessment criteria
the Assessor has awarded.
Pass
Merit
P1 P2 P3 P4 P5
Distinction
M1 M2
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
dileepa.mihiranga@esoft.lk
Assessor signature
Internal Verifier signature
Date
19/01/2022
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
Page | 1
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Higher Nationals - Summative Assignment Feedback Form
Student Name/ID
Unit Title
Unit 04:
Assignment Number
1
Database Design & Development
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: Pass
P5
M5
D3
Assessor Signature: dileepa.mihiranga@esoft.lk
Date: 19/01/2022
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.
Page | 2
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Assignment Feedback
Formative Feedback: Assessor to Student
Learner has shown that he is clearly engaging with the subject material, even though it shows overall lack of analysis.
Learner shows clear understanding on database concepts. Learner is successful in designing the database, implementing a
functional database according to the given scenario. In future you would develop well if you you could be more analystical
and critical in your evaluations.
Action Plan
Summative feedback
Feedback: Student to Assessor
Assessor
signature
dileepa.mihiranga@esoft.lk
Student
signature
Date
19/01/2022
Date
Page | 3
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Pearson Higher Nationals in
Computing
Unit 04: Database Design & Development
Assignment 01
Page | 4
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
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
Page | 5
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Unit 04: Database Design &
Development
Assignment 01
L.B Pamudi Manushika
HND BATCH 23
Page | 6
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Table of Contents
Figure numbers .................................................................................................................... 7
Activity 1.............................................................................................................................. 9
Activity 1.1..................................................................................................................... 10
1.1.1
Introduction .................................................................................................. 10
1.1.2
The user and system requirements of Polly pipe ......................................... 11
Functional requirements ............................................................................................. 11
Non – functional requirements ................................................................................... 12
System requirements .................................................................................................. 12
1.1.3 Explanation of Polly pipe’s ER Diagram .......................................................... 13
1.1.4 Er diagram for Polly Pipe...................................................................................... 14
1.1.5 Logical Schema ..................................................................................................... 15
1.1.6 Data normalization ................................................................................................ 16
(Watt, 2021) ................................................................................................................. 17
1.1.7 Provided logical schema normalization ................................................................ 18
Figure numbers
Figure 1 DBMS .................................................................................................................. 10
Page | 7
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Figure 2 ER Diagram for Polly pipe (Author 2021) .......................................................... 14
Figure 3 logical schema for Polly Pipe (Author 2021) ...................................................... 15
Figure 4 (Author 2021) ...................................................................................................... 20
Figure 5 (Author 2021) ...................................................................................................... 20
Figure 6(Author 2021) ....................................................................................................... 21
Figure 7 Login form (2021 Author) ................................................................................... 23
Figure 8 Main form (Author 2021) .................................................................................... 24
Figure 9 Employee form (Author 2021) ............................................................................ 25
Figure 10 Customer form (Author 2021) ........................................................................... 26
Figure 11 Installation form (Author 2021) ........................................................................ 27
Figure 12 Equipment form (Author 2021) ......................................................................... 28
Figure 13 Payment form (Author 2021) ............................................................................ 29
Figure 14(Author 2021) ..................................................................................................... 36
Figure 15(Author 2021) ..................................................................................................... 36
Figure 16(Author 2021) ..................................................................................................... 37
Figure 17(Author 2021) ..................................................................................................... 37
Figure 18(Author 2021) ..................................................................................................... 38
Figure 19 Login form (Author 2021) ................................................................................. 39
Figure 20 Employee form(Author 2021) ........................................................................... 40
Figure 21 Customer form (Author 2021) ........................................................................... 41
Figure 22 Equipment form (Author 2021) ......................................................................... 42
Figure 23 Installation form (Author 2021) ........................................................................ 43
Figure 24 Payment form (Author 2021) ............................................................................ 44
Figure 25 Select statement (Author 2021) ......................................................................... 46
Figure 26 Select form (Author 2021) ................................................................................. 47
Figure 27 Where form (Author 2021) ................................................................................ 47
Figure 28 Select form (Author 2021) ................................................................................. 48
Figure 29 Update statement (Author 2021) ....................................................................... 48
Figure 30 Update statement (Author 2021) ....................................................................... 49
Figure 31 Between statement (Author 2021) ..................................................................... 49
Figure 32 In statement (Author 2021)................................................................................ 50
Figure 33 Group statement (Author 2021) ......................................................................... 51
Figure 34 Order statement (Author 2021).......................................................................... 52
Figure 35 User guide (Author 2021) .................................................................................. 61
Figure 36 User guide (Author 2021) .................................................................................. 62
Figure 37 User guide (Author 2021) .................................................................................. 63
Table 1Normalisation (Author 2021) ................................................................................. 18
Table 2Normalisation (Author 2021) ................................................................................. 18
Table 3 Test case01 (Author 2021) ................................................................................... 53
Table 4 Test case 02 (Author 2021) ................................................................................... 54
Table 5 Test case 03 (Author 2021) ................................................................................... 55
Table 6 (Author 2021)........................................................................................................ 59
Table 7 (Author 2021)........................................................................................................ 60
Page | 8
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Activity 1
LO1 Use an appropriate design tool to design a relational database system for a substantial
problem
Page | 9
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Activity 1.1
What is database?
A database is a collection of information or data stored electronically in a computer
system. Such databases are managed by a database management system (DBMS).
Processing of data in a database is done by using rows and columns in tabular form to
make it easier to check the data. That way the data can be easily managed. Today, SQL
(structured query language) is the most used query for writing and querying data.
Figure 1 DBMS
(What is a database? 2021)
1.1.1 Introduction
Polly pipe is a water sports provider and installer based in Braintree, England. Its
manual database system wants to design and implement a database that meets the data
requirements as computerized system. Therefore, this system was designed and
developed the solution for water sports provider and installer to meet their business
customers.
Polly pipe is maintaining their data in manual system. Manual system is a paper record.
Page | 10
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
In computerized system control the company’s data of maintainable assets through an
asset register, easy to control
Customer’s request of several installations, but each
installation is tailor-made for a specific customer can include carpenters and masons as
well as water installers, use equipment such as aquariums, air pumps and thermostats
etc. Easy to control the issues and documentation of several installations.
Database design process is,
1. Requirement’s collection and analysis
2. Conceptual design
3. Logical design/ data model mapping
4. Physical design
1.1.2 The user and system requirements of Polly pipe
When defining requirements, two types of requirements are served different purposes.
When identify the user requirements of the above scenario. They are,
1. Functional requirements
2. Non – functional requirements
Functional requirements
All the tasks required to upgrade the database are called functional requirements.
Updating the data required to add to the system is one of the main requirements of the
user. The customer's database should be able to enter the customer's data from the Poly
Pipe company's database. Ability to enter information about employees, what duties
they are assigned, etc. Provide the equipment needed for an installation or order, what
type of equipment the organization needs, and the user needs to have information in the
Page | 11
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
system. (Polly Pipe system should ability to give customer details, employee details,
payments, installation, equipment details.) It should have creative interface.
Non – functional requirements
Non – functional requirements specify for not covered all the areas by functional
requirements. The details in system design were implement by functional requirements.
Various types of non – functional requirements are accessibility, audit, efficiency,
security, accuracy, availability, backup and restore, capacity, certification, compliance,
reliability, responsibility, virus guard, compatibility of software.
System requirements
System requirements are the building blocks developers use to develop the system.
System requirements are categorized as either functional or non – functional
requirements. Functional requirements differentiate something that a user needs to
perform their work very well. For example, in the above scenario system should be able
to provide the required information for customers several installations and handle daily
operations that is functional requirements.
1. Hardware requirements and Software requirements
8GB Ram, HDD, SSD, Frequency 3-3.5 GHZ and more, Network interface
bandwidth 100Mbps, SSD for SQL 200Gb, Operating system – windows 10,
Page | 12
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Hard disk space 250GB+, intel i7 dual core processor, Printer, Fax, scanner,
Restore and backup options, Anti-virus software.
1.1.3 Explanation of Polly pipe’s ER Diagram
In Polly pipe company’s customers when ordered installation it will be installation by
employees and customers pay payment. Company’s ER Diagram and Attributes are,
1. Customer - cus_id, cus_name, cus_address, cus_contact no:
2. Employee - emp_id, emp_name, emp_address, emp_contact no: emp_types,
salary
3. Equipment – equi_id, equi_type, equi_name, equi_price, quantity
4. Installation – inst.id, inst. type, start job, end job, address
5. Payment - payment _id, paym_type, paym_date
Learner has identified some of the functional and non-functional requirements of the system.
Page | 13
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
1.1.4 Er diagram for Polly Pipe
Learner has identified the some main entities, attributes and relationships and have drawn the ER
diagram
Figure 2 ER Diagram for Polly pipe (Author 2021)
Page | 14
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
1.1.5 Logical Schema
Figure 3 logical schema for Polly Pipe (Author 2021)
Learner has converted the ER diagram into a logical relational schema.
Page | 15
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
1.1.6 Data normalization
Data normalization is the process of organizing data into a database. It also includes
creating tables and interacting with pre-designed rules to make it more flexible by
eliminating redundancy, data security and database incompatibility. Excess data storage
is a waste of disk space and can cause various maintenance problems. If different tables
have the same data, the data in each table must be changed. For example, if you intend
to change the customer's address, changing the customer desk data is sufficient.
"Incorrect dependence" means that when looking at a customer's desk for a customer's
address, it should not contain personal information about the employee's salary. They
should be at the employee desk.
There are several rules for normalizing a database.
First normalization form
Here, removing repetitive groups from individual tables, creating separate tables for
each dataset, and identifying data using a primary key. And not using the same desk to
store the same data.
For example, a company wants to store name and contact details of their employees.
Second normal form
Use separate tables for values that apply to multiple reports. Connect tables with a
foreign key and do not rest on a table key other than the corresponding desk key.
For example, suppose we want to store data on teachers who teach in a school and the
subjects they teach. There can be several rows for the same teacher at the table as one
teacher can teach more than one subject.
Page | 16
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Third normal form
In any case, if the contents of a group of fields apply to more than one report in a table,
such areas can be listed separately.
For example, a recruitment table may include the name and address of a candidate's
university, but a complete list of universities is required to send a group mail. If the
information is stored on the job seeker's desk, there is no way to list the universities
where there are no candidates. What can be done here is to create a separate university
table and then attach it to the candidate desk. Although this is theoretical, there are
problems with its implementation. This is because in some cases this method is not
suitable for small tables. This is most appropriate for a frequently changing data party.
Fourth normal form
This is also known as the Boyce Code Normal Form (BCNF) and exists as the fifth
standard form, but in practice it is considered a coincidence. Ignoring these rules may
result in less than a complete database plan, but it does not affect performance.
For example, if think that there is a company that employs more than one employee, can
indicate that they are working in several departments of the organization.
(Watt, 2021)
Page | 17
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
1.1.7 Provided logical schema normalization
Employee
ID
Name
type
SHA1
Dave Clark
Plumber
SHA8
John smith
Installation Manager
SHA2
Freddy Davies
Aquatics installer
SHA11
McCloud
Aquatics installer
SHA23
Satpal Singh
Plumber
SHA66
Winston Kodogo Aquatics installer
SHA55
Alison Smith
Brick layer
Table 1Normalisation (Author 2021)
Employee
ID
Name
SHA1
Plumber
SHA8
Installation Manager
SHA2
Aquatics installer
SHA11
Aquatics installer
SHA23
Plumber
SHA66
Aquatics installer
SHA55
Brick layer
Table 2Normalisation (Author 2021)
Learner has simply explained the concept of normalization and have applied normalization to the
derived relational schema.
Page | 18
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
1.1.7 What is validation?
Data validation is important in data processing, analysis, data verification and data
processing. It is important to verify any data before use. Making decisions based on
flawed data is risky. Therefore, any organization in the world has its own set of rules for
storing and maintaining its corporate data. Examples of data validation rules ,
•
Data type (ex. integer, float or string)
•
Range check (ex. A number between 10-50)
•
Uniqueness (ex. Postal code)
•
Consistent expressions (ex. Using one of St., Str, Street)
•
No null values
Data validation
•
Insert
•
Update
•
Delete
(What is Data Validation? How It Works and Why It's
Important, 2021)
Page | 19
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Insert Data
Figure 4 (Author 2021)
Update Data
Figure 5 (Author 2021)
Page | 20
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Delete Data in database
Figure 6(Author 2021)
Learner has just simply explained the validation mechanisms to validate data in the tables with examples.
Page | 21
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Activity 1.2
1.2.1 Interface of Polly pipe
Simple interface design to user for get main idea of system. It is can designed on
wireframe or any interface designing tool.
Polly pipe company has 6 interface forms that author created. They are,
•
Login form
•
Main form
•
Employee form
•
Customer form
•
Installation form
•
Equipment form
•
Payment form
Page | 22
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Login form
Polly Pipe company system main interface is Login form. It is design on simple
interface include username and password.
Figure 7 Login form (2021 Author)
Page | 23
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Main Form
Figure 8 Main form (Author 2021)
Page | 24
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Employee details form
Figure 9 Employee form (Author 2021)
Page | 25
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Customer details form
Figure 10 Customer form (Author 2021)
Page | 26
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Installation details form
Figure 11 Installation form (Author 2021)
Page | 27
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Equipment details form
Figure 12 Equipment form (Author 2021)
Page | 28
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Payment details form
Figure 13 Payment form (Author 2021)
Learner has designed sample interfaces to input and output data using an interface designing tool
Page | 29
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Activity 2
LO2 Develop a fully functional relational database system, based on an existing system
design
Activity 2.1
2.1.1 What is SQL?
SQL is a structured query language. It is a computer language for storing,
manipulating, and retrieving data stored on a relational database. A database is
a table that includes rows and columns.
SQL mainly targeting understand and analyze of databases include data tables.
For a example, A company had a many data to be stored. Already Company
has a departments and gathered data on it . At that time company place a SQL
for stored their database.
Importance of SQL
1. SQL is a global language.
2. SQL is a open source language and that can be use easily to user or
learner.
3. Mainly SQL have managed billions of data in world.
4. SQL even use on smart devices and use iOS and android.
5. Many global companies place sql at their demand.
Page | 30
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Activity 2.2
2.2.1 What is DDL Statements?
SQL has 6 sublanguages.
•
DDL – Data Definition Language.
•
DML – Data Manipulation Language.
•
DRL/DQL – Data Retrieval Language/Data Query Language
•
TCL – Transaction Query Language.
•
DCL – Data Control Language.
•
SCL – Session Control Language.
2.2.1.1 DDL
DL can change commands automatically. It’s permanently saved in the database. DDL
does things like create tables and delete tables. DDL as a command,
•
DROP
•
ALTER
•
CREATE
•
TRUNCATE
Page | 31
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
➢ Create used
Syntax
•
CREATE TABLE TABLE_NAME (COLUMN_NAME DATATYPES[,….]);
Example
•
CREATE TABLE CUSTOMER(Name VARCHAR2(50), ADDRES VARCHAR
2(100), DOB DATE);
➢ Drop used
Syntax
•
DROP TABLE table__name;
Example
•
DROP TABLE PAYMENT;
➢ Alter used
Syntax
ALTER TABLE table _name ADD column__name COLUMN-definition;
Example
•
ALTER TABLE CUS_DETAILS ADD(ADDRESS VARCHAR2(50));
•
ALTER TABLE CUS_DETAILS MODIFY (NAME VARCHAR2(50));
Page | 32
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
➢ Truncate used
1. TRUNCATE TABLE table_name;
Example:
•
TRUNCATE TABLE CUSTOMER;
2.2.1.2 DML
DML is used to modify databases. But DML cannot execute automatic
commands like DDL. Data can be reversed via DML. Here are under DML
commands,
• INSERT
• UPDATE
• DELETE
➢ Insert used
Syntax
1. INSERT INTO TABLE_NAME
2. VALUES (value1, value2, value3, .... valueN);
For example:
1. INSERT INTO
Employee (Address, Name) VALUES ("oak
street", "sally
dench");
Page | 33
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
➢ Update used
Syntax:
•
UPDATE table_name SET [column_name1= value1,...column_nameN = valueN]
[WHERE CONDITION]
For example:
1. UPDATE Installation
2. SET Name = 'Marine'
3. WHERE Installation__Id = '767'
➢ DELETE USED
Syntax:
1. DELETE FROM table _name [WHERE condition];
For example:
1. DELETE FROM Payment
2. WHERE PaymentID="22";
(SQL Commands: DDL, DML, DCL, TCL, DQL - javatpoint, 2021)
Page | 34
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
2.2.2 Usage of DDL
The key here is the ability to create tables and manage created tables using data definition
language. Create a new tables, structured and recorded stored create in table and also
delete structured data and stored on table in database and used to add new attributes in
database.
Below commands are Polly pipe database system usage:
Page | 35
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Select command
Figure 14(Author 2021)
Figure 15(Author 2021)
Page | 36
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Update Command
Figure 16(Author 2021)
Figure 17(Author 2021)
Page | 37
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Delete Command
Figure 18(Author 2021)
The learner has provided overview about SQL
Page | 38
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
2.2.3 Polly pipe company system
Login form
Figure 19 Login form (Author 2021)
Page | 39
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Employee details form
Figure 20 Employee form(Author 2021)
Page | 40
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Customer details form
Figure 21 Customer form (Author 2021)
Page | 41
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Equipment details form
Figure 22 Equipment form (Author 2021)
Page | 42
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Installation details form
Figure 23 Installation form (Author 2021)
Page | 43
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Payment details form
Figure 24 Payment form (Author 2021)
Page | 44
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
2.2.4 Database security
Database security can protect confidentiality, integrity and availability of data. Database
security is secure database from threats. Database security threats in following situation,
•
Theft fraudulent
•
Confidentiality loss
•
Data privacy loss
•
Integrity loss
•
Data availability loss
Types pf Database security mechanisms are,
•
Access controls
•
Views
•
Data integrity
•
Encryption of data
Access control
Access control can protect database on unauthorized access.
Data encryption
Encryption give protection on sensitive data communicate on public networks.
Page | 45
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
2.2.5 SQL statements
Below are Select, where, update, Between, in, Group By, Order By statements.
‘Select’ SQL Statement
Figure 25 Select statement (Author 2021)
Page | 46
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Figure 26 Select form (Author 2021)
‘Where’ statement
Figure 27 Where form (Author 2021)
Page | 47
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Figure 28 Select form (Author 2021)
‘Update’ statement
Figure 29 Update statement (Author 2021)
Page | 48
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Figure 30 Update statement (Author 2021)
‘Between’ statement
Figure 31 Between statement (Author 2021)
Page | 49
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
‘In ’ Statement
Figure 32 In statement (Author 2021)
Page | 50
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
‘Group by’ statement
Figure 33 Group statement (Author 2021)
Page | 51
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
‘Order by’ statement
Figure 34 Order statement (Author 2021)
Learner has developed a relational database system according to the ER diagram using DDL statements.
but need to provide more source code
Page | 52
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Activity 3
LO3 Test the systems against user and system requirements
Activity 3.1
3.1.1 Test plan
Database Testing can check schemas, tables etc. of the database. Database system testing
is effectively and validate to ensure quality of the system.
Test case – 01
Test case – Enter incorrect username or password
Test name – Pamudi Manushika
Test case
Input data
Expected
Actual result
result
Enter incorrect
Username –
username and
England
password
Password –123
Login not
success!
Test result
(Pass /Fail)
Login not
Pass
success!
Table 3 Test case01 (Author 2021)
Page | 53
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Test case – 02
Test case – Enter correct username and incorrect password
Test name – Thamasha thathsaranai
Test case
Input data
Expected
Actual result
result
Enter correct
Username –
username and
Polly pipe
incorrect
Password –
password
Admin
Login not
success!
Test result
(Pass /Fail)
Login not
Pass
success!
Table 4 Test case 02 (Author 2021)
Page | 54
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Test case – 03
Test case – Enter correct username and correct password
Test name – Maleesha sewwandi
Test case
Input data
Expected
Actual result
result
Enter correct
Username –
username and
Polly pipe
correct
Password –
password
Admin123
Login Success !
Test result
(Pass /Fail)
Login success !
Pass
Table 5 Test case 03 (Author 2021)
Page | 55
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
3.1.2 Test forms
Test -01
Test 02
Page | 56
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Page | 57
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Test 03
Page | 58
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
3.1.2 Test procedure
Interface testing
Test case
Input data
Tester name
Test date
01
Enter incorrect
username and
password
Pamudi
Manushika
19th of October
2021
02
Enter correct
username and
incorrect
password
Thamasha
19th of October
2021
Enter correct
username and
correct password
Maleesha
03
thathsaranai
sewwandi
19th of October
2021
Table 6 (Author 2021)
Page | 59
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
3.1.3 Database testing
Database
testing
01
Select
Pamudi Manushika
18th October 2021
02
Where
Pamudi Manushika
18th October 2021
03
Update
Pamudi Manushika
18th October 2021
04
Between
Pamudi Manushika
18th October 2021
05
In
Pamudi Manushika
18th October 2021
06
Group By
Pamudi Manushika
18th October 2021
07
Order By
Pamudi Manushika
18th October 2021
Table 7 (Author 2021)
Learner has provided a suitable test plan and test cases to test the system against user and system
requirements
Page | 60
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Activity 4
LO4 Produce technical and user documentation
Activity 4.1
4.1.1 Technical and user documentation
User guide
Figure 35 User guide (Author 2021)
Page | 61
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Figure 36 User guide (Author 2021)
Page | 62
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Figure 37 User guide (Author 2021)
Learner has prepared a user manual to assist the users of the system.
Page | 63
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
References
Oracle.com. 2021. What is a database?. [online] Available at:
https://www.oracle.com/database/what-is-database/ [Accessed 17 October 2021].
Phoenixnap.com. 2021. [online] Available at: https://phoenixnap.com/kb/wpcontent/uploads/2021/07/how-a-dbms-works.png [Accessed 17 October 2021].
Watt, A., 2021. Chapter 12 Normalization. [online] Opentextbc.ca. Available at:
https://opentextbc.ca/dbdesign01/chapter/chapter-12-normalization/ [Accessed 1 October
2021].
Safe Software. 2021. What is Data Validation? How It Works and Why It's Important . [online]
Available at: https://www.safe.com/what-is/data-validation/ [Accessed 14 October 2021].
www.javatpoint.com. 2021. SQL Commands: DDL, DML, DCL, TCL, DQL - javatpoint. [online]
Available at: https://www.javatpoint.com/dbms-sql-command [Accessed 17 October 2021].
Page | 64
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
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)
Date:
(Provide Submission Date)
E116765@esoft.academy
20/10/2021
Page | 65
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
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:
Page | 66
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
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
Thermostats
Air Pumps
Filters
Equipment
20 gallon tank, 50 gallon tank, 100
gallon tank, 200 gallon tank
Standard, Super
Standard, Super
Air driven, Undergravel
Page | 67
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Installation
ID
Installation
Type
Installation Customer Equipment
Name and
Address
Types of Staff
Required
234
Freshwater Oak
Tropical
House, 17
Wroxton
Road,
Hertfordsh
ire, H5 667
Lee A.
sun
1 x Carpenter
1 x Aquatics
installer
1 x Electrician
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
1
air
pu
mp
s
200 gallons
fish tank
1x
standard
thermostat
1 air
pu
mp
s
200 gallons
fish tank
Large
Gravel Bag
2x
standard
68hermost
at
1 x
20
0
gall
ons
fish
tan
ks
500 Wood
panels
1
air
pu
mp
s
200 gallons
fish tank
1x
standard
thermostat
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
1 x
2012
Install
ation
Mana
ger
1 x Aquatics
installer
1 x Plumber
3 x Labourers
No staff required
Page | 68
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
157
Freshwater Humbertso Perry
Tropical
n Castle,
Vanderru
Kent, K8
ne
1
air 1 x Aquatics
pu installer
mp
s
400 gallons
fish tank
3x
standard
thermostat
1st
Septemb
er 2005
– 1st
Septemb
er 2012
Instillation Management Form
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.
Page | 69
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
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
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.
Page | 70
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
Page | 71
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
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
Learner has Designed a relational database system using appropriate design tools and techniques,
containing at least four interrelated tables,
with clear statements of user and system requirements.
design tools and techniques, containing at least four
YES
interrelated tables, with clear statements of user and system
requirements.
M1 Produce a comprehensive design for a fully functional
Learner has explained the concept of normalization and have failed to apply and justify
normalization to the derived relational schema.
system that includes interface and output designs, data
YES
validations and data normalization.
D1 Evaluate the effectiveness of the design in relation to
user and system requirements.
Learner has attempted the question. But Learner has failed to assess the effectiveness of the
design in relation to user and system requirements. The answer is not up to the satisfactory level.
Page | 72
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
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
Learner has used DDL statements correctly to develop a relational database system.
YES
multiple tables.
P3 Implement a query language into the relational database
system
Learner has explained the usage of DML with Select, Update, Delete queries by giving examples
for each case from the developed database.
YES
M2 Implement a fully functional database system that
Learner has explained how security mechanisms have been used and the importance of these
mechanisms for the security of the database.
includes system security and database maintenance.
YES
M3 Assess whether meaningful data has been extracted
Learner should extract meaningful data using query tools to produce appropriate management
information via the usage of Group by, Order by, Having, Between and Where SQL statements
with the examples from the developed database.
using query tools to produce appropriate management
information.
NO
Page | 73
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
lOMoARcPSD|15318833
LO3 Test the systems against user and system requirements
P4 Test the system against user and system requirements.
Learner has provided a suitable test plan to test the system against user and system requirements.
YES
M4 Assess the effectiveness of the testing, including an
NO
Learner has attempted the question. But the learner has failed to explain how the selected test
data can be used to improve the effectiveness of testing.
NO
Learner has not gathered independent feedbacks from different users and have not analyzed the
feedbacks and has not suggested improvements based on user feedbacks
YES
Learner has prepared a user manual to assist the users of the system.
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
Learner should prepared a technical documentation. Learner has not provided diagrams to show
the movement of data through the system and how the system works
functional system, including diagrams showing movement
of data through the system, and flowcharts describing how
NO
the system works.
D3 Evaluate the database in terms of improvements
needed to ensure the continued effectiveness of the system.
NO
Learner should identify future improvements that may be required to ensure the continued
effectiveness of the database system.
Page | 74
L.B Pamudi Manushika
Unit 04 – Database Design & Development
Downloaded by shehan madusanka (shehan00872@gmail.com)
Download