Professional Documents
Culture Documents
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
Date
signature
Programme Leader
Date
signature (if required)
LO2 Develop a fully functional relational database system, based on an existing system design
Pass, Merit & Distinction P2 P3 M3 M3 D2
Descripts
Resubmission Feedback:
* 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
Action Plan
Summative feedback
Assessor Date
signature
Student Date
signature
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).
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.
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.
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.
Fayazahamed5898@gmail.com
Student’s Signature: Date: 09/07/2023
(Provide E-mail ID) (Provide Submission Date)
Issue Date
Submission 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.
*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.
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.
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.
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.
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
Table of Figures
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.
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.
System requirements
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.
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)
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)
1. Portability:
-This is the amount of work required to move the system to a different target platform.
2. Performance requirements:
-This defines how well the system operates specific tasks under particular states.
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.
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.
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?
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
A weak entity is one that lacks sufficient properties to generate its own primary key.
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)
⚫ Load(load_id, load_type)
⚫ Depot(depot_id, depot_loc)
Task 1.2
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
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
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
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.
Main Menu
Customer Table
Here we can insert, update, delete and search for data stored in the database.
Depot Table
Load Table
Transport Table
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.
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.
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.
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).
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
Customer Table
Load Table
Depot Table
Payment Table
Product Table
Job Table
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.
• Search Button – Used for searching data in the database. For we can search a
customer using his or her ID attribute.
⚫ Default Constraint
I have not used default for my existing tables so I have created a new query to show this
constraint.
⚫ Check Constraint
⚫ Unique Constraint
b.Display the details payment with the job details and the customer details
using Join queries
Task 2.2
Select
The DML select query is used to select and retrieve data from one or more rows in one or
more tables.
Update
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.
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 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.
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
Group by
To arrange similar data into groups. Used with aggregate functions like COUNT, MAX, MIN
AND AVG.
Figure 29-Group by
Order by
Figure 30-Order by
Between
Task 3 - LO3 Test the systems against user and system requirements
Task 3.1
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.
d. Provide relevant test cases for the database you have implemented
The customer data was successfully inserted, the above screenshot is from the customer table
after the first Insert.
The update was successful, Customer’s address is changed from Beruwala to Colombo
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
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.
1. Login
The user must use the provided user name and password to log into the
system.
Press Login
2. Main Menu
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
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
Search for the record using the Product ID and then press delete to permanently delete the
record from the database.
The search button is used to search for an existing data in the database
Type Product
ID
Press Search to
search for the
record
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
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.
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.
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.
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]