0% found this document useful (0 votes)
308 views122 pages

Database MGT

This document outlines activities for designing a database system for a transportation company. It includes designing entity relationship diagrams and converting to logical and normalized database designs. It also covers developing the database using SQL, creating interfaces, implementing validation, and testing. Diagrams like use case diagrams and data flow diagrams are provided to support documentation of the system.

Uploaded by

Sampa Rasani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
0% found this document useful (0 votes)
308 views122 pages

Database MGT

This document outlines activities for designing a database system for a transportation company. It includes designing entity relationship diagrams and converting to logical and normalized database designs. It also covers developing the database using SQL, creating interfaces, implementing validation, and testing. Diagrams like use case diagrams and data flow diagrams are provided to support documentation of the system.

Uploaded by

Sampa Rasani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 122

Table of Contents

1 ACTIVITY 1........................................................................................................... 1

1.1 Activity 1.1 ................................................................................................................... 1

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

1.1.2. 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. ...................................... 3

1.1.3. 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. .......................................................................................... 5

1.2 Activity 1.2 ................................................................................................................... 8

1.2.1. 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. ........................................................................................................................... 8

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

1.2.3. Explain the validation mechanisms to validate data in the tables with
examples. .......................................................................................................................... 20

1.3 Activity 1.3 ................................................................................................................. 22

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

2 ACTIVITY 2..........................................................................................................23

2.1 Develop the database system with evidence of user interface, output and data
validations, and querying across multiple tables. ............................................................... 23

2.1.1. Develop a relational database system according to the ER diagram you have
created (Use SQL DDL statements). .................................................................................. 23

i
2.1.2. Provide evidence of the use of a suitable IDE to create a simple interface to
insert, update and delete data in the database ................................................................ 32

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

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

Activity 2.2............................................................................................................................ 39

2.2.1 Explain the usage of DML with below mentioned queries by giving at least
one single example per each case from the developed database. ................................... 39

Activity 2.3............................................................................................................................ 41

2.3.1. 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. ........... 41

2.4 Activity 2.4...................................................................................................................... 46

2.4.1. Explain the usage of the below SQL statements with the examples from the
developed database .......................................................................................................... 46

3 ACTIVITY 3..........................................................................................................49

3.1 Activity 3.1...................................................................................................................... 49

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

3.1.2 Provide relevant test cases for the database you have implemented..................... 54

3.2 Activity 3.2 ................................................................................................................. 65

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

3.3 Activity 3.3 ................................................................................................................. 66

3.3.1. 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. .............................................................. 66

ii
4 ACTIVITY 4..........................................................................................................72

4.1 Activity 4.1...................................................................................................................... 72

Prepare a simple users’ guide and a technical documentation for the support and
maintenance of the software. ............................................................................................. 72

4.2 Activity 4.2...................................................................................................................... 93

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

4.2.1. Use Case Diagram ............................................................................................ 93

4.2.2. Class Diagram ................................................................................................... 94

4.2.3. Data Flow Diagram ........................................................................................... 95

4.2.4. Activity Diagrams ............................................................................................. 97

4.3 Activity 4.3.................................................................................................................... 113

Suggest the future improvements that may be required to ensure the continued
effectiveness of the database system. .............................................................................. 113

5 REFERENCES ..................................................................................................... 114

iii
Figure 1-1 Entity Relationship Diagram (Visual Paradigm) ........................................................ 3
Figure 1-2 Entity Relationship Diagram ..................................................................................... 4
Figure 1-3 CustomerTypes Table ............................................................................................... 5
Figure 1-4 Depot Table ............................................................................................................... 5
Figure 1-5 ProductTypes Table .................................................................................................. 5
Figure 1-6 LoadTypes Table ....................................................................................................... 5
Figure 1-7 Employees Table ....................................................................................................... 6
Figure 1-8 TransportUnits Table ................................................................................................ 6
Figure 1-9 Customers Table ....................................................................................................... 6
Figure 1-10 Jobs Table................................................................................................................ 7
Figure 1-11 Loads Table ............................................................................................................. 7
Figure 2-1 Customer Frame - Input .......................................................................................... 16
Figure 2-2 Employee Frame - Input ......................................................................................... 17
Figure 2-3 Job Frame - Input .................................................................................................... 17
Figure 2-4 Transport Unit Frame - Input .................................................................................. 18
Figure 2-5 Load Frame - Input .................................................................................................. 18
Figure 2-6 Report Frame - Output ........................................................................................... 19
Figure 2-1 Microsoft SQL Server Management - Database ..................................................... 32
Figure 2-2 Customer Type Table .............................................................................................. 33
Figure 2-3 Customer Table ....................................................................................................... 33
Figure 2-4 Employee Table....................................................................................................... 33
Figure 2-5 Depot Table ............................................................................................................. 33
Figure 2-6 Load Type Table ...................................................................................................... 33
Figure 2-7 Load Table ............................................................................................................... 34
Figure 2-8 Product Type ........................................................................................................... 34
Figure 2-9 Transport Unit Table ............................................................................................... 34
Figure 2-10 Payment Table ...................................................................................................... 34
Figure 2-11 Jobs Table.............................................................................................................. 35
Figure 2-12 Job details and the Customer details using Join query ........................................ 38
Figure 2-13 Job details and the Customer details using Join query result .............................. 38
Figure 2-14 SQL Server Login ................................................................................................... 45
Figure 2-15 Database ............................................................................................................... 45
iv
Figure 3-1 Creating Customer Table ........................................................................................ 55
Figure 3-2 Creating Customer Table – Result .......................................................................... 55
Figure 3-3 Creating Customer Type Table................................................................................ 55
Figure 3-4 Creating Customer Type Table - Result .................................................................. 55
Figure 3-5 Creating Deports Table ........................................................................................... 56
Figure 3-6 Creating Deports Table - Result .............................................................................. 56
Figure 3-7 Creating Employees Table ...................................................................................... 56
Figure 3-8 Creating Employees Table - Result ......................................................................... 56
Figure 3-9 Creating Jobs Table ................................................................................................. 57
Figure 3-10 Creating Jobs Table - Result .................................................................................. 57
Figure 3-11 Creating Loads Table ............................................................................................. 57
Figure 3-12 Creating Loads Table - Result................................................................................ 57
Figure 3-13 Creating Load Types Table .................................................................................... 58
Figure 3-14 Creating Load Types Table - Result ....................................................................... 58
Figure 3-15 Creating Payments Table ...................................................................................... 58
Figure 3-16 Creating Payments Table - Result ......................................................................... 58
Figure 3-17 Creating Product Types Table ............................................................................... 58
Figure 3-18 - Creating Product Types Table - Result ................................................................ 58
Figure 3-19 Creating Transport Unit Table .............................................................................. 59
Figure 3-20 Creating Transport Unit Table - Result ................................................................. 59
Figure 3-21 Alter Table ............................................................................................................. 60
Figure 3-22 Adding Customer Type Records............................................................................ 60
Figure 3-23 Adding Product Type Records ............................................................................... 60
Figure 3-24 Adding Load Type Records .................................................................................... 61
Figure 3-25 Adding Payment Records ...................................................................................... 61
Figure 3-26 Customer Type Records ........................................................................................ 61
Figure 3-27 Customer Records ................................................................................................. 61
Figure 3-28 Deport Records ..................................................................................................... 62
Figure 3-29 Employee Records ................................................................................................ 62
Figure 3-30 Job Records ........................................................................................................... 62
Figure 3-31 Load Type Records ................................................................................................ 62
Figure 3-32 Load Records ......................................................................................................... 62
v
Figure 3-33 Payment Records .................................................................................................. 63
Figure 3-34 Product Type Records ........................................................................................... 63
Figure 3-35 Transport Records................................................................................................. 63
Figure 3-36 Query .................................................................................................................... 64
Figure 3-37 Result .................................................................................................................... 64
Figure 3-38 Feedback Analysis ................................................................................................. 70
Figure 4-1 Employee Management .......................................................................................... 10
Figure 4-2 Customer Management .......................................................................................... 12
Figure 4-3 Job Management .................................................................................................... 14
Figure 4-4 Transport Unit Management .................................................................................. 16
Figure 4-5 Load Management .................................................................................................. 18
Figure 4-6 Reporting ................................................................................................................ 20
Figure 4-7 Use Case Diagram ................................................................................................... 93
Figure 4-8 Class Diagram .......................................................................................................... 94
Figure 4-9 Data Flow Diagram - Context Level......................................................................... 95
Figure 4-10 Data Flow Diagram - Level 1 ................................................................................. 96
Figure 4-11 Activity Diagram - Insert Employee ...................................................................... 97
Figure 4-12 Activity Diagram - Update Employee .................................................................... 98
Figure 4-13 Activity Diagram - Delete Employee ..................................................................... 99
Figure 4-14 Activity Diagram - Insert Customer..................................................................... 100
Figure 4-15 Activity Diagram - Update Customer .................................................................. 101
Figure 4-16 Activity Diagram - Delete Customer ................................................................... 102
Figure 4-17 Activity Diagram - Insert Job ............................................................................... 103
Figure 4-18 Activity Diagram - Update Job ............................................................................ 104
Figure 4-19 Activity Diagram - Delete Job.............................................................................. 105
Figure 4-20 Activity Diagram - Insert Transport Unit ............................................................. 106
Figure 4-21 Activity Diagram - Update Transport Unit .......................................................... 107
Figure 4-22 Activity Diagram - Delete Transport Unit ........................................................... 108
Figure 4-23 Activity Diagram - Insert Load............................................................................. 109
Figure 4-24 Activity Diagram - Update Load .......................................................................... 110
Figure 4-25 Activity Diagram - Delete Load ........................................................................... 111
Figure 4-26 Reporting ............................................................................................................ 112
vi
Table 1-1 Non-normalized table ................................................................................................ 8
Table 1-2 Un normalized Employee Table ............................................................................... 10
Table 1-3 Table 1: Employee Table .......................................................................................... 11
Table 1-4 Table 2: Department table ....................................................................................... 11
Table 1-5 Table in first normal form ........................................................................................ 12
Table 1-6 Table 1: Employee table ........................................................................................... 12
Table 1-7 Table 2: Department table ....................................................................................... 12
Table 1-8 Employee table in first normal form ........................................................................ 13
Table 1-9 Table 1: Employee table ........................................................................................... 13
Table 1-10 Table 2: Salary Table .............................................................................................. 14
Table 3-1 Test Cases ................................................................................................................. 54
Table 3-2 Feedback Questionnaire .......................................................................................... 66
Table 3-3 Collected Data .......................................................................................................... 67

vii
1 Activity 1
1.1 Activity 1.1

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

1.1.1.1. User Requirements

User requirements are things the user does with the system, or the activities that
users must be able to perform. User requirements are documented in a User
Requirements Document (URD) and are signed off by the user and used as the
primary input for creating system requirements (Parker, 2019).
1.1.1.2. System Requirements

System requirements are the building blocks developers use to build the system.
System requirements are classified as functional or supplemental requirements. A
functional requirement specifies a requirement that a user needs to perform their
work. Supplemental or non-functional requirements specify quality of service
requirements. The plan for implementing functional requirements is detailed in the
system design. The plan for implementing supplemental requirements is detailed in
the system architecture (Parker, 2019).

1.1.1.3. User and System Requirements of SmartMovers Database

1.1.1.3.1. Functional Requirements


Users – there is one user level for SmartMovers Admin
The system should function on:
Handle employee details (add, view, update, delete)
Handle customer details (add, view, update, delete)
Handle job details (add, view, update, delete)
Handle transport unit details (add, view, update, delete)
Handle load details (add, view, update, delete)
Generate Transport Reports based on Customers and Jobs
Dasun Dilahara Jayaweera / LH54659 Database Design & Development
1
1.1.1.3.2. Supplemental Requirements
1. Performance (Response Time, Throughput, Utilization)
2. Scalability
3. Capacity
4. Availability
5. Reliability
6. Recoverability
7. Maintainability
8. Serviceability
9. Security
10. Regulatory
11. Manageability
12. Environmental
13. Data Integrity
14. Usability
15. Interoperability

1.1.1.3.3. System Requirements


▪ Windows 7 or higher
▪ Intel i3 processor
▪ 4GB Ram
▪ 500GB Hard Disk

Dasun Dilahara Jayaweera / LH54659 Database Design & Development


2
1.1.2. 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.

Figure 1-1 Entity Relationship Diagram (Visual Paradigm)

Dasun Dilahara Jayaweera / LH54659 Database Design & Development 3


Figure 1-2 Entity Relationship Diagram

Dasun Dilahara Jayaweera / LH54659 Database Design & Development 4


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

Figure 1-3 CustomerTypes Table

Figure 1-4 Depot Table

Figure 1-5 ProductTypes Table

Figure 1-6 LoadTypes Table

5
Figure 1-7 Employees Table

Figure 1-8 TransportUnits Table

Figure 1-9 Customers Table

6
Figure 1-10 Jobs Table

Figure 1-11 Loads Table

7
1.2 Activity 1.2

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

1.2.1.1. Data Normalization

Data normalization is the process of organizing non structured data in to structured


data. Main objective of this is to reduce data redundancy and complexity of data
while improving data integrity. Data normalization is used for following purposes:

▪ To Eliminate the redundant or useless data


▪ To Reduce the complexity of the data
▪ To Ensure the relationship between tables as well as data in the tables
▪ To Ensure data dependencies and data is logically stored
(SQL WORLD, 2019)

1.2.1.2. Need of Database Normalization

When database objects are not normalized, it is difficult to update the database
without facing the database loss. Insertion, updating and deletion are very frequent
if data is not normalized. Normalization is part of successful database design and
normalizing can result slowness, inaccuracy and inefficiency (SQL WORLD, 2019).

A non-normalized table is shown below.

Employee ID Employee Name City Department

101 Amit Kolhapur OBIEE,COGNOS

102 Divya Indore COGNOS

103 Yodhini Hydrabad SIEBEL

104 Amit Kolhapur ETL

Table 1-1 Non-normalized table

8
The problems that can occur with non-normalized tables are known as anomalies.
The are 3 types of anomalies.
1. Insert Anomaly
2. Update Anomaly
3. Deletion Anomaly

Examples for anomalies are given below.

1. Insertion Anomaly
If a new employee joins company and he or she is not allocated to a department.
Hence, we need to insert null value there which leads to insertion anomaly (SQL
WORLD, 2019).

2. Update Anomaly
If we want to update the city of employee who occurred twice or more in the
table, then we need to update city of all the employees. Hence data will become
inconsistent. Example is Employee named Amit is associated with two
departments and the values of the departments are not atomic (SQL WORLD,
2019).

3. Deletion Anomaly
If Employee_id 101 has only 1 department and we delete that temporary then
Entire student record will be deleted (SQL WORLD, 2019).

Database normalization forms are used to fix such anomalies. Normalization should
achieve following objectives.
1. Arrangement of data into logical groups.
2. Minimize the Duplicate data.
3. Organize the data in such way that when modification needed then there
should be only one place modification required.
4. User can access and manipulate data quickly and efficiently.
(SQL WORLD, 2019).

9
1.2.1.3. Database Normalization Forms

There are main steps in database normalization.


1. First Normal Form
2. Second Normal Form
3. Third Normal Form
4. Boyce-code Normal Form (BCNF)
5. Forth Normal Form
6. Fifth Normal Form

First Normal Form


A database in first normal form ensures that,
1. It contains only atomic values (single cell has only single value)
2. Each record is unique and there are no repeating groups (Repeating group is a table
containing 2 or more values of columns that are closely related)

Example:
Un normalized Employee Table:

EmployeeNo Employee Name Department

1 Amit OBIEE,ETL

2 Divya COGNOS

3 Rama Administrator

Table 1-2 Un normalized Employee Table

Employee table does not hold atomic values in Department column resulting un normalized.
In order to normalize, the multi valued attributes should be removed. It can be achieved by
converting to First Normal Form. Splitting Employee table into 2 tables Employee and
Department achieves the task.

10
Table 1: Employee Table

Employee No Employee Name

1 Amit

2 Divya

3 Rama

Table 1-3 Table 1: Employee Table

Table 2: Department table

Department Employee No

OBIEE 1

ETL 1

COGNOS 2

Administrator 3

Table 1-4 Table 2: Department table

As a result of normalizing, column of each table is holding the atomic values and duplicates
also removed.

Second Normal Form


If a database is in second normalized form,
1. It is in First normal form
2. There is no partial dependency of any column on primary key.
All Non-key attributes are fully functionally dependent on primary key. If primary is
not composite key then all non-key attributes are fully functionally dependent on
primary key.

11
Example:
Employee_Department table is in first normal form:

Employee No Department No Employee Name Department

1 101 Amit OBIEE

2 102 Divya COGNOS

3 101 Rama OBIEE

Table 1-5 Table in first normal form

In the above table representing details about the Departments that Employees are
represented. It has a composite primary key {Employee No, Department No}. Accordingly,
EmployeeName is dependent on EmployeeNo and v is dependent on DepartmentNo. This
results partial dependency. In order to normalize, partial dependency is removed by splitting
the above table into 2 different tables:

Table 1: Employee table

EmployeeNo Employee Name DepartmentNo

1 Amit 101

2 Divya 102

3 Rama 101

Table 1-6 Table 1: Employee table

Table 2: Department table

DepartmentNo Department

101 OBIEE

102 COGNOS

Table 1-7 Table 2: Department table

As a result, the database is converted to second normal form where each entity of table is
functionally dependent on primary key.

12
Third Normal Form
The database is in Third normal form if it satisfies following conditions:

1. It is in Second normal form


2. There is no transitive functional dependency
Transitive Dependency: When a non – key attribute of the table is depending on
another non - key attribute
Example:
Employee table is in first normal form:

Employee No SalarySlipNo Employee Name Salary

1 0001 Amit 50000

2 0002 Divya 40000

3 0003 Rama 57000

Table 1-8 Employee table in first normal form

In the above table representing details about the Employees are represented. The primary
key of it is Employee No. Accordingly, non-key attribute Salary is dependent on another non-
key attribute SalarySlipNo. This results transitive dependency. In order to normalize,
transitive dependency is removed by splitting the above table into 2 different tables:

Table 1: Employee table

EmployeeNo Employee Name

1 Amit

2 Divya

3 Rama

Table 1-9 Table 1: Employee table

13
Table 2: Salary Table

SalarySlipNo Salary SalarySlipNo

0001 50000 0001

0002 40000 0002

0003 57000 0003

Table 1-10 Table 2: Salary Table

As a result, the database is converted to third normal form where each entity of table is
functionally dependent on primary key.

1.2.1.4. Normalization of SMARTMovers Database

Relational Database schema of SMARTMovers Database is as follows.

Deport(DeportID,DeportName)

ProductType(ProductTypeID,ProductType)

LoadType(LoadTypeID,LoadType)

CustomerType(CustomerTypeID,CustomerType)

Employee(EmployeeID,EmployeeName,EmployeeType,Address,

TelephoneNo,DeportID)

Customer(CustomerID,CustomerName,CustomerAddress,TelephoneNo,

MobileNo,Email,Fax,CustomerID)

Job(JobID,StartLocation,EndLocation,JobDate,CustomerID,

DeportID)

TransportUnit(TransportUnitID,LorryNo,ContainerNo,DeportID,

14
DriverEmpID,AssostantEmpID)

Payment(PaymentID,Payment,LoadTypeID,ProductTypeID)

Load(LoadID,JobID,LoadTypeID,TransportUnitID,ProductTypeID,

PaymentID)

▪ 1st Normal Form - The relational schema does not include any repeating groups or
multivalued attributes. Atomicity of attributes is preserved. Therefore, SMARTMovers
Database is in 1st Normal Form.

▪ 2nd Normal Form - The relational schema does not include any entity with composite
primary key. As a result, no impact from partial dependency takes place. Therefore,
SMARTMovers Database is automatically in 2nd Normal Form.

▪ 3rd Normal Form - The relational schema does not include entities having transitive
dependency which means there are no non key attributes that depend on another
non – key attribute. Therefore, SMARTMovers Database is in 3rd Normal Form.

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

Figure 1-12 Customer Frame - Input

16
Figure 1-13 Employee Frame - Input

Figure 1-14 Job Frame - Input

17
Figure 1-15 Transport Unit Frame - Input

Figure 1-16 Load Frame - Input

18
Figure 1-17 Report Frame - Output

19
1.2.3. Explain the validation mechanisms to validate data in the tables with
examples.

1.1 Data Validation

Checking the accuracy and quality of your data prior to importing and processing is
known as data validation. It is also a form of cleansing data. Data validation ensures
that the data is complete (no blank or null values), unique (contains distinct values
that are not duplicated), and the range of values is consistent with what you expect
(dzone.com, 2019). Data validation is also used as a part of ETL process (Extract,
Transform, and Load) where you move data from a source database to a target data
warehouse so that the data can be joined with other data for analysis. Data validation
helps ensure that the results are accurate when data analysis is performed
(dzone.com, 2019).

1.2 Data Validation Mechanisms

Presence Check
Presence check compels the user to enter data in the required field. It ensures the
user has at least entered something into the field, stopping them from leaving empty
(Teach Computer Science, 2019) (Computer Science GCSE GURU, 2019).
Example:
In an address book, you can make either the address or phone number optional, while
the name field is required. Leaving a mandatory field blank will trigger an error
message that will prevent you from proceeding to the next step.

Type Check
Type check ensures that the data entered is of an expected type, e.g. a number or date
(Teach Computer Science, 2019).
Example:
If a specific field is defined numeric then it will not allow to input any letters or other
non-numeric characters. Some data types can carry out an extra type check. Date
data type will ensure that a date inputted existed at some point, or could exist in the
future. It would not accept the dates such as 30/02/2018.

20
Range Check
Range check is a validation check which can be applied to numeric fields. This is done
to ensure that only numbers within a certain domain can be entered into a field. It
ensures that data are certainly within reasonable limits (Teach Computer Science,
2019).
Example:
If an attribute called ‘exammarks’ is defined in a table, it can allow values from 0 to
100 only. Range check ensures the values stay within the range.
Unique Identifier
It is essential that one record can be plainly recognised from another record.
Therefore, each record has one field that functions as a unique identifier for a record.
An easy validation check can be done to make sure that a value occurs only once in
this field (Teach Computer Science, 2019).
Example:
In ‘student’ table, records should be uniquely identified. An attribute such as
‘StudentID’, ‘RegNo’ or ‘IndexNumber’ can be selected as a unique identifier.
Format Check
This is used for a field that requires an entry in a specific format. Input masks can be
used for this (Teach Computer Science, 2019) (Computer Science GCSE GURU, 2019).
Example:
Date format, postal codes, and driver’s license numbers.
Length Check
A length check ensures that the number of characters meets expectations (Computer
Science GCSE GURU, 2019).
Example:
Defining to store only an eight-character password under password field.
Restricted Choice
There are times that fields in a database have a definite amount of data that can be
entered into them (Teach Computer Science, 2019).
Example:
The amount of days in a week are limited to Sunday, Monday, Tuesday, etc.

21
1.3 Activity 1.3

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

A database should be designed in a way which it can satisfy user and system
requirements.

According to the user requirements, user must be facilitated to enter, view, update and
delete records of the entities such as employees, customers, jobs, loads, transport units,
etc. Interfaces are designed to perform all above mentioned functions in a single
interface. Interfaces include insert button which helps to input data, edit button allows
to update existing data and delete button gives access to delete unwanted data.

The logical design includes a primary database to store data regarding transport
management process. Job table stores essential data so that it would be easy to identify
through the unique number given to a job it should be able to view the particular regional
depot and through the unique number give to a load it should be able to access details
of the load details of the customer and its starting location, its destination.

Separate forms have been created to identify load details and a transport unit, which has
also been created simply so that entire details of load can be derived from transport unit,
transports load.

This also gives asses to product details and also payment details can also be viewed by
this design. Additionally, it makes user to identify the specific order made by a specific
customer and displays the date also which makes job even easier.

The overall view is that it satisfies more than what user required for by additionally
providing order details.

22
2 Activity 2

2.1 Develop the database system with evidence of user interface, output and
data validations, and querying across multiple tables.

2.1.1. Develop a relational database system according to the ER diagram you have
created (Use SQL DDL statements).

USE [SmartMovers]
GO
/****** Object: Table [dbo].[Customers] Script Date: 11/26/2019
1:51:59 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Customers](
[CustomerId] [int] IDENTITY(1,1) NOT NULL,
[CustomerTypeId] [int] NOT NULL,
[CustomerName] [nvarchar](20) NOT NULL,
[Address] [nvarchar](50) NOT NULL,
[TelephoneNo] [nvarchar](10) NOT NULL,
[MobileNo] [nvarchar](10) NULL,
[Email] [nvarchar](50) NULL,
[Fax] [nvarchar](10) NULL,
CONSTRAINT [PK_Customers] PRIMARY KEY CLUSTERED
(
[CustomerId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object: Table [dbo].[CustomerTypes] Script Date: 11/26/2019
1:51:59 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CustomerTypes](
[CustomerTypeId] [int] IDENTITY(1,1) NOT NULL,
[CustomerType] [nvarchar](10) NOT NULL,
CONSTRAINT [PK_CustomerTypes] PRIMARY KEY CLUSTERED
(
[CustomerTypeId] ASC

23
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object: Table [dbo].[Deports] Script Date: 11/26/2019
1:51:59 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Deports](
[DeportId] [int] IDENTITY(1,1) NOT NULL,
[DeportName] [nvarchar](20) NOT NULL,
CONSTRAINT [PK_Deports] PRIMARY KEY CLUSTERED
(
[DeportId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object: Table [dbo].[Employees] Script Date: 11/26/2019
1:51:59 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Employees](
[EmployeeId] [int] IDENTITY(1,1) NOT NULL,
[DeportId] [int] NOT NULL,
[EmployeeName] [nvarchar](20) NOT NULL,
[EmployementType] [nvarchar](10) NOT NULL,
[Address] [nvarchar](50) NOT NULL,
[TelephoneNo] [nvarchar](10) NOT NULL,
CONSTRAINT [PK_Employees] PRIMARY KEY CLUSTERED
(
[EmployeeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object: Table [dbo].[Jobs] Script Date: 11/26/2019 1:51:59
AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Jobs](

24
[JobId] [int] IDENTITY(1,1) NOT NULL,
[CustomerId] [int] NOT NULL,
[DeportId] [int] NOT NULL,
[StartLocation] [nvarchar](20) NOT NULL,
[EndLocation] [nvarchar](20) NOT NULL,
[Date] [datetime] NOT NULL,
CONSTRAINT [PK_Jobs] PRIMARY KEY CLUSTERED
(
[JobId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object: Table [dbo].[Loads] Script Date: 11/26/2019 1:51:59
AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Loads](
[LoadId] [int] IDENTITY(1,1) NOT NULL,
[JobId] [int] NOT NULL,
[LoadTypeId] [int] NOT NULL,
[TransportUnitId] [int] NOT NULL,
[ProductTypeId] [int] NOT NULL,
[PaymentId] [int] NOT NULL,
CONSTRAINT [PK_Loads] PRIMARY KEY CLUSTERED
(
[LoadId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object: Table [dbo].[LoadTypes] Script Date: 11/26/2019
1:51:59 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[LoadTypes](
[LoadTypeId] [int] IDENTITY(1,1) NOT NULL,
[LoadType] [nvarchar](10) NOT NULL,
CONSTRAINT [PK_LoadTypes] PRIMARY KEY CLUSTERED
(
[LoadTypeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

25
GO
/****** Object: Table [dbo].[Payments] Script Date: 11/26/2019
1:51:59 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Payments](
[PaymentId] [int] IDENTITY(1,1) NOT NULL,
[CustomerTypeId] [int] NOT NULL,
[LoadTypeId] [int] NOT NULL,
[ProductTypeId] [int] NOT NULL,
[Payment] [numeric](10, 2) NOT NULL,
CONSTRAINT [PK_Payments] PRIMARY KEY CLUSTERED
(
[PaymentId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object: Table [dbo].[ProductTypes] Script Date: 11/26/2019
1:51:59 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ProductTypes](
[ProductTypeId] [int] IDENTITY(1,1) NOT NULL,
[ProductType] [nvarchar](10) NOT NULL,
CONSTRAINT [PK_ProductTypes] PRIMARY KEY CLUSTERED
(
[ProductTypeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object: Table [dbo].[TransportUnits] Script Date:
11/26/2019 1:51:59 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TransportUnits](
[TransportUnitId] [int] IDENTITY(1,1) NOT NULL,
[DeportId] [int] NOT NULL,
[LorryNo] [nvarchar](10) NOT NULL,
[DriverEmpId] [int] NOT NULL,

26
[AssistantEmpId] [int] NOT NULL,
[ContainerNo] [int] NOT NULL,
CONSTRAINT [PK_TransportUnits] PRIMARY KEY CLUSTERED
(
[TransportUnitId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
ALTER TABLE [dbo].[Customers] WITH CHECK ADD CONSTRAINT
[FK_Customers_CustomerTypes] FOREIGN KEY([CustomerTypeId])
REFERENCES [dbo].[CustomerTypes] ([CustomerTypeId])
GO
ALTER TABLE [dbo].[Customers] CHECK CONSTRAINT
[FK_Customers_CustomerTypes]
GO
ALTER TABLE [dbo].[Employees] WITH CHECK ADD CONSTRAINT
[FK_Employees_Deports] FOREIGN KEY([DeportId])
REFERENCES [dbo].[Deports] ([DeportId])
GO
ALTER TABLE [dbo].[Employees] CHECK CONSTRAINT [FK_Employees_Deports]
GO
ALTER TABLE [dbo].[Jobs] WITH CHECK ADD CONSTRAINT
[FK_Jobs_Customers] FOREIGN KEY([CustomerId])
REFERENCES [dbo].[Customers] ([CustomerId])
GO
ALTER TABLE [dbo].[Jobs] CHECK CONSTRAINT [FK_Jobs_Customers]
GO
ALTER TABLE [dbo].[Jobs] WITH CHECK ADD CONSTRAINT [FK_Jobs_Deports]
FOREIGN KEY([DeportId])
REFERENCES [dbo].[Deports] ([DeportId])
GO
ALTER TABLE [dbo].[Jobs] CHECK CONSTRAINT [FK_Jobs_Deports]
GO
ALTER TABLE [dbo].[Loads] WITH CHECK ADD CONSTRAINT [FK_Loads_Jobs]
FOREIGN KEY([JobId])
REFERENCES [dbo].[Jobs] ([JobId])
GO
ALTER TABLE [dbo].[Loads] CHECK CONSTRAINT [FK_Loads_Jobs]
GO
ALTER TABLE [dbo].[Loads] WITH CHECK ADD CONSTRAINT
[FK_Loads_LoadTypes] FOREIGN KEY([LoadTypeId])
REFERENCES [dbo].[LoadTypes] ([LoadTypeId])
GO
ALTER TABLE [dbo].[Loads] CHECK CONSTRAINT [FK_Loads_LoadTypes]
GO
ALTER TABLE [dbo].[Loads] WITH CHECK ADD CONSTRAINT
[FK_Loads_Payments] FOREIGN KEY([PaymentId])
REFERENCES [dbo].[Payments] ([PaymentId])

27
GO
ALTER TABLE [dbo].[Loads] CHECK CONSTRAINT [FK_Loads_Payments]
GO
ALTER TABLE [dbo].[Loads] WITH CHECK ADD CONSTRAINT
[FK_Loads_ProductTypes] FOREIGN KEY([ProductTypeId])
REFERENCES [dbo].[ProductTypes] ([ProductTypeId])
GO
ALTER TABLE [dbo].[Loads] CHECK CONSTRAINT [FK_Loads_ProductTypes]
GO
ALTER TABLE [dbo].[Loads] WITH CHECK ADD CONSTRAINT
[FK_Loads_TransportUnits] FOREIGN KEY([TransportUnitId])
REFERENCES [dbo].[TransportUnits] ([TransportUnitId])
GO
ALTER TABLE [dbo].[Loads] CHECK CONSTRAINT [FK_Loads_TransportUnits]
GO
ALTER TABLE [dbo].[Payments] WITH CHECK ADD CONSTRAINT
[FK_Payments_CustomerTypes] FOREIGN KEY([CustomerTypeId])
REFERENCES [dbo].[CustomerTypes] ([CustomerTypeId])
GO
ALTER TABLE [dbo].[Payments] CHECK CONSTRAINT
[FK_Payments_CustomerTypes]
GO
ALTER TABLE [dbo].[Payments] WITH CHECK ADD CONSTRAINT
[FK_Payments_LoadTypes] FOREIGN KEY([LoadTypeId])
REFERENCES [dbo].[LoadTypes] ([LoadTypeId])
GO
ALTER TABLE [dbo].[Payments] CHECK CONSTRAINT [FK_Payments_LoadTypes]
GO
ALTER TABLE [dbo].[Payments] WITH CHECK ADD CONSTRAINT
[FK_Payments_ProductTypes] FOREIGN KEY([ProductTypeId])
REFERENCES [dbo].[ProductTypes] ([ProductTypeId])
GO
ALTER TABLE [dbo].[Payments] CHECK CONSTRAINT
[FK_Payments_ProductTypes]
GO
ALTER TABLE [dbo].[TransportUnits] WITH CHECK ADD CONSTRAINT
[FK_TransportUnits_Deports] FOREIGN KEY([DeportId])
REFERENCES [dbo].[Deports] ([DeportId])
GO
ALTER TABLE [dbo].[TransportUnits] CHECK CONSTRAINT
[FK_TransportUnits_Deports]
GO
ALTER TABLE [dbo].[TransportUnits] WITH CHECK ADD CONSTRAINT
[FK_TransportUnits_Employees] FOREIGN KEY([AssistantEmpId])
REFERENCES [dbo].[Employees] ([EmployeeId])
GO
ALTER TABLE [dbo].[TransportUnits] CHECK CONSTRAINT
[FK_TransportUnits_Employees]
GO

28
ALTER TABLE [dbo].[TransportUnits] WITH CHECK ADD CONSTRAINT
[FK_TransportUnits_Employees1] FOREIGN KEY([DriverEmpId])
REFERENCES [dbo].[Employees] ([EmployeeId])
GO
ALTER TABLE [dbo].[TransportUnits] CHECK CONSTRAINT
[FK_TransportUnits_Employees1]
GO
USE [SmartMovers]
GO
SET IDENTITY_INSERT [dbo].[CustomerTypes] ON

GO
INSERT [dbo].[CustomerTypes] ([CustomerTypeId], [CustomerType])
VALUES (1, N'Category1')
GO
INSERT [dbo].[CustomerTypes] ([CustomerTypeId], [CustomerType])
VALUES (2, N'Category2')
GO
INSERT [dbo].[CustomerTypes] ([CustomerTypeId], [CustomerType])
VALUES (3, N'Category3')
GO
SET IDENTITY_INSERT [dbo].[CustomerTypes] OFF
GO
SET IDENTITY_INSERT [dbo].[ProductTypes] ON

GO
INSERT [dbo].[ProductTypes] ([ProductTypeId], [ProductType]) VALUES
(1, N'No Risk')
GO
INSERT [dbo].[ProductTypes] ([ProductTypeId], [ProductType]) VALUES
(2, N'High Risk')
GO
SET IDENTITY_INSERT [dbo].[ProductTypes] OFF
GO
SET IDENTITY_INSERT [dbo].[LoadTypes] ON

GO
INSERT [dbo].[LoadTypes] ([LoadTypeId], [LoadType]) VALUES (1,
N'Small')
GO
INSERT [dbo].[LoadTypes] ([LoadTypeId], [LoadType]) VALUES (2,
N'Medium')
GO
INSERT [dbo].[LoadTypes] ([LoadTypeId], [LoadType]) VALUES (3,
N'Large')
GO
SET IDENTITY_INSERT [dbo].[LoadTypes] OFF
GO

29
SET IDENTITY_INSERT [dbo].[Payments] ON

GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (1, 1, 1, 1, CAST(1000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (2, 1, 1, 2, CAST(10000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (3, 1, 2, 1, CAST(2000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (4, 1, 2, 2, CAST(20000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (5, 1, 3, 1, CAST(3000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (6, 1, 3, 2, CAST(30000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (7, 2, 1, 1, CAST(4000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (8, 2, 1, 2, CAST(40000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (9, 2, 2, 1, CAST(5000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (10, 2, 2, 2, CAST(50000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (11, 2, 3, 1, CAST(6000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (12, 2, 3, 2, CAST(60000.00 AS
Numeric(10, 2)))
GO

30
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (13, 3, 1, 1, CAST(7000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (14, 3, 1, 2, CAST(70000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (15, 3, 2, 1, CAST(8000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (16, 3, 2, 2, CAST(80000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (17, 3, 3, 1, CAST(9000.00 AS
Numeric(10, 2)))
GO
INSERT [dbo].[Payments] ([PaymentId], [CustomerTypeId], [LoadTypeId],
[ProductTypeId], [Payment]) VALUES (18, 3, 3, 2, CAST(90000.00 AS
Numeric(10, 2)))
GO
SET IDENTITY_INSERT [dbo].[Payments] OFF
GO
SET IDENTITY_INSERT [dbo].[Deports] ON

GO
INSERT [dbo].[Deports] ([DeportId], [DeportName]) VALUES (1,
N'Regional Deport 1')
GO
INSERT [dbo].[Deports] ([DeportId], [DeportName]) VALUES (2,
N'Regional Deport 2')
GO
INSERT [dbo].[Deports] ([DeportId], [DeportName]) VALUES (3,
N'Regional Deport 3')
GO
INSERT [dbo].[Deports] ([DeportId], [DeportName]) VALUES (4,
N'Regional Deport 4')
GO
INSERT [dbo].[Deports] ([DeportId], [DeportName]) VALUES (5,
N'Regional Deport 5')
GO
INSERT [dbo].[Deports] ([DeportId], [DeportName]) VALUES (6,
N'Regional Deport 6')
GO
INSERT [dbo].[Deports] ([DeportId], [DeportName]) VALUES (7,
N'Regional Deport 7')
GO

31
INSERT [dbo].[Deports] ([DeportId], [DeportName]) VALUES (8,
N'Regional Deport 8')
GO
INSERT [dbo].[Deports] ([DeportId], [DeportName]) VALUES (9,
N'Regional Deport 9')
GO
SET IDENTITY_INSERT [dbo].[Deports] OFF
GO

2.1.2. Provide evidence of the use of a suitable IDE to create a simple interface to
insert, update and delete data in the database

Figure 2-1 Microsoft SQL Server Management - Database

32
Figure 2-2 Customer Type Table

Figure 2-3 Customer Table

Figure 2-4 Employee Table

Figure 2-5 Depot Table

Figure 2-6 Load Type Table

33
Figure 2-7 Load Table

Figure 2-8 Product Type

Figure 2-9 Transport Unit Table

Figure 2-10 Payment Table

34
Figure 2-11 Jobs Table

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

2.1.3.1. Presence Check

CREATE TABLE [dbo].[Customers](


[CustomerId] [int] IDENTITY(1,1) NOT NULL,
[CustomerTypeId] [int] NOT NULL,
[CustomerName] [nvarchar](20) NOT NULL,
[Address] [nvarchar](50) NOT NULL,
[TelephoneNo] [nvarchar](10) NOT NULL,
[MobileNo] [nvarchar](10) NULL,
[Email] [nvarchar](50) NULL,
[Fax] [nvarchar](10) NULL,
CONSTRAINT [PK_Customers] PRIMARY KEY CLUSTERED
(
[CustomerId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

Customers table ensures presence check with the use of NOT_NULL in attribute
definition.

35
2.1.3.2. Type Check

CREATE TABLE [dbo].[Jobs](


[JobId] [int] IDENTITY(1,1) NOT NULL,
[CustomerId] [int] NOT NULL,
[DeportId] [int] NOT NULL,
[StartLocation] [nvarchar](20) NOT NULL,
[EndLocation] [nvarchar](20) NOT NULL,
[Date] [datetime] NOT NULL,
CONSTRAINT [PK_Jobs] PRIMARY KEY CLUSTERED
(
[JobId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

Jobs table ensures type check by using relevant data types for the attributes.

2.1.3.3. Range Check

CREATE TABLE [dbo].[Payments](


[PaymentId] [int] IDENTITY(1,1) NOT NULL,
[CustomerTypeId] [int] NOT NULL,
[LoadTypeId] [int] NOT NULL,
[ProductTypeId] [int] NOT NULL,
[Payment] [numeric](10, 2) NOT NULL,
CONSTRAINT [PK_Payments] PRIMARY KEY CLUSTERED
(
[PaymentId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

Payments table ensures range check by mentioning the range of applicable values to
the attribute.

36
2.1.3.4. Unique Identifier

CREATE TABLE [dbo].[Employees](


[EmployeeId] [int] IDENTITY(1,1) NOT NULL,
[DeportId] [int] NOT NULL,
[EmployeeName] [nvarchar](20) NOT NULL,
[EmployementType] [nvarchar](10) NOT NULL,
[Address] [nvarchar](50) NOT NULL,
[TelephoneNo] [nvarchar](10) NOT NULL,
CONSTRAINT [PK_Employees] PRIMARY KEY CLUSTERED
(
[EmployeeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

Employee table ensures having a unique identifier by defining an attribute for


PRIMARY KEY syntax.

2.1.3.5. Format Check

CREATE TABLE [dbo].[Jobs](


[JobId] [int] IDENTITY(1,1) NOT NULL,
[CustomerId] [int] NOT NULL,
[DeportId] [int] NOT NULL,
[StartLocation] [nvarchar](20) NOT NULL,
[EndLocation] [nvarchar](20) NOT NULL,
[Date] [datetime] NOT NULL,
CONSTRAINT [PK_Jobs] PRIMARY KEY CLUSTERED
(
[JobId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

Jobs table ensures format check with the use of data types such as datetime which
uses a specific format.

37
2.1.3.6. Length Check

CREATE TABLE [dbo].[Customers](


[CustomerId] [int] IDENTITY(1,1) NOT NULL,
[CustomerTypeId] [int] NOT NULL,
[CustomerName] [nvarchar](20) NOT NULL,
[Address] [nvarchar](50) NOT NULL,
[TelephoneNo] [nvarchar](10) NOT NULL,
[MobileNo] [nvarchar](10) NULL,
[Email] [nvarchar](50) NULL,
[Fax] [nvarchar](10) NULL,
CONSTRAINT [PK_Customers] PRIMARY KEY CLUSTERED
(
[CustomerId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

Customers table ensures length check by defining lengths to the attributes with data
types such as nvarchar.

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

Figure 2-12 Job details and the Customer details using Join query

This would display the table along with the payment details with customer id and job
id.

Figure 2-13 Job details and the Customer details using Join query result

38
Activity 2.2

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

2.2.1.1 Data Manipulation Language


The SQL commands that deals with the manipulation of data stored in the database
are considered as Data Manipulation Language (GeeksforGeeks, 2019).
2.2.1.2 Select
The SELECT statement is used to select data from a database. The data returned is
stored in a result table, called the result-set (W3schools.com, 2019). We can retrieve
complete table data, or partial by specifying conditions using the WHERE clause
(Studytonight.com, 2019).

SELECT L.JobId,L.LoadId,LT.LoadType,PT.ProductType,(SELECT
EmployeeName FROM [dbo].[Employees] WHERE EmployeeId= T.DriverEmpId)
AS Driver,(SELECT EmployeeName FROM [dbo].[Employees] WHERE
EmployeeId= T.AssistantEmpId) AS
Assistant,T.LorryNo,T.ContainerNo,P.Payment FROM [dbo].[Loads] L
INNER JOIN [dbo].[LoadTypes] LT ON LT.LoadTypeId=L.LoadTypeId INNER
JOIN [dbo].[ProductTypes] PT ON PT.ProductTypeId=L.ProductTypeId
INNER JOIN [dbo].[Payments] P ON P.PaymentId=L.PaymentId INNER JOIN
[dbo].[TransportUnits] T ON T.TransportUnitId=L.TransportUnitId AND
L.Jobid="+cusId;

2.2.1.3 Update
The UPDATE statement is used to modify the existing records in a table. The WHERE
clause specifies which record(s) that should be updated. If the WHERE clause is
omitted, all records in the table will be updated (W3schools.com, 2019).

UPDATE [dbo].[TransportUnits] SET [DeportId]=" + DeportId +


",[LorryNo]='" + LorryNo + "',[ContainerNo]='" + ContainerNo +
"',[DriverEmpId]='" + driver + "',[AssistantEmpId]='" + assistant +
"' WHERE [TransportUnitId]=" + Id;

39
2.2.1.4 Delete
The DELETE statement is used to delete existing records in a table. The WHERE clause
specifies which record(s) that should be updated. If the WHERE clause is omitted, all
records in the table will be deleted (W3schools.com, 2019).

DELETE [dbo].[Jobs] WHERE [JobId]=" + Id;

40
Activity 2.3

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

2.3.1.1. What is database security?

When a company collects any data about customers, suppliers, or the wider
community, it is stored on a database. This data may be sensitive and private, and
can be subject to strict privacy agreements.
Example: the customers may provide you with an email address, postal address, and
phone number when they purchase something from you.
However, if this data is accessed without authority, sold to third parties, or otherwise
misused, you could be subject to strict legal action from the people whose privacy
has been compromised (Systems, 2019).
Database security is any form of security used to protect databases and the
information they contain from compromise. Examples of how stored data can be
protected include:
▪ Software – software is used to ensure that people can’t gain access to the
database through viruses, hacking, or any similar process.
▪ Physical controls – an example of a physical component of database security
could be the constant monitoring of the database by company personnel to
allow them to identify any potential weaknesses and/or compromises.
▪ Administrative controls – this refers to things like the use of passwords,
restricting the access of certain people to certain parts of the database, or
blocking the access of some company personnel altogether.
(Systems, 2019).

41
2.3.1.2. Why is database security important?

Database security is more than just important: it is essential to any company with any
online component. Sufficient database security prevents data bring lost or
compromised, which may have serious ramifications for the company both in terms
of finances and reputation (Systems, 2019). Database security helps:
▪ Company’s block attacks, including ransomware and breached firewalls, which
in turn keeps sensitive information safe.
▪ Prevent malware or viral infections which can corrupt data, bring down a
network, and spread to all end point devices.
▪ Ensure that physical damage to the server doesn’t result in the loss of data.
▪ Prevent data loss through corruption of files or programming errors.
(Systems, 2019).
As you will see, database security places an obligation on you and your business to
keep sensitive data stored correctly, and used appropriately. Complying with
regulations and the applicable law not only reduces the risk of information being
mishandled, but it protects you from both costly legal ramifications and lost customer
confidence. Investment in Database security will ensure you have done your due
diligence in terms of data protection (Systems, 2019).

2.3.1.3. Database Security Threats: The Most Common Attacks

The risks involved with databases vary from organization to organization, depending
on the type of information and the amount of importance it holds for the company
itself. While credit card and social security numbers are certainly dangerous, so are
company plans, finances, sensitive employee info (Systems, 2019).

Therefore, it’s crucial to maintain solid security practices and defences to combat
attacks on your databases. Few database attacks are as follows.

i. SQL Injections

SQL injections are one of the biggest threats to databases, much like web apps.
They can be launched on either the database or the web app that acts as a front-
end to the database, yet due to the prevalence of SQL injection flaws in web

42
apps and how easy they are to exploit, they’re more common than attacking
the database. Many organizations have large databases hackers would like to
get their hands on – staying secure is essential to prevent embarrassing and
costly incidents.

ii. Buffer Overflow vulnerabilities

Buffer Overflow vulnerabilities are the most common security problem for
databases, occur when a program tries to copy too much data in a memory
buffer, causing the buffer to ‘overflow’ and overwriting the data currently in
memory. Buffer overflow vulnerabilities pose an especially dangerous threat to
databases holding particularly sensitive info, as it could allow an attacker
exploiting the vulnerability to set unknown values to known values or mess with
the program’s logic.

iii. Denial of Service

DoS, attacks happen most through buffer overflows, data corruption or other
kinds of consumption of the server’s resources. DoS attacks crash the server,
making the database unreachable for however long the attack can be sustained.

iv. Privilege Escalation

Privilege Escalation is a dangerous threat that can lead to malicious addition,


modification or deletion of data that, depending on its’ sensitivity, can wreak
havoc on an organization.

v. Weak Authentication

Weak Authentication is another common threat to database security and


integrity. When a malicious user can steal the identity of a legitimate user,
gaining access to confidential data, the risks abound.

43
2.3.1.4. Database Security Best Practices: Protecting Your Confidentiality, Integrity
& Availability

▪ Ensure your database administrators both understand the business value and
importance of ensuring your databases are secured and extending them the
resources to do so properly.
▪ Protect against SQL injections by using parameterized queries to keep malicious
queries out of your database.
▪ Static Code Analysis is an essential tool for organizations developing applications
as portals to databases to slash SQL injection, buffer overflow, and mis-
configuration issues.
▪ Maintain CIA by keeping your databases up to date, removing any unknown
components, and enforcing least privilege parameters to ensure the
confidentiality, integrity and availability of your databases.
▪ To maintain availability, employ an Uninterruptible Power Supply, or UPS, to
ensure any forced shutdown doesn’t cause data loss.
▪ Keep features and services only to what is essential for the company to work
smoothly with the databases – the more extras you have, the more you need to
stay up-to-date with, the more holes hackers have a chance to poke through.
▪ Data masking, or allowing users to access certain info without being able to view
it – credit card processing or during database testing and development, for
example, helps maintain the confidentiality of the database.
(Checkmarx, 2019)

44
2.3.1.5. Security Mechanisms in the Implementation

Setting login and password for sql authentician once you enter the username and
login it displays the server and database.

Figure 2-14 SQL Server Login

Figure 2-15 Database

45
2.4 Activity 2.4

2.4.1. Explain the usage of the below SQL statements with the examples from the
developed database

2.4.1.1. Group by

The GROUP BY statement groups rows that have the same values into summary rows.
It is often used with aggregate functions (COUNT, MAX, MIN, SUM, AVG) to group the
result-set by one or more columns (W3schools.com, 2019).
SELECT column_name(s)
FROM table_name
WHERE condition
GROUP BY column_name(s)
ORDER BY column_name(s);

SELECT COUNT(*) FROM [dbo].[Jobs] WHERE [CustomerId]='" + CustomerId


+ "' AND [DeportId]=" + DeportId + "AND Date='" + _date + "' GROUP BY
[Date]";

2.4.1.2. Order by

The ORDER BY keyword is used to sort the result-set in ascending or descending order.
It sorts the records in ascending order by default. To sort the records in descending
order, use the DESC keyword (W3schools.com, 2019).

SELECT column1, column2, ...


FROM table_name
ORDER BY column1, column2, ... ASC|DESC;

SELECT[EmployeeId],[DeportId],[EmployeeName],[EmployementType],
[Address],[TelephoneNo] FROM [dbo].[Employees] ORDER BY [DeportId]";

46
2.4.1.3. Having

The HAVING clause was added to SQL because the WHERE keyword could not be
used with aggregate functions (W3schools.com, 2019).
SELECT column_name(s)
FROM table_name
WHERE condition
GROUP BY column_name(s)
HAVING condition
ORDER BY column_name(s);

SELECT COUNT(*) FROM [dbo].[Jobs] WHERE COUNT(*)>5;

2.4.1.4. Between

The BETWEEN operator selects values within a given range. The values can be
numbers, text, or dates. The BETWEEN operator is inclusive: begin and end values are
included (W3schools.com, 2019).
SELECT column_name(s)
FROM table_name
WHERE column_name BETWEEN value1 AND value2;

SELECT J.[JobId],(SELECT DeportName FROM [dbo].[Deports] WHERE


DeportId=J.DeportId) AS Deport,J.Date,J.StartLocation,J.EndLocation,
SUM(P.Payment) AS Payment FROM [dbo].[Jobs] J INNER JOIN [dbo].[Loads]
L ON J.[JobId]= L.[JobId] INNER JOIN [dbo].[Payments] P ON
L.PaymentId= P.PaymentId WHERE J.CustomerId="+cusId+ "AND J.Date
BETWEEN('"+From+"')AND('"+To+"') GROUP BY J.JobId, J.DeportId,
J.Date,J.CustomerId,J.StartLocation,J.EndLocation";

47
2.4.1.5. Where

The WHERE clause is used to filter records. The WHERE clause is used to extract only
those records that fulfill a specified condition (W3schools.com, 2019).
Operators such as = Equal, > Greater than, < Less than, >= Greater than or equal, <=
Less than or equal, <>, != Not equal, BETWEEN - Between a certain range, LIKE - Search
for a pattern, IN - To specify multiple possible values for a column (W3schools.com,
2019).

SELECT column1, column2, ...


FROM table_name
WHERE condition;

SELECT COUNT(*) FROM [dbo].[Jobs] WHERE [CustomerId]='" + CustomerId


+ "' AND [DeportId]=" + DeportId + "AND Date='" + _date + "'";

48
3 Activity 3
3.1 Activity 3.1

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

Test Plan Document

For

SMARTMOVERS DATABASE

49
Table of Contents

1 INTRODUCTION ......................................................................................................................... 51
2 PROJECT OVERVIEW ................................................................................................................ 51
3 PROJECT AUDIENCE.................................................................................................................. 52
4 TEST OBJECTIVE......................................................................................................................... 52
5 TEST ASSUMPTIONS................................................................................................................. 52
6 TEST PRINCIPLES ....................................................................................................................... 53

50
1. Introduction

This test plan describes the testing approach and overall framework that will drive in
testing of the system “SMART MOVERS”.
The purpose of this test plan is to:
1. Outline the overall test approach
2. Identify the activities required in our database test
3. Define deliverables
2. Project Overview
The system “SMART MOVERS” is capable of handling the details regarding customers,
items which they are transporting and handling operations including insert, view, delete
and update. The functionality of this module spans through the entire system, making
information available anywhere, anytime.

3. Test Scope
We have identified that the following items are critical to the success of the
SMARTMOVERS DATABASE.
1. The accuracy of the data’s entered in to the database
2. Its speed (in order to provide quick checkouts)
3. Less number of errors and system crash

The accuracy of the data entered in to the database


1. According to this the appropriate data should be entered in to the appropriate
columns failure to do so would results in red commands and would not accept the
results.
2. The data should be entered according to the data validation types if age is
mentioned as varchar instead of int then the data won’t be executed.

51
Speed of the data
1. Once the data is entered it should display the results immediately without causing
any delay.
2. It should also accept any amendments easily and display them quickly.

Less number of errors and system crash


1. While entering the data errors should be minimized and the system should not get
stuck.
2. A backup should be available if there is any crash or mistake in the database

4. Test Responsibilities
Test lead: Responsible for creating this test plan, work assignment and review, review of
test queries, review and compile test results and review bug reports.

Tester: Responsible for reviewing requirements, developing and testing test queries,
execute tests, prepare individual test results, submit bug reports and re-test.

5. Audience
▪ Project team members perform tasks specified in this document, and provide input and
recommendations on this document.
▪ Project Manager Plans for the testing activities in the overall project schedule, reviews
the document, tracks the performance of the test according to the task herein
specified, approves the document and is accountable for the results.
6. Test Objective
The objective of the test is to verify that the functionality of SMART MOVERS works
according to the specifications.

7. Test Assumptions
▪ Exploratory Testing would be carried out once the build is ready for testing
▪ The project will provide test planning, test design and test execution support
▪ Test team will manage the testing effort with close coordination with Project
Pm/Business Analyst
▪ Project team has the knowledge and experience necessary, or has received adequate
training in the system, the project and the testing processes.

52
8. Test Principles
▪ Testing will be focused on meeting the business objectives, cost efficiency, and quality.
▪ There will be common, consistent procedures for all teams supporting testing activities.
▪ Testing processes will be well defined, yet flexible, with the ability to change as needed.
▪ Testing activities will build upon previous stages to avoid redundancy or duplication of
effort.
9. Test Deliverables
The testers will produce the following deliverables:
1. Test queries
2. Test results (describing the tests run, run time and pass/ fail for each test)
3. Bug reports

53
3.1.2 Provide relevant test cases for the database you have implemented

3.1.2.1 Test Cases

Project Name- Smart movers’ transportation database system

Test Case Id T001 Test Designed By Dasun Dilhara Jayaweera

Test Case Priority Medium Test Designed Date 23/10/2019


Test Case Module
Database Testing Test Executed By Dasun Dilhara Jayaweera
Name
Smartmovers
Test Title Test Executed Date 23/10/2019
Database Testing

STEPS TEST STAGES TEST DATE EXPECTED RESULTS NOTES


User should be able to execute the
Actual results -
1. Testing queries 23/10/2019
data without any errors. Pass
Less time should be taken to input
data and display the data. 1sec for
Actual results -
2. Test results 23/10/2019
one query to be executed and pass
displayed.

System should be able to identify


Actual results-
3. Bug reports 23/10/2019
the Errors. failed

Table 3-1 Test Cases

54
3.1.2.2 Actual Results when Testing the Database

3.1.2.2.1 Testing Queries and Test Results

Creating the Database Tables

Figure 3-1 Creating Customer Table

Figure 3-2 Creating Customer Table – Result

Figure 3-3 Creating Customer Type Table

Figure 3-4 Creating Customer Type Table - Result

55
Figure 3-5 Creating Deports Table

Figure 3-6 Creating Deports Table - Result

Figure 3-7 Creating Employees Table

Figure 3-8 Creating Employees Table - Result

56
Figure 3-9 Creating Jobs Table

Figure 3-10 Creating Jobs Table - Result

Figure 3-11 Creating Loads Table

Figure 3-12 Creating Loads Table - Result

57
Figure 3-13 Creating Load Types Table

Figure 3-14 Creating Load Types Table - Result

Figure 3-15 Creating Payments Table

Figure 3-16 Creating Payments Table - Result

Figure 3-17 Creating Product Types Table

Figure 3-18 - Creating Product Types Table - Result

58
Figure 3-19 Creating Transport Unit Table

Figure 3-20 Creating Transport Unit Table - Result

59
Figure 3-21 Alter Table

According to the results above, all the tables are created without any errors.
As the next step the user should be able insert data without any problem.

Adding Records to the Database

Figure 3-22 Adding Customer Type Records

Figure 3-23 Adding Product Type Records

60
Figure 3-24 Adding Load Type Records

Figure 3-25 Adding Payment Records

Figure 3-26 Customer Type Records

Figure 3-27 Customer Records

61
Figure 3-28 Deport Records

Figure 3-29 Employee Records

Figure 3-30 Job Records

Figure 3-31 Load Type Records

Figure 3-32 Load Records

62
Figure 3-33 Payment Records

Figure 3-34 Product Type Records

Figure 3-35 Transport Records

63
3.1.2.2.2 Bug reports

Figure 3-36 Query

Figure 3-37 Result

In the above scenario as we see the insert query has an invalid data type instead of entering
a product name a numbers has been entered even if it was mentioned as varchar above but
the system didn’t show any errors and accepted the entry and displayed the number in the
product name column, which is a unhealthy movement.

64
3.2 Activity 3.2

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

Test data is the information used as the input of a test case and the static or
transactional information. It is a fact that data preparing is the time-consuming and
hardest phase. Test data management is a process of organizing this data to ensure
that it is input correctly and the results are also reported properly. This process defines
to ensure the accuracy, completeness, and integrity of test data. It also plays a critical
role in ensuring that sensitive information is processed securely during the testing
phase. In other words, test data management is one of the most important parts of any
product’s success. As the testing process can generate a huge volume of data, using
test data management can reduce costly and time-consuming errors and also help
testers clearly understand their jobs. Outcome can be estimated that one wishes to
achieve through test automation and accordingly the actions can be planned.
Reviewing helps to eliminate the old and outdated tests that are irrelevant to the
current test requirements which ultimately helps in reducing the costs and efforts. For
successful automation quality test data is of prime importance. Quality data set refers
to categorization of data sets into valid data, invalid data. Identifying the test process
will bring the best methods to perform the task effectively and efficiently

65
3.3 Activity 3.3

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

3.3.1.1. Feedback Questionnaire

EVALUATION SHEET - SMARTMOVERS Database System


Strong Strongly
Criteria Agree Moderate Disagree
Agree Disagree
1 The directions are clear and easy to follow.

2 User Instructions helped me to understand the system.

3 Searching for items is simple and complex searches can be done.

4 The software functions well on the computer and is free from bugs.

5 Included images and multimedia content are meaningful.

6 The user level is appropriate.

7 It is easy to learn and remember

8 Both novice and expert users can use it without any difficulty
The system is easy to use and requires fewest steps to accomplish the desired
9
tasks.

Table 3-2 Feedback Questionnaire

66
3.3.1.2. Feedback Analysis
▪ 15 users have used the application and participated for the feedback collection task.
▪ Data collected at the evaluation and the analysis is included below.

Strong Strongly
Criteria Agree Moderate Disagree Total
Agree Disagree

1 The directions are clear and easy to follow. 8 5 2 0 0 15

2 User Instructions helped me to understand the system. 10 5 0 0 0 15

3 Searching for items is simple and complex searches can be done. 13 2 0 0 0 15

4 The software functions well on the computer and is free from bugs. 15 0 0 0 0 15

5 Included images and multimedia content are meaningful. 10 1 4 0 0 15

6 The user level is appropriate. 15 0 0 0 0 15

7 It is easy to learn and remember 12 3 0 0 0 15

8 Both novice and expert users can use it without any difficulty 12 2 1 0 0 15

The system is easy to use and requires fewest steps to accomplish the
9 10 4 1 0 0 15
desired tasks.

Table 3-3 Collected Data

67
THE DIRECTIONS ARE CLEAR AND EASY TO USER INSTRUCTIONS HELPED ME TO
FOLLOW. UNDERSTAND THE SYSTEM.
Strong Agree Agree Moderate Disagree Strongly Disagree Strong Agree Agree Moderate Disagree Strongly Disagree

0% 0%
13%

33%

54%
33%
67%

SEARCHING FOR ITEMS IS SIMPLE AND THE SOFTWARE FUNCTIONS WELL ON THE
COMPLEX SEARCHES CAN BE DONE. COMPUTER AND IS FREE FROM BUGS.
Strong Agree Agree Moderate Disagree Strongly Disagree Strong Agree Agree Moderate Disagree Strongly Disagree

0% 0%
13%

87%
100%

68
INCLUDED IMAGES AND MULTIMEDIA THE USER LEVEL IS APPROPRIATE.
CONTENT ARE MEANINGFUL. Strong Agree Agree Moderate Disagree Strongly Disagree
Strong Agree Agree Moderate Disagree Strongly Disagree
0%
0%

27%

6%
67%

100%

IT IS EASY TO LEARN AND REMEMBER BOTH NOVICE AND EXPERT USERS CAN USE
Strong Agree Agree Moderate Disagree Strongly Disagree
IT WITHOUT ANY DIFFICULTY
Strong Agree Agree Moderate Disagree Strongly Disagree
0%
20%
7%0%

13%

80% 80%

69
THE SYSTEM IS EASY TO USE AND REQUIRES
FEWEST STEPS TO ACCOMPLISH THE DESIRED
TASKS.
Strong Agree Agree Moderate Disagree Strongly Disagree

6%0%

27%

67%

Figure 3-38 Feedback Analysis

70
3.3.1.3. Recommendations
▪ The system must be updated with more easy steps in navigation.
▪ Include more multimedia and infographics to make system more graphical user
friendly.
▪ A help and instruction document should be integrated with the database system.
▪ Further, additional advanced features should be added to SMARTMovers
database system to continue their operations productive and effectively.

71
4 Activity 4

4.1 Activity 4.1


Prepare a simple users’ guide and a technical documentation for the
support and maintenance of the software.

72
User
MANUAL

SMARTMOVERS Database System

User’s Manual pg. 1


Revision Sheet

Release Date Revision Description


No.
Rev. 0 22/11/2019 User’s Manual for Smart Movers

User’s Manual pg. 2


USER'S MANUAL
TABLE OF CONTENTS

Page #

A. GENERAL INFORMATION ..................................................................................... 5


1.1 System Overview 5
1.4 Points of Contact 5
1.4.1 Information ...................................................................................................... 5

1.4.2 Coordination ...................................................................................................... 6

1.4.3 Help Desk ........................................................................................................... 6

1.5 Organization of the Manual 6


B. SYSTEM SUMMARY ............................................................................................. 8
2.3 User Access Levels 8
C. GETTING STARTED ..............................................................................................10
3.1 Logging On 10
3.2 System Menu 10
3.2.1 Employee Management ................................................................................... 10

3.2.2 Customer Management ................................................................................... 12

3.2.3 Job Management ............................................................................................. 14

3.2.4 Trasport Unit Management ............................................................................. 16

3.2.5 Load Management ........................................................................................... 18

3.2.6 Reports ............................................................................................................. 20

3.3 Changing User Name and Password 20


3.4 Exit System 20

User’s Manual pg. 3


1. GENERAL INFORMATION

User’s Manual pg. 4


1. GENERAL INFORMATION

1.1 System Overview


A database system for Transport Management

▪ A software system based on the Windows 7 (or above) Platform.

▪ Graphical Scheduler system for notification

▪ User Medical Referencing System

▪ GPS / Electronic Compass Location

▪ System name or title: SMARTMovers

▪ System code: SM1

▪ System category:

Major application: performs clearly defined functions for transport management

General support system: provides general support for a variety of users and
applications

▪ Operational status:

▪ Partially Operational

▪ Under development

1.2 Points of Contact

1.2.1. Information

The points of organizational contact (POCs) that may be needed by the document user
for informational and troubleshooting purposes.
1. IT Support and Networking Division
2. Administration Division
3. Transport Management Division

User’s Manual pg. 5


1.2.2. Coordination

The list of organizations that require coordination between the project and its specific
support function (e.g., installation coordination, security, etc.)
1. IT Support and Networking Division

1.2.3. Help Desk

Help desk information including responsible personnel phone numbers for emergency
assistance.

Designation Name Contact Email

Manager – IT Support Mr. Roy Mahagedara 0776032585 [email protected]

Assistant Manager –
Mr. Tissa Vithana 0776032586 [email protected]
IT Support

Mr. Dilan Zoysa ,


Help Desk Hotline 0776032589 [email protected]
Ms. Diana Fonseka
Network
Mr. Sanjeewa Liyanage 0776032588 [email protected]
Administrator
Mr. Eranga
IT Support Officer 0776032580 [email protected]
Samarawikrama

1.3 Organization of the Manual

User’s Manual v0.01.

User’s Manual pg. 6


2. SYSTEM SUMMARY

User’s Manual pg. 7


3.1. SYSTEM SUMMARY

The system handles entire Transport Management Process. It supports

1. Employee handling
2. Customer handling
3. Job handling
4. Transport unit handling
5. Load handling and
6. Mandatory reporting

3.2. User Access Levels

The Primary user is the authorized user to add and modify data in the system.

User’s Manual pg. 8


3. GETTING STARTED

User’s Manual pg. 9


3.1. Getting Started

This section provides a general walkthrough of the system from initiation through exit.
The logical arrangement of the information shall enable the functional personnel to
understand the sequence and flow of the system. Use screen prints to depict
examples of text under each heading.

3.2. Logging On

A user ID and password is required to log onto system.

3.3. System Menu

This section describes in general terms the system menu first encountered by the user,
as well as the navigation paths to functions noted on the screen. Each system function
should be under a separate section header, 3.2.1 - 3.2.x.

3.3.1. Employee Management

Employee interface allows to insert new employee, view all existing employees,
update employee details, delete employee records.

Figure 4-1 Employee Management

User’s Manual pg. 10


Insert New Employee

Step 1. Select Assigned Deport Name


Step 2. Enter Employee Name
Step 3. Select the Designation
Step 4. Enter Address
Step 5. Enter Telephone Number
Step 6. Click Insert

View Employee Details

Step 1. Existing employee details will be loaded on to the table

Update Employee Details

Step 1. Select the required Employee from the table


Step 2. Change Deport Name, Employee Name, Designation, Address, and/or
Telephone Number
Step 3. Click Update

Delete Employee Details

Step 1. Select the required Employee from the table


Step 2. Click Delete

Clear Employee Details

Step 1. Reset the fields and the table

User’s Manual pg. 11


3.3.2. Customer Management

Customer interface allows to insert new customer, view all existing customers, update
customer details, delete customers records.

Figure 4-2 Customer Management

Insert New Customer

Step 1. Select Customer Type


Step 2. Enter Customer Name
Step 3. Enter Address
Step 4. Enter Telephone Number
Step 5. Enter Mobile Number
Step 6. Enter Fax
Step 7. Enter Email
Step 8. Click Insert
User’s Manual pg. 12
View Customer Details

Step 1. Existing Customer details will be loaded on to the table

Update Customer Details

Step 1. Select the required Customer from the table


Step 2. Change Customer Name, Address, Telephone Number, Mobile Number, Fax
and/or Email
Step 3. Click Update

Delete Customer Details

Step 1. Select the required Customer from the table


Step 2. Click Delete

Clear Customer Details

Step 1. Reset the fields and the table

User’s Manual pg. 13


3.3.3. Job Management

Job interface allows to insert new job, view all existing job, update job details, delete
job records.

Figure 4-3 Job Management

Insert New Job

Step 1. Select Customer


Step 2. Select Deport
Step 3. Enter Start Location
Step 4. Enter End Location
Step 5. Click Insert

View Job Details

Step 1. Existing Job details will be loaded on to the table

User’s Manual pg. 14


Update Job Details

Step 1. Select the required Job from the table


Step 2. Change Customer, Deport, Start Location and/or End Location
Step 3. Click Update

Delete Job Details

Step 1. Select the required Job from the table


Step 2. Click Delete

Clear Customer Details

Step 1. Reset the fields and the table

Add Load

Step 1. Open Load Management Interface

User’s Manual pg. 15


3.3.4. Transport Unit Management

Transport Unit interface allows to insert new Transport Unit, view all existing
Transport Unit, update Transport Unit details, delete Transport Unit records.

Figure 4-4 Transport Unit Management

Insert New Transport Unit

Step 1. Select Deport Name


Step 2. Enter Lorry Number
Step 3. Enter Container Number
Step 4. Select Driver
Step 5. Select Assistant
Step 6. Click Insert

User’s Manual pg. 16


View Transport Unit Details

Step 1. Existing Transport Unit details will be loaded on to the table

Update Transport Unit Details

Step 1. Select the required Transport Unit from the table


Step 7. Change Deport Name, Lorry Number, Container Number, Driver and/or
Assistant
Step 2. Click Update

Delete Transport Unit Details

Step 1. Select the required Transport Unit from the table


Step 2. Click Delete

Clear Transport Unit Details

Step 1. Reset the fields and the table

User’s Manual pg. 17


3.3.5. Load Management

Load interface allows to insert new load, view all existing loads, update load details,
delete load records.

Figure 4-5 Load Management

Insert New Load

Step 1. Select Job


Step 2. Select Load Type
Step 3. Select Transport Unit
Step 4. Select Product Type
Step 5. Select Payment
Step 6. Click Insert

User’s Manual pg. 18


View Load Details

Step 1. Existing Load details will be loaded on to the table

Update Load Details

Step 1. Select the required Load from the table


Step 2. Change Job, Load Type, Transport Unit, Product Type and/or Payment
Step 3. Click Update

Delete Transport Unit Details

Step 1. Select the required Customer from the table


Step 2. Click Delete

Clear Transport Unit Details

Step 1. Reset the fields and the table

User’s Manual pg. 19


3.3.6. Reports

Report interface allows to insert new load, view all existing loads, update load details,
delete load records.

Figure 4-6 Reporting

Generate Report

Step 1. Select Report Type – Customer Wise


Step 2. Select Customer
Step 3. Select From Date
Step 4. Select To Date
Step 5. Click Generate

3.4. User Name and Password

Contact IT Support help desk to update User Name and Password

3.5. Exit System

Click on Exit.

User’s Manual pg. 20


4.2 Activity 4.2
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

4.2.1. Use Case Diagram

Figure 4-7 Use Case Diagram

Dasun Dilahara Jayaweera / LH54659 Database Design & Development 93


4.2.2. Class Diagram

Figure 4-8 Class Diagram

94
4.2.3. Data Flow Diagram

Figure 4-9 Data Flow Diagram - Context Level

95
Figure 4-10 Data Flow Diagram - Level 1

96
4.2.4. Activity Diagrams

Figure 4-11 Activity Diagram - Insert Employee

97
Figure 4-12 Activity Diagram - Update Employee

98
Figure 4-13 Activity Diagram - Delete Employee

99
Figure 4-14 Activity Diagram - Insert Customer

100
Figure 4-15 Activity Diagram - Update Customer

101
Figure 4-16 Activity Diagram - Delete Customer

102
Figure 4-17 Activity Diagram - Insert Job

103
Figure 4-18 Activity Diagram - Update Job

104
Figure 4-19 Activity Diagram - Delete Job

105
Figure 4-20 Activity Diagram - Insert Transport Unit

106
Figure 4-21 Activity Diagram - Update Transport Unit

107
Figure 4-22 Activity Diagram - Delete Transport Unit

108
Figure 4-23 Activity Diagram - Insert Load

109
Figure 4-24 Activity Diagram - Update Load

110
Figure 4-25 Activity Diagram - Delete Load

111
Figure 4-26 Reporting

112
4.3 Activity 4.3

Suggest the future improvements that may be required to ensure the


continued effectiveness of the database system.
▪ The database can be developed beyond expectations in the future. Creating and having
a database should not be an end goal but rather a source of valid data and a means for
generating information by which to assess process, performance, and outcome quality.
▪ Data speed can be improved which definitely would help to achieve more output from
given input.
▪ Further additional features can be included such as a timing of load taken, timing of
delivery, could facilitate card payments, a reminder to deliver the product.
▪ When searching for customers displaying them with a photograph and details about last
purchased product, the date, time and who was the driver, the location etc.
▪ When searching products, the inventory level of each product displaying whether it’s in
stock or not, a reminder to reorder the inventory, any discounts available for the
inventory can be displayed.
▪ To prevent unauthorized access setting a password and username is not enough probably
a face scanner thumbprint scanner would be more advance.
▪ A strong backup storage which can prevent loss of data even from any disasters
▪ A strong memory and high amount of space in the database

113
5 References
Checkmarx. (2019). The Importance of Database Security and Integrity. [online] Available at:
https://www.checkmarx.com/2016/06/24/20160624the-importance-of-database-
security-and-integrity/ [Accessed 22 Nov. 2019].
Computer Science GCSE GURU. (2019). Database Validation - Computer Science GCSE GURU.
[online] Available at: https://www.computerscience.gcse.guru/theory/database-
validation [Accessed 21 Nov. 2019].
GeeksforGeeks. (2019). SQL | DDL, DQL, DML, DCL and TCL Commands - GeeksforGeeks.
[online] Available at: https://www.geeksforgeeks.org/sql-ddl-dql-dml-dcl-tcl-
commands/ [Accessed 22 Nov. 2019].
Parker, J. (2019). Business, User, and System Requirements - Enfocus Solutions Inc. [online]
Enfocus Solutions Inc. Available at: https://enfocussolutions.com/business-user-and-
system-requirements/ [Accessed 13 Nov. 2019].
SQL WORLD. (2019). Database Normalization Examples | Normalization in Database with
Examples | Database Normalization with Real Life Examples | Designing Normalized
Database. [online] Available at: https://www.complexsql.com/database-
normalization/ [Accessed 14 Nov. 2019].
Studytonight.com. (2019). SELECT Query and its Use in SQL | Studytonight. [online] Available
at: https://www.studytonight.com/dbms/select-query.php [Accessed 22 Nov. 2019].
Systems, G. (2019). What Is Database Security And Why Is It Important?. [online] GA Systems.
Available at: https://www.gasystems.com.au/database-security-important/
[Accessed 22 Nov. 2019].
Teach Computer Science. (2019). Database Validation | Data Validation & Verification.
[online] Available at: https://teachcomputerscience.com/database-validation/
[Accessed 21 Nov. 2019].
W3schools.com. (2019). SQL BETWEEN Operator. [online] Available at:
https://www.w3schools.com/sql/sql_between.asp [Accessed 22 Nov. 2019].
W3schools.com. (2019). SQL DELETE Statement. [online] Available at:
https://www.w3schools.com/sql/sql_delete.asp [Accessed 22 Nov. 2019].
W3schools.com. (2019). SQL GROUP BY Statement. [online] Available at:
https://www.w3schools.com/sql/sql_groupby.asp [Accessed 22 Nov. 2019].

114
W3schools.com. (2019). SQL HAVING Clause. [online] Available at:
https://www.w3schools.com/sql/sql_having.asp [Accessed 22 Nov. 2019].
W3schools.com. (2019). SQL ORDER BY Keyword. [online] Available at:
https://www.w3schools.com/sql/sql_orderby.asp [Accessed 22 Nov. 2019].
W3schools.com. (2019). SQL SELECT Statement. [online] Available at:
https://www.w3schools.com/sql/sql_select.asp [Accessed 22 Nov. 2019].
W3schools.com. (2019). SQL UPDATE Statement. [online] Available at:
https://www.w3schools.com/sql/sql_update.asp [Accessed 22 Nov. 2019].
W3schools.com. (2019). SQL WHERE Clause. [online] Available at:
https://www.w3schools.com/sql/sql_where.asp [Accessed 22 Nov. 2019].

115

You might also like