You are on page 1of 61

Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)


INTERNAL VERIFICATION – ASSESSMENT DECISIONS

Programme title Database Design & Development

Mr.Tharaka
Assessor Internal Verifier
Unit 04: Database Design & Development
Unit(s)
Data base system for the SmartMovers Transport Company
Assignment title
Fayaz Ahamed
Student’s name
List which assessment criteria Pass Merit Distinction
the Assessor has awarded.

INTERNAL VERIFIER CHECKLIST

Do the assessment criteria awarded match


those shown in the assignment brief? Y/N

Is the Pass/Merit/Distinction grade awarded


justified by the assessor’s comments on the Y/N
student work?
Has the work been assessed
Y/N
accurately?
Is the feedback to the student:
Give details:
• Constructive? Y/N
• Linked to relevant assessment criteria? Y/N
• Identifying opportunities for Y/N
improved performance?
• Agreeing actions? Y/N
Does the assessment decision need
Y/N
amending?

Assessor signature Date

Internal Verifier signature Date


Programme Leader signature (if required)
Date

Confirm action completed


Remedial action taken
Give details:

Assessor signature Date

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

FAYAZ AHAMED COL/A-065937


Higher Nationals - Summative Assignment Feedback Form
Student Name/ID FAYAZ AHAMED COL/A-065937

Unit Title Unit 04: Database Design & Development

Assignment Number 1 Assessor Mr.Tharaka


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

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

LO3 Test the system against user and system requirements.


Pass, Merit & Distinction P4 M4 D2
Descripts

LO4 Produce technical and user documentation.


Pass, Merit & Distinction P5 M5 D3
Descripts

Grade: Assessor Signature: Date:

Resubmission Feedback:

Grade: Assessor Signature: Date:

Internal Verifier’s Comments:

Signature & Date:

* Please note that grade decisions are provisional. They are only confirmed once internal and external moderation has taken place and
grades decisions have been agreed at the assessment board.

Assignment Feedback

FAYAZ AHAMED COL/A-065937


Formative Feedback: Assessor to Student

Action Plan

Summative feedback

Feedback: Student to Assessor

Assessor Date
signature

Student Date
signature

FAYAZ AHAMED COL/A-065937


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

FAYAZ AHAMED COL/A-065937


General Guidelines

1. A cover page or title page should be attached to your assignment. Use page 1 of this
assignment brief as your cover page and make sure all details are accurately filled.
2. The entire assignment brief should be attached as the first section of your assignment.
3. The assignment should be prepared using a word processing software.
4. The assignment should be printed single sided in an A4 sized paper.
5. Allow 1” margin on top, bottom and right sides of the paper and 1.25” on the left side (for
binding).

Word Processing Rules

1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Set line spacing to 1.5. Justify all paragraphs.
3. Ensure that all headings are consistent in terms of size and font style.
4. Use footer function on the word processor to insert your name, unit, assignment no, and
page number on each page. This is useful if individual sheets get detached from the
submission.
5. Use the spell check and grammar check function of the word processing application to review
the use of language on your assignment.

FAYAZ AHAMED COL/A-065937


Important Points:

1. Carefully check carefully the hand in date and the instructions given with the assignment. Late
submissions will not be accepted.
2. Ensure that sufficient time is spent to complete the assignment by the due date.
3. Do not wait till the last minute to print or bind the assignment. Such excuses will not be
accepted for late submissions.
4. You must be responsible for efficient management of your time.
5. 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.
6. Failure to achieve at least a PASS grade will result in a REFERRAL grade.
7. Non-submission of work without valid reasons will lead to an automatic REFERRAL. You will
then be asked to complete an alternative assignment.
8. If you use other people’s work or ideas in your assignment, it must be properly referenced,
using the HARVARD referencing system, in your text or any bibliography. Otherwise, you’ll be
found guilty of committing plagiarism.
9. If you are caught plagiarising, your grade will be reduced to a REFERRAL or at worst, you could
be excluded from the course.

FAYAZ AHAMED COL/A-065937


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 Edexcel UK.
6. I understand that my assignment will not be considered as submitted if this document is not
attached to the assignment.

Fayazahamed5898@gmail.com
Student’s Signature: Date: 09/07/2023
(Provide E-mail ID) (Provide Submission Date)

FAYAZ AHAMED COL/A-065937


Higher National Diploma in Computing
Assignment Brief
Student Name /ID Number FAYAZ AHAMED COL/A-065937

Unit Number and Title Unit 4: Database Design & Development

Academic Year 2019/2020

Unit Tutor Mr.Tharaka

Assignment Title Data base system for the SmartMovers Transport


Company

Issue Date

Submission Date

IV Name & Date

Submission format

Part 1: The submission is in the form of an individual written report. This should be 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 the Harvard referencing system. Please
also provide a bibliography using the Harvard referencing system. The recommended
word limit is 2,000–2,500 words, although you will not be penalised for exceeding the
total word limit.
Part 2: The submission is 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 is 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.

FAYAZ AHAMED COL/A-065937


Assignment Brief and Guidance:

*Please note that assignment guidance is for reference only and should be
more specific in detail to meet customized needs.
Assignment brief
Case study
You are employed as a Database Developer for a large IT development
company. The company has been approached by a transport company called
Smart Movers which has grown to a level where need to have an automated
system to handle day today operational activities to meet customer demands.
You are given the job to design and develop a database solution for Smart
Movers to meet their business requirements.
The company transports chemical products from one location to another on
behalf of registered customers. Customers are of three types namely
Catogory1, 2 and 3. Each customer is given a unique customer number and his
or her details have to be recorded in the system.
Each transport operation is called a job, which involves picking up one or more
loads of the products from a customer requested start location and delivers it
to a customer requested destination. A unique number is given for each job and
for each load when they are created.
A Load is transported using a particular transport unit, which consists of a lorry,
a driver, assistant, and a container (for carrying the product) A container is fixed
to a trailer so it needs to be coupled to a lorry at the start of a Job. (Single
container can transport only one chemical product due to safety requirements)
Payments for a job depends on customer type, product type (No Risk, High risk)
and the load type (small, medium and large). Transport operations are run from
9 regional depots. Jobs are allocated to individual depots to service. Depots
hold, manage and maintain their own transport units which are permanently
allocated to them to service Jobs. Normally transport units are held at the base
Depot they belong.

FAYAZ AHAMED COL/A-065937


The final system should be able to provide the required information for
management decision making and to handle daily operations efficiently and
effectively.
Activity 01
Activity 1.1
a. Identify the user and system requirements to design a database for the
above scenario.
b. Identify entities and attributes of the given scenario and design a
relational database system using conceptual design (ER Model) by
including identifiers (primary Key) of entities and cardinalities,
participations of relationships.
c. 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.
Note:-It is allowed to have your own assumptions and related attributes
within the scope of the case study given.
Activity 1.2
a. Explain data normalization with examples. Check whether the provided
logical design in task 1.1 is normalised. If not, normalize the database by
removing the anomalies.
b. Design set of simple interfaces to input and output for the above
scenario using Wireframe or any interface-designing tool.
c. Explain the validation mechanisms to validate data in the tables with
examples.

Activity 1.3
a. Check whether the given design (ERD and Logical design) is representing
the identified user and system requirements to access the effectiveness
of the design.

FAYAZ AHAMED COL/A-065937


Activity 2
Activity 2.1
Develop the database system with evidence of user interface, output and data
validations, and querying across multiple tables.
a. Develop a relational database system according to the ER diagram you
have created (Use SQL DDL statements).
b. Provide evidence of the use of a suitable IDE to create a simple interface
to insert, update and delete data in the database
c. Implement the validation methods explained in task 1.2-part c.
d. Display the details payment with the job details and the customer
details using Join queries

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.
Select
Update
Delete
Note: - The queries you have selected should be meaningful and relevant to
the given scenario.

Activity 2.3
a. Explain how security mechanisms have been used and the importance
of these mechanisms for the security of the database. Implement
proper security mechanisms (EX: -User groups, access permissions) in
the developed database.

FAYAZ AHAMED COL/A-065937


Activity 2.4
a. Explain the usage of the below SQL statements with the examples from
the developed database
Group by
Order by
Having
Between
Where

Activity 3
Activity 3.1
a. Provide a suitable test plan to test the system against user and system
requirements
b. Provide relevant test cases for the database you have implemented
Note:- Learner needs to give expected results in a tabular format and
screenshots of the actual results with the conclusion

Activity 3.2
a. Explain how the selected test data in task 3.1 b) can be used improve
the effectiveness of testing.

Activity 3.3
a. 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.

FAYAZ AHAMED COL/A-065937


Activity 4
Activity 4.1
a. Prepare a simple users’ guide and a technical documentation for the
support and maintenance of the software.
Activity 4.2
a. Your technical documentation should include some of the UML
diagrams (Use case diagram Class diagram, etc.), flow charts for the
important functionalities, context level DFD and the Level 1 DFD
Activity 4.3
a. Suggest the future improvements that may be required to ensure the
continued effectiveness of the database system.

FAYAZ AHAMED COL/A-065937


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 Assess the effectiveness of the design in relation to user


and system requirements.

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

FAYAZ AHAMED COL/A-065937


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.

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 Assess any future improvements that may be required to


ensure the continued effectiveness of the database system.

FAYAZ AHAMED COL/A-065937


Executive Summary

This document is a report developed for Smart Movers to develop and design a successfull
database solution to automate their day to day activities and hence improve their business.
This document covers a wide range of topics from gathering user requirements to delivering
a robust software solution to handle various tasks. I have done my best in crafting this
document.

Aknowledgement

My heartfelt gratitude to our Database lecturer Mr.Tharaka for teaching and guiding us through
this academic work. I wouldn’t have worked hard to complete this report if not for your
continuos mitivation and support.
Thank You Sir.

Table Of Contents
Executive Summary ............................................................................................................... 16
Aknowledgement ................................................................................................................... 16
Table Of Contents .................................................................................................................. 16
What is a requirement? .......................................................................................................... 18
User requirements ............................................................................................................ 19
System requirements ........................................................................................................ 19
What are functional requirements? ........................................................................................ 19
What are non-functional requirements? ................................................................................. 19
Functional and Non-functional requirements for the SmartMovers transportation company.
............................................................................................................................................... 20
Scope of the system - Functional requirements for SmartMovers system....................... 20
Non-functional requirements for SmartMovers system ................................................... 20
ERD (Entity Relationship Diagram) ...................................................................................... 22
What is an Entity Relationship diagram (ERD)? ............................................................. 22
What is an Entity? ............................................................................................................ 22
What is an Attribute? ....................................................................................................... 22
Entities and attributes for the SmartMovers system .............................................................. 22
What is a weak entity? ..................................................................................................... 22
What is a Primary key? .................................................................................................... 23
ER diagram for the SmartMovers system .............................................................................. 23
Relational Schema ................................................................................................................. 24

FAYAZ AHAMED COL/A-065937


Relational Schema For the SmartMovers system .................................................................. 25
What is Normalisation? ......................................................................................................... 26
Steps in Normalization .......................................................................................................... 26
1. First Normal Form (1NF): ........................................................................................... 26
2. Second Normal Form (2NF) ........................................................................................ 26
3. Third Normal Form (3NF) ........................................................................................... 27
Interface Designs ................................................................................................................... 27
What are validation Mechanisms? ......................................................................................... 32
Default Constraint ............................................................................................................ 32
Primary Key Constraint ................................................................................................... 32
Foreign Key Constraint .................................................................................................... 33
Check Constraint .............................................................................................................. 33
Unique Constraint ............................................................................................................ 33
Not Null Constraint .......................................................................................................... 33
(D1) Assess the effectiveness of the design in relation to user and system requirements ..... 33
What are DDL statements? .................................................................................................... 34
What is an IDE? ..................................................................................................................... 38
What are Join queries? ........................................................................................................... 40
What are DML statements? ................................................................................................... 41
Select ................................................................................................................................ 41
Update .............................................................................................................................. 42
Delete ............................................................................................................................... 42
Security Mechanisms - Definition ......................................................................................... 43
User Groups: .................................................................................................................... 43
Access Permissions: ......................................................................................................... 45
Group by ................................................................................................................................ 46
Order by ................................................................................................................................. 46
Having.................................................................................................................................... 47
Between ................................................................................................................................. 47
Where ..................................................................................................................................... 48
The User Guide ...................................................................................................................... 54
What are UML diagrams?...................................................................................................... 58
What are Context Level DFDs? ............................................................................................. 59
Future Improvements ............................................................................................................. 60
Conclusion ............................................................................................................................. 60
References .............................................................................................................................. 61

Table of Figures

Figure 1 -ER Diagram ...................................................................................................... 24


Figure 2 -Relational Schema ............................................................................................ 25
Figure 3 -Login Page ....................................................................................................... 28
Figure 4 -Main Menu ....................................................................................................... 28
Figure 5 -Customer Table ................................................................................................ 29
Figure 6 -Depot Table ...................................................................................................... 29
Figure 7 -Job Table .......................................................................................................... 30

FAYAZ AHAMED COL/A-065937


Figure 8 -Load Table ....................................................................................................... 30
Figure 9 -Login Table ...................................................................................................... 34
Figure 10 -Customer Table .............................................................................................. 35
Figure 11 -Load Table ..................................................................................................... 35
Figure 12 -Depot Table .................................................................................................... 36
Figure 13 -Payment Table ................................................................................................ 36
Figure 14 -Product Table ................................................................................................. 37
Figure 15 -Job Table ........................................................................................................ 37
Figure 16 -Transport Unit Table ...................................................................................... 37
Figure 17 - Validation Methods ...................................................................................... 39
Figure 18 - Join Queries ................................................................................................. 41
Figure 19 - DML Statements .......................................................................................... 42
Figure 20 - Use Case Diagram ........................................................................................ 58
Figure 21 - Flow Chart .................................................................................................... 59

Table 1 -Test Plan Tables ................................................................................................ 48


Table 3 -Feedback Table .................................................................................................. 53

Task 1 – (LO1) Use an appropriate design tool to design a relational database


system for a substantial problem

Task 1.1

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

a. Identify system and user requirements to design a database for the above
scenario.

What is a requirement?

A requirement is basically a need of a customer which must be fulfilled in order to satisfy the
customer.
This specifies what the customer need or want as a part of the service that we provide.

Requirements can be categorized into two sections:


1. User requirements
2. System requirements

FAYAZ AHAMED COL/A-065937


User requirements

This is commonly known as the requirement written in the user/customer’s perspective. They
are also known as user stories. They are written using non-technical terms and also
represented graphically for more understanding. We do not refer to this while developing the
system but our developed system should perform all the requirements included here. This is
the agreement between the customer and the developer.

Example:- I should be able to enter customer details and store them.

System requirements

These are requirements written to be referred by developers when developing the


system/software that the customer requested. System requirements are written using technical
terms. They are basically an updated version of user requirements provided by the customer.

Example:- I should create specific input fields in the UI to input customer details, and I should
create a customer table in the database and connect the input fields to the table.

System requirements can be divided into two section:


1. Functional requirements
2. Non-Functional requirements

What are functional requirements?

Functional requirements are the essential services that the developed system should provide.
Generally, functional requirements relate how our system should behave in particular states.
(altexsoft 2018)

Example:- The system should generate unique ID for each student.

What are non-functional requirements?

Non-functional requirements are generally known as quality attributes, they are basically what
gets fulfilled when a certain function is implemented. They are just characteristics of a system,
and they cannot be implemented through coding.

Example:- Security: This is the most important non-functional requirement of a system, this is
solely about the protection of our system and its data. (users.csc.calpoly.edu 2019)

FAYAZ AHAMED COL/A-065937


Functional and Non-functional requirements for the SmartMovers transportation
company.

Scope of the system - Functional requirements for SmartMovers system

1. Manage customer details:


-Customer table should be created in the DB.
-The system should generate unique ID for each customer.
-An email notification should be generated for each registered customer.
-Customer details should be stored in the table. (i.e: Name, Address, Email, Phone
Number, Customer Type..etc)

2. Manage Job details:


-The system should generate a unique ID for each individual job.
-Enable GPS to track the status of delivery

3. Manage payment details:


-Methods of payment.
-How payment is calculated?
-Generate a receipt after every successful payment.

4. Manage Depot details:


-The system should generate a unique number for each of the 9 depots.

5. Manage Transport details:


-The system should generate a unique ID for each driver.
-There should be a unique ID for each assistant.
-Each vehicle should have a unique Vehicle_Id

6. Manage Product details:


- The system should induce a unique ID for each product. (i.eProduct_Id)
-The system should differentiate between different product types. (i.e: No risk, High risk)

7. Manage Load details:


-The system should generate a unique ID for each load.
-The system should differentiate between each load type. (i.e: small,medium,large)

Non-functional requirements for SmartMovers system

1. Portability:
-This is the amount of work required to move the system to a different target platform.

FAYAZ AHAMED COL/A-065937


Example: The system should be implemented in each depot of the Smart
Movers company. So the system should be portable with any type of
operating system.

2. Performance requirements:
-This defines how well the system operates specific tasks under particular states.

Example: Different transaction rates for each category of customers.

3. Accuracy and precision:


-Requirements for the data's quality and correctness.

Example: The system should maintain proper accuracy and precision when storing
customer details.

4. Modifiability:
-Requirement about the effort needed to make update/changes in the software.

Example: When a customer upgrades to another category, or if some similar changes


occur, the system should able to be updated.

5. Reliability:
-Requirements about how reliable the software/system is. Also describes how
often the system fails.

Example: Our system should be reliable to our customers, because they couldn’t lose
their data just by storing them into our system.

6.Security:

-This is the most important feature of a system, this is solely about the protection of
our system and its data.

Example: Our system should posses security procedures to protect the data from
threats.

b. Using the conceptual design (ER Model), identify the entities, attributes, and
participations of the given scenario. Then, create a relational database system
by adding the identifiers (primary Key) of the entities, cardinalities, and
participations of relationships.

FAYAZ AHAMED COL/A-065937


ERD (Entity Relationship Diagram)

What is an Entity Relationship diagram (ERD)?

An entity relationship diagram(ERD) is a model which represents the relationships of similar


entities before they are actually implemented in a database.
Also known as a graphical representation of an ER model. (Smartdraw 2018)

What is an Entity?

An entity is a unit of information in our database that can be an object, a location, or a person.
We specify the characteristics of these things using attributes.
In an ER diagram, a rectangle is used to represent an entity.

What is an Attribute?

An attribute is a characteristic of an entity. A single thing can have a lot of characteristics..


All attributes of an entity are commonly known as candidate keys.
Attributes of an entity are shown using oval shapes in an ER diagram.

Entities and attributes for the SmartMovers system

Entity Attributes
Customer customer_id, customer_name, customer_add, customer_type
Job job_id
Product product_id, product_type
Load load_id, load_type
Transport driver_id, assistant_id, vehicle_id
Payment
Depot depot_id

What is a weak entity?

A weak entity is one that lacks sufficient properties to generate its own primary key.

FAYAZ AHAMED COL/A-065937


What is a Primary key?

An attribute of a table/entity which uniquely identifies the table.

ER diagram for the SmartMovers system

FAYAZ AHAMED COL/A-065937


Figure 1-ER Diagram

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

Relational Schema

Definition:

Relational schema is a graphical design which is drawn to show the structure of how data is
organized for a Database. They clearly illustrate how tables are laid out and the way tables
are connected with each other. (S.Melendez, 2019)

What are the things included in a Relational Schema?

-The name of the Entity


- The attributes of those entities
- Primary key among the attributes

FAYAZ AHAMED COL/A-065937


- Foreign key

Relational Schema For the SmartMovers system

⚫ Customer(customer_id, customer_name, customer_address, customer_type)

⚫ Job(job_id, job_location, job_date)

⚫ Load(load_id, load_type)

⚫ Product(product_id, product_name, product_type)

⚫ Depot(depot_id, depot_loc)

⚫ Transport_unit(driver_id, assist_id, veh_id,depot_id*)

⚫ Payment(payment_id, date, pay_method, customer_id*, product_id*, load_id*)

Figure 2-Relational Schema

Task 1.2

(M1) Produce a comprehensive design for a fully functional system, which


includes interface and output designs, data validations and data
normalisation.

FAYAZ AHAMED COL/A-065937


a. Explain data normalization with examples. Check whether the provided
logical design in task 1.1 is normalised. If not, normalize the database
by removing the anomalies.

What is Normalisation?

Normalization is the process of organizing data in a database. This helps to reduce data
anomalies. This improves performance by removing unwanted data from the disk.
(Techopedia, 2018)

Steps in Normalization

1. First Normal Form (1NF):

For a table to be in the 1NF we should Remove Repeating Groups and define a Primary
key.

Example:
Book.Id Book.Name Author.Id Author.Name Pub.Id Pub.Date
1 The Hacker 5 John Doe 2 01/01/20

2. Second Normal Form (2NF)

For a relation to be in 2NF it should posses the following qualities:


- It should be in 1NF
- No partial dependencies

Example:

Book Table
Book.Id Book.Name Author.Id* Pub.Id Pub.Date
1 The Hacker 5 2 01/01/2000

Author Table
Author.Id Author.Name
5 John Doe

FAYAZ AHAMED COL/A-065937


3. Third Normal Form (3NF)

For a relation to be in 3NF, or the perfect form, it should posses the following qualities:
- It should be in 2NF
- It should not contain Transitive Dependencies

Example:
Book Table
Book.Id Book.Name Author.Id*
1 The Hacker 5

Author Table
Author.Id Author.Name Pub.Id*
5 John Doe 2

Publisher Table
Pub.Id Pub.Date
2 01/01/2000

Note:-
The logical design I have put forward for the SMART MOVERS company is already in the
Third Normal Form as it does not posses any of these anomalies.
1. Repeating Groups
2. Partial Dependencies
3. Transitive Dependencies

b. Design set of simple interfaces to input and output for the above
scenario using Wireframe or any interface-designing tool.

I have used Visual Studio 2019 for designing simple interfaces for the above scenario.
I have included some screen shots below for evidence.

Interface Designs

Login Page

This is used to log into the system. The user should use their unique user name and password
to login.

FAYAZ AHAMED COL/A-065937


Figure 3-Login Page

Main Menu

Figure 4-Main Menu

Customer Table

Here we can insert, update, delete and search for data stored in the database.

FAYAZ AHAMED COL/A-065937


Figure 5-Customer Table

Depot Table

To manage Depot information.

Figure 6-Depot Table

FAYAZ AHAMED COL/A-065937


Job Table

Figure 7-Job Table

Load Table

Figure 8-Load Table

FAYAZ AHAMED COL/A-065937


Product Table

Transport Table

FAYAZ AHAMED COL/A-065937


Payment Table

c. Explain the validation mechanisms to validate data in the tables with


examples.

What are validation Mechanisms?


There is a rule or a restriction to follow when data is input to the database, this rule is known
as a constraint. A constraint is created using the SQL statement CREATE CONSTRAINT,
and is related to the table created. They can be used within the entire design

Examples:

Default Constraint
Having default values makes tasks easier, and hence this constraint provides the facility of
adding a default value automatically into a column.

Primary Key Constraint


This constraint is about the uniqueness of value on each row of the table.

FAYAZ AHAMED COL/A-065937


Foreign Key Constraint
This prevents the user from entering invalid data into the foreign key column, and also
prevents the connections between tables.

Check Constraint
The entered value must pass a certain condition to be accepted as a valid input according to
this constraint.

Unique Constraint
This constraint states that a value cannot be repeated hence it must be unique.

Not Null Constraint


Columns cannot be left empty, they should have the right type of data.

Task 1.3

(D1) Assess the effectiveness of the design in relation to user and system
requirements

a.Check whether the given design (ERD and Logical design) is representing
the identified user and system requirements to access the effectiveness of the
design.

I have designed and created the system with the requirements of the user in mind.
Our system is capable to automate their day to day activities to meet customer demands such
as storing and retrieving customer information, transport details and product details.

I have successfully invented the system to fulfil the system requirements, such as identifying
the entities, creating relational tables, creating unique Ids, normalizing the relations and as a
whole to manage all the business requirements of SMART MOVERS.

FAYAZ AHAMED COL/A-065937


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

Task 2.1

(P2) Develop the database system with evidence of user interface, output
and data validations, and querying across multiple tables.
e. Develop a relational database system according to the ER diagram
you have created (Use SQL DDL statements).

What are DDL statements?

DDL statements are used in SQL to create database schema and to modify the structure of the
database. (Ben.R, 2019)
DDL statements are divided into the following categories:
- CREATE
- ALTER
- DROP
- TRUNCATE

Login Table

Figure 9-Login Table

Customer Table

FAYAZ AHAMED COL/A-065937


Figure 10-Customer Table

Load Table

Figure 11-Load Table

Depot Table

FAYAZ AHAMED COL/A-065937


Figure 12-Depot Table

Payment Table

Figure 13-Payment Table

Product Table

FAYAZ AHAMED COL/A-065937


Figure 14-Product Table

Job Table

Figure 15-Job Table

Transport unit Table

Figure 16-Transport Unit Table

FAYAZ AHAMED COL/A-065937


Note: I have created the above tables according to the ER diagram I provided n Activity 1.

b.Provide evidence of the use of a suitable IDE to create a simple interface


to insert, update and delete data in the database

What is an IDE?
An Integrated Development Environment is a software application that is built for the purpose
of developing other software applications. IDEs provide many features such as UI
development, Code editor, Debugger tools and many other features to make software
development easier.
I have used Visual Studio 2019 to design my interfaces and to code the solutions.

Insert Update Delete


Search
Button Button Button Button

• Insert Button – Used to insert data into the table columns

• Update Button – Used to update/change the existing values

• Search Button – Used for searching data in the database. For we can search a
customer using his or her ID attribute.

FAYAZ AHAMED COL/A-065937


• Delete Button – Used to permanently delete records from the database.

c.Implement the validation methods explained in task 1.2-part c.

⚫ Default Constraint

I have not used default for my existing tables so I have created a new query to show this
constraint.

Figure 17 - Validation Methods

⚫ Primary Key Constraint

Setting lid as the Primary Key of load table.

⚫ Foreign Key Constraint

Adding payid and pid as foreign keys to the customer table.

⚫ Check Constraint

FAYAZ AHAMED COL/A-065937


Used the intern example again to do this as I don’t have a check constraint in my scenario.

⚫ Unique Constraint

In the login table there cannot be two similar passwords.

⚫ Not Null Constraint

The payid column cannot be left empty.

b.Display the details payment with the job details and the customer details
using Join queries

What are Join queries?

FAYAZ AHAMED COL/A-065937


Figure 18 - Join Queries

Task 2.2

(P3) Implement a query language into the relational database system


b. Explain the usage of DML with below mentioned queries by giving at
least one single example per each case from the developed database.
Select
Update
Delete

What are DML statements?

Data Manipulation Language is a command used in SQL to manipulate existing data in a


database. DML commands are used to insert, delete and retrieve data from a database.
I have provided some DML queries below.

Select

The DML select query is used to select and retrieve data from one or more rows in one or
more tables.

FAYAZ AHAMED COL/A-065937


Figure 19 - DML Statements

Update

An update query is used to modify existing data in the tables.


Eg:- Updated the caddress on cid:123 from Colombo to Kandy.

Delete

The DML statement to delete existing data from the table is the DELETE query.
Eg:- The customer with the cid 123 is removed from the table.

FAYAZ AHAMED COL/A-065937


Note: - The queries you have selected should be meaningful and relevant to
the given scenario.

Task 2.3
(M2) Implement a fully functional database system, which includes system
security and database maintenance.
b. Explain how security mechanisms have been used and the importance of
these mechanisms for the security of the database. Implement proper
security mechanisms (EX: -User groups, access permissions) in the
developed database.

Security Mechanisms - Definition

Security mechanisms are crucial for well developed systems, because they help protect the data
stored in our databases from unauthorized accesses. Unauthorized users may alter or damage
the data stored. Hence I have implemented some strong security mechanism to my developed
database.
Stated below are some examples:

User Groups: Users are categorized into two types as Normal users and the Administrator.
The administrator has more authority and access than the normal users. Although they are
divided into two categories each user must posses a unique user name and a password to access
the system.

FAYAZ AHAMED COL/A-065937


Admin logging into the system

Normal User logging into the system

FAYAZ AHAMED COL/A-065937


Access Permissions: A normal user has limited access while the administrator has full access
to the database. In the system that I developed for SMART MOVERS the normal user can only
Insert and Search data but cannot perform Update or Delete.

When a normal user accesses a form:

The update and delete buttons are disabled. Only the Admin can update and delete records in a
database.

Task 2.4

(M3) Assess whether meaningful data has been extracted using query tools
to produce appropriate management information.
b. Explain the usage of the below SQL statements with the examples
from the developed database
Group by
Order by

FAYAZ AHAMED COL/A-065937


Having
Between
Where

Group by

To arrange similar data into groups. Used with aggregate functions like COUNT, MAX, MIN
AND AVG.

Figure 29-Group by

Order by

To sort the results in ascending or descending order.

Figure 30-Order by

FAYAZ AHAMED COL/A-065937


Having

Return values form the rows according to a given condition.

Between

To return values within a given range.

FAYAZ AHAMED COL/A-065937


Where

Where is sued to return only the records that fulfils a condition.

Task 3 - LO3 Test the systems against user and system requirements
Task 3.1

(P4) Test the system against user and system requirements.


c. Provide a suitable test plan to test the system against user and system
requirements

To find the bugs in our system and to solve them before we deliver it to our client, we have to
do a system test.
To do this task we document what is called a test plan, which includes all the necessary
information on our test. This includes what features must be tested, the test techniques and
environment required and who will perform which task.
For your convenience I have produced a sample test plan below.

Test Type Description


Scheduling 9am-5pm
Table Testing To make sure all the tables are created

Button Testing Login, Insert, Delete, Update and Search


buttons should be tested
Error Handling Handling the Errors
Pass/Fail Check whether the test passes or fails
Table 1-Test Plan Table

d. Provide relevant test cases for the database you have implemented

FAYAZ AHAMED COL/A-065937


Note:- Learner needs to give expected results in a tabular format and
screenshots of the actual results with the conclusion

Test ID : 1 Test Type : Login


Task Expected results Received Pass/fail
Login Login successful Login Successful Pass

Table 2- Test Table 1

Test ID : 2 Test Type : Insert


Task Expected results Received Pass/fail
Check Insert Successfully Inserted Successfully Inserted Pass
Button the data the data

FAYAZ AHAMED COL/A-065937


Table 3- Test Table 2

The customer data was successfully inserted, the above screenshot is from the customer table
after the first Insert.

Test ID : 3 Test Type : Update


Task Expected results Received Pass/fail
Check Successfully Successfully Pass
Update updated the data updated the data
Button

FAYAZ AHAMED COL/A-065937


Table 4- Test Table 3

The update was successful, Customer’s address is changed from Beruwala to Colombo

Test ID : 4 Test Type : Delete


Task Expected results Received Pass/fail
Check Successfully Successfully deleted Pass
Delere Deleted the data the data
Button

FAYAZ AHAMED COL/A-065937


Before performing Delete function:

After performing Delete function:

The customer with customer ID no.1 is removed form the table.

Note: The tests conducted above clearly shows that the buttons are successfully working and
the record in the databse can be manipulated using them.

Task 3.2

(M4) Assess the effectiveness of the testing, including an explanation of the


choice of test data used.

FAYAZ AHAMED COL/A-065937


b. Explain how the selected test data in task 3.1 b) can be used improve
the effectiveness of testing.

The test data I have provided in task 3.1 tests the most important functions of a database such
as Insert, Update, Search and Delete. These functions are important as they grant the users the
ability to manipulate the data on the database. Without these functions the database would be
useless.
Hence I believe the test cases I have provided can be used to improve the effectiveness of
testing.

Task 3.3
(D2) Evaluate the effectiveness of the database solution in relation to user and
system requirements, and suggest improvements.
b. 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.

A feedback form is important for future improvements, because it shows us how much satisfied
our clients and users with the design and functionality of our system.

Put a tick on your preferred column (Good/Satisfied/Bad)


Description Good Satisfied Bad
• How is the UI design?

• What do you say about the


user friendliness of our
system?
• What do you think about
the responsiveness?
• Rate our overall services
provided?
Your reviews help us get better. Kindly leave your feedback. Thank You.

Table 3-Feedback Table

FAYAZ AHAMED COL/A-065937


Task 4- LO4 Produce technical and user documentation
Task 4.1
(P5) Produce technical and user documentation.
b. Prepare a simple users’ guide and a technical documentation for the
support and maintenance of the software.

The User Guide

1. Login
The user must use the provided user name and password to log into the
system.

Enter user name here


Enter password
here

Press Login

2. Main Menu

FAYAZ AHAMED COL/A-065937


From the Main Menu
you can select the table
you want to work with

3. How to use the text boxes and the buttons

Using the Insert Button

An Insert button is used to insert data into the database. The example below shows how we can
insert Product Details.

Type Product
ID

Type Product
Name

Click the Drop


Down and
select the
Product Type

FAYAZ AHAMED COL/A-065937


Press Insert to
insert the into the
database

Using the Update Button

An update button is used to update an existing record in a database

Do the
necessary
chanages in
these text
boxes

Press update after changing the appropriate columns this would update the changed record of
the product Press update to update
the data in the
database

Using the Delete Button

A delete button is used to delete an existing record from the database

FAYAZ AHAMED COL/A-065937


Type Product
ID

Press Delete to delete


the record from the
database

Search for the record using the Product ID and then press delete to permanently delete the
record from the database.

Using the Search Button

The search button is used to search for an existing data in the database

Type Product
ID

Press Search to
search for the
record

FAYAZ AHAMED COL/A-065937


After entering the product ID press the search button to check for the record in the database, if
it is found in the database the columns will be filled with the detail, if it isn’t found an
appropriate message would be displayed. For example “Product Not Found”.

Task 4.2
(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.
b. Your technical documentation should include some of the UML diagrams
(Use case diagram Class diagram, etc.), flow charts for the important
functionalities, context level DFD and the Level 1 DFD

What are UML diagrams?


Unified Modeling Language or UML is a standard method to visually represent the
behaviour and structure of a system or a process. UML plays a big role in the modern
software development throughout the IT industry. (Marin.P , 2019)

Figure 20 - Use Case Diagram

FAYAZ AHAMED COL/A-065937


Figure 21 - Flow Chart

What are Context Level DFDs?


To demonstrate in a glance how a system works we use Data Flow Diagrams (DFD).There
are many forms of DFD and context level DFD is the most basic of them. In a context level
DFD there is only one process and all the data flows into or out of this single process.
(Cathal.D, 2013)

Task 4.3
(D3) Assess any future improvements that may be required to ensure the
continued effectiveness of the database system.
b. Suggest the future improvements that may be required to ensure the
continued effectiveness of the database system.

FAYAZ AHAMED COL/A-065937


When time passes it is important that our system should be constantly improved to ensure
that our system is up to date and effective. If improvements are not made our system would
become less effective and slow.

Stated below are some suggestions on how we can improve our database system in the future:

Future Improvements

Improved Hardware Components: We should continually upgrade to the new and robust
hardware available in the market.

Increased Storage: Adding more storage to our system gives more space for data to be
stored and save us form any future interruptions.

Updated Software: We must ensure that our software are up-to date, because software
updates removes past bugs from the software and provide more security.

Implementing Firewalls: Implementing proper firewall solutions protects our database


system form external attacks such as unauthorized accesses and malwares.

I believe that the above suggested improvements would ensure continued effectiveness of our
database system by removing threats, updating software and ensuring that all physical
components are upgraded.

Conclusion

I believe that I have completed my report successfully for the SMART MOVERS database
system. In activity 1, I have given a brief introduction about databases and their uses in
today’s industry. I have provided some definitions for requirements and also gathered the
user and system requirements for our database system.
I have also designed ER diagrams and tables according to the given scenario.

In activity 2 & 3, I have provided some screen shots as an evidence of creating a database
system.

In activity 3 & 4 I have explained some database concepts such as queries and constraints,
their uses and I have shown some examples of how we could implement them.I have also
done some tests to ensure that our system is working fine and en-user requirements are
fulfilled. At the end of the report I have made some personal suggestion on how we could
improve our system continually.

So I believe I have done a good job here by creating a system for SMART MOVERS
fulfilling their requirements.

FAYAZ AHAMED COL/A-065937


References

Altexsoft(2018), Functional and Non-functional requirements: Specification and


Types[Online].Available at:
<https://www.altexsoft.com/blog/business/functional-and-non-functional-requirements-
specification-and-types/>[Accessed on 14th Dec 2019]

Users.csc.calpoly.edu(2019), Non-functional requirements.[Online]


Available at: <http://users.csc.calpoly.edu/~jdalbey/SWE/QA/nonfunctional.html>
[Accessed on 28th Nov 2019]

Smartdraw(2018), Entity Relationship Diagram[Online]


Available at:<https://www.smartdraw.com/entity-relationship-diagram/>
[Accessed on 09th Jan 2020]

S.Melendez(2019), What is Relational Database Schema[Online].


Available at:
<https://www.techwalla.com/articles/what-is-relational-database-schema>
[Accessed on 19th Jan 2020]

Techopedia(2018), Normalization[Online].
Available at:<https://www.techopedia.com/definition/1221/normalization>
[Accessed on 26th June 2020]

Ben.R(2019), SQL DDL: Getting started with SQL DDL commands in SQL Server[Online].
Available at:<https://www.sqlshack.com/sql-ddl-getting-started-with-sql-ddl-commands-in-
sql-server/>[Accessed on 7th of July 2020]

Marin.P(2019), Guide to UML diagramming and database modelling [Online]


Availbale at:<https://www.microsoft.com/en-us/microsoft-365/business-insights-
ideas/resources/guide-to-uml-diagramming-and-database-
modeling#:~:text=Unified%20Modeling%20Language%20(UML)%20plays,a%20system%2
0or%20a%20process.>[Accessed on November 5, 2020]

Cathal.D(2013) Context Level DFDs and level-1 DFDs [Online]


Available at:<https://eternalsunshineoftheismind.wordpress.com/2013/03/05/context-level-
dfds-level-1-
dfds/#:~:text=A%20context%20level%20DFD%20is,the%20process%20and%20external%2
0entities.>[Accessed on November 5, 2020]

FAYAZ AHAMED COL/A-065937

You might also like