0% found this document useful (0 votes)
18 views111 pages

Unit 04 Database-Assignment Holistic (K.SATHURCIGAN)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views111 pages

Unit 04 Database-Assignment Holistic (K.SATHURCIGAN)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 111

Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)


INTERNAL VERIFICATION – ASSESSMENT DECISIONS

Programme title HND in Computing (Software Engineering)

Assessor Mr. J. Piragan Internal Verifier Mr.V. Niruban


Unit 04: Database Design & Development
Unit(s)
Data base system for the SmartMovers Transport Company
Assignment title

Student’s name Mr. Kamalendran Sathurcigan


List which assessment criteria Pass Merit Distinction
the Assessor has awarded.

INTERNAL VERIFIER CHECKLIST

Do the assessment criteria awarded match


those shown in the assignment brief? Y/N

Is the Pass/Merit/Distinction grade awarded


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

Does the assessment decision need


Y/N
amending?

Assessor signature Date

Internal Verifier signature Date


Programme Leader signature (if required)
Date

Confirm action completed


Remedial action taken
Give details:

Assessor signature Date

Internal Verifier
Date
signature
Programme Leader
Date
signature (if required)
Higher Nationals - Summative Assignment Feedback Form
Student Name/ID Mr. Kamalendran Sathurcigan (BAT/A-006688)

Unit Title Unit 04: Database Design & Development

Assignment Number 1 Assessor Mr. J. Piragan


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

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

LO3 Test the system against user and system requirements.


Pass, Merit & Distinction P4 M4 D2
Descripts

LO4 Produce technical and user documentation.


Pass, Merit & Distinction P5 M5 D3
Descripts

Grade: Assessor Signature: Date:

Resubmission Feedback:

Grade: Assessor Signature: Date:

Internal Verifier’s Comments:

Signature & Date:

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

Action Plan

Summative feedback

Feedback: Student to Assessor


Mr.Piragan taught us database well as everyone has understand the subject in proper
manner. For this, I like to thank him.

Assessor Date
signature

Student [email protected] Date 20/08/2020


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

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

Word Processing Rules

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

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

I hereby, declare that I know what plagiarism entails, namely to use another’s work and to present
it as my own without attributing the sources in the correct form. I further understand what it means
to copy another’s work.

1. I know that plagiarism is a punishable offence because it constitutes theft.


2. I understand the plagiarism and copying policy of Edexcel UK.
3. I know what the consequences will be if I plagiarise or copy another’s work in any of the
assignments for this program.
4. I declare therefore that all work presented by me for every aspect of my program, will be my
own, and where I have made use of another’s work, I will attribute the source in the correct
way.
5. I acknowledge that the attachment of this document signed or not, constitutes a binding
agreement between myself and Edexcel UK.
6. I understand that my assignment will not be considered as submitted if this document is not
attached to the assignment.

Student’s Signature: Date:


[email protected] 20/08/2020
Higher National Diploma in Computing
Assignment Brief
Student Name /ID Number Mr. Kamalendran Sathurcigan (BAT/A-006688)

Unit Number and Title Unit 4: Database Design & Development

Academic Year 2020/21

Unit Tutor Mr. J. Piragan

Assignment Title Data base system for the SmartMovers Transport


Company

Issue Date 19/03/2020

Submission Date 20/08/2020

IV Name & Date

Submission format

Part 1: The submission is in the form of an individual written report. This should be written
in a concise, formal business style using single spacing and font size 12. You are required
to make use of headings, paragraphs and subsections as appropriate, and all work must
be supported with research and referenced using the Harvard referencing system. Please
also provide a bibliography using the Harvard referencing system. The recommended
word limit is 2,000–2,500 words, although you will not be penalised for exceeding the
total word limit.
Part 2: The submission is in the form of a fully functional relational database system
demonstrated to the Tutor; and an individual written report (please see details in Part 1
above).
Part 3: The submission is in the form of a witness statement of the testing completed by
the Tutor; technical documentation; and a written report (please see details in Part 1
above).
Unit Learning Outcomes:

LO1 Use an appropriate design tool to design a relational database system for a
substantial problem.
LO2 Develop a fully functional relational database system, based on an existing
system design.
LO3 Test the system against user and system requirements.
LO4 Produce technical and user documentation.
Assignment Brief and Guidance:

*Please note that assignment guidance is for reference only and should be
more specific in detail to meet customized needs.
Assignment brief
Case study
You are employed as a Database Developer for a large IT development
company. The company has been approached by a transport company called
SmartMovers which has grown to a level where need to have an automated
system to handle day today operational activities to meet customer demands.
You are given the job to design and develop a database solution for
SmartMovers to meet their business requirements.
The company transports chemical products from one location to another on
behalf of registered customers. Customers are of three types namely
Catogory1, 2 and 3. Each customer is given a unique customer number and his
or her details have to be recorded in the system.
Each transport operation is called a job, which involves picking up one or more
loads of the products from a customer requested start location and delivers it
to a customer requested destination. A unique number is given for each job and
for each load when they are created.
A Load is transported using a particular transport unit, which consists of a lorry,
a driver, assistant, and a container (for carrying the product) A container is fixed
to a trailer so it needs to be coupled to a lorry at the start of a Job. (Single
container can transport only one chemical product due to safety requirements)
Payments for a job depends on customer type, product type (No Risk, High risk)
and the load type (small, medium and large). Transport operations are run from
9 regional depots. Jobs are allocated to individual depots to service. Depots
hold, manage and maintain their own transport units which are permanently
allocated to them to service Jobs. Normally transport units are held at the base
Depot they belong.
The final system should be able to provide the required information for
management decision making and to handle daily operations efficiently and
effectively.
Activity 01
Activity 1.1
a. Identify the user and system requirements to design a database for the
above scenario.
b. Identify entities and attributes of the given scenario and design a
relational database system using conceptual design (ER Model) by
including identifiers (primary Key) of entities and cardinalities,
participations of relationships.
c. Convert the ER Model into logical database design using relational
database model including primary keys foreign keys and referential
Integrities. It should contain at least five interrelated tables.
Note:-It is allowed to have your own assumptions and related attributes
within the scope of the case study given.
Activity 1.2
a. Explain data normalization with examples. Check whether the provided
logical design in task 1.1 is normalised. If not, normalize the database by
removing the anomalies.
b. Design set of simple interfaces to input and output for the above
scenario using Wireframe or any interface-designing tool.
c. Explain the validation mechanisms to validate data in the tables with
examples.

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

Activity 2.2
a. Explain the usage of DML with below mentioned queries by giving at
least one single example per each case from the developed database.
Select
Update
Delete
Note: - The queries you have selected should be meaningful and relevant to
the given scenario.

Activity 2.3
a. Explain how security mechanisms have been used and the importance
of these mechanisms for the security of the database. Implement
proper security mechanisms (EX: -User groups, access permissions) in
the developed database.
Activity 2.4
a. Explain the usage of the below SQL statements with the examples from
the developed database
Group by
Order by
Having
Between
Where

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

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

Activity 3.3
a. Get independent feedback on your database solution from the non-
technical users and some developers (use surveys, questioners,
interviews or any other feedback collecting method) and make
recommendations and suggestions for improvements in a separate
conclusion/recommendations section.
Activity 4
Activity 4.1
a. Prepare a simple users’ guide and a technical documentation for the
support and maintenance of the software.
Activity 4.2
a. Your technical documentation should include some of the UML
diagrams (Use case diagram Class diagram, etc.), flow charts for the
important functionalities, context level DFD and the Level 1 DFD
Activity 4.3
a. Suggest the future improvements that may be required to ensure the
continued effectiveness of the database system.
Grading Criteria Achieved Feedback

LO1 Use an appropriate design tool to design a relational


database system for a substantial problem

P1 Design a relational database system using appropriate


design tools and techniques, containing at least four
interrelated tables, with clear statements of user and system
requirements.
M1 Produce a comprehensive design for a fully functional
system that includes interface and output designs, data
validations and data normalization.

D1 Assess the effectiveness of the design in relation to user


and system requirements.
LO2 Develop a fully functional relational database system,
based on an existing system design

P2 Develop the database system with evidence of user


interface, output and data validations, and querying across
multiple tables.

P3 Implement a query language into the relational database


system

M2 Implement a fully functional database system that


includes system security and database maintenance.

M3 Assess whether meaningful data has been extracted


using query tools to produce appropriate management
information.
LO3 Test the systems against user and system requirements

P4 Test the system against user and system requirements.

M4 Assess the effectiveness of the testing, including an


explanation of the choice of test data used.
LO2 & LO3
D2 Evaluate the effectiveness of the database solution in
relation to user and system requirements, and suggest
improvements.
LO4 Produce technical and user documentation

P5 Produce technical and user documentation.

M5 Produce technical and user documentation for a fully


functional system, including diagrams showing movement of
data through the system, and flowcharts describing how the
system works.

D3 Assess any future improvements that may be required to


ensure the continued effectiveness of the database system.
Acknowledgement
First of all, I would like to express my first gratitude to Esoft and all its employees for being
the source of the life of many students by giving a degree as external. I am happy that my
software engineer dream will be fulfilled by Esoft. I express my gratitude to my parents,
colleagues, especially Esoft lecturers for this. And I am happy for Esoft gives a way of
obtaining a British degree in Sri Lanka.

As specially taught the Database design and development course and helped to solve all doubts
concerning the lesson of the students also helped to make the database assignment systematic
through his help, and he helped what he can also, for piragan sir I extend my sincere gratitude.

K. Sathurcigan Unit 04 Database design and development 1


Table of contents
Acknowledgement ..................................................................................................................... 1

Table of contents ........................................................................................................................ 2

Table of Figures ......................................................................................................................... 4

Table of Tables .......................................................................................................................... 7

Activity 01 ................................................................................................................................. 8

Introduction ............................................................................................................................ 8

Benefits of Automatic system ................................................................................................ 8

Cons of Manual system .......................................................................................................... 8

1.1 User requirements and system requirements for the SmartMovers Company ............ 8

User requirements .............................................................................................................. 8

System requirements .......................................................................................................... 9

Suggestions of software requirements for the server ....................................................... 11

Suggestions for hardware requirements for the server ..................................................... 11

Suggestions for Hardware and Software requirements for Client PCs ............................ 11

1.1.1 ER diagram for the SmartMovers Company’s Database ........................................ 12

1.1.2 Logical Schema ....................................................................................................... 13

1.2 Normalization and Graphical Interface .......................................................................... 14

1.2.1 Normalization.......................................................................................................... 14

1.2.2 Graphical User interface for the SmartMovers Company ...................................... 17

1.2.3 Validation Mechanism and Their Examples ........................................................... 24

Validation ..................................................................................................................... 24

1.3 Analyse the ER diagram and Logical schema to find the effectiveness of the design. . 26

Activity 02 ............................................................................................................................... 27

2.1 Creating a database for the SmartMovers Company based on the ER diagram using SQL
DDL Statements ................................................................................................................... 27

K. Sathurcigan Unit 04 Database design and development 2


2.1.1 Create the Database Using SSMS (SQL SERVER MANAGEMENT STUDIO) .. 27

2.1.2 Create the Interface for doing the insert, update and delete function by using suitable
IDE ................................................................................................................................... 32

2.1.3 Explanation for the Implementation of Validation methods ................................... 36

2.1.4 Join query for showing the Payment details with Customer and Job details .......... 39

2.2 Explanations for the usage of the DML with an example for per cases from developed
Database ............................................................................................................................... 40

2.3 Explanation for the Security mechanism how used in a database to secure the data..... 44

2.3.1 Details of the Security Mechanism ......................................................................... 44

Database Security Controls .......................................................................................... 45

2.3.2 Implementation of the Security Mechanism ........................................................... 47

2.4 Explanation for the SQL Statements with their Examples ............................................ 50

Activity 03 ............................................................................................................................... 56

3.1 Test case for check the system ....................................................................................... 56

3.1.1 Test Cases Related with Implemented Database Activities .................................... 57

3.2 Suggest by Explaining about the selected test data on how to improve the effectiveness
of testing............................................................................................................................... 60

3.3 Get Feedback for the developed database connected to System .................................... 61

Activity 04 ............................................................................................................................... 63

4.1 User’ guide for maintaining the software ...................................................................... 63

4.2 Technical document for SmartMovers Company Management Software ..................... 87

4.3 Suggestion for the future improvements of the database system for maintaining database
effectively ............................................................................................................................ 91

Conclusion ............................................................................................................................... 92

Self-Criticism ........................................................................................................................... 93

Gantt chart ................................................................................................................................ 94

References ................................................................................................................................ 95

K. Sathurcigan Unit 04 Database design and development 3


Table of Figures
Figure 1 ER diagram for SmartMovers Company ................................................................... 12
Figure 2 Logical Schema ......................................................................................................... 13
Figure 3 Login.......................................................................................................................... 17
Figure 4 Menu .......................................................................................................................... 18
Figure 5 Customer.................................................................................................................... 18
Figure 6 Product ....................................................................................................................... 19
Figure 7 Job.............................................................................................................................. 19
Figure 8 Load ........................................................................................................................... 20
Figure 9 Employee ................................................................................................................... 20
Figure 10 Payment ................................................................................................................... 21
Figure 11 Depot ....................................................................................................................... 21
Figure 12 Transport Unit ......................................................................................................... 22
Figure 13 Lorry ........................................................................................................................ 22
Figure 14 Container ................................................................................................................. 23
Figure 15 Trailer ...................................................................................................................... 23
Figure 16 Creating a New Database ........................................................................................ 27
Figure 17 Use the Database ..................................................................................................... 27
Figure 18 Customer Table ....................................................................................................... 28
Figure 19 Add Constraint through ALTER statement ............................................................. 28
Figure 20 Create the Product table........................................................................................... 28
Figure 21 Create Job Table ...................................................................................................... 29
Figure 22 Create the Load Table ............................................................................................. 29
Figure 23 Create the Payment Table ........................................................................................ 29
Figure 24 Create the Employee Table ..................................................................................... 30
Figure 25 Create the Lorry Table............................................................................................. 30
Figure 26 Create the Container Table ...................................................................................... 30
Figure 27 Create the Trailer Table ........................................................................................... 30
Figure 28 Create the Transport Unit Table .............................................................................. 31
Figure 29 Create the Depot Table ............................................................................................ 31
Figure 30 Interface Creation .................................................................................................... 32
Figure 31 Fix the validation for Customer Form ..................................................................... 32
Figure 32 Insert & Update Codes Calling................................................................................ 34

K. Sathurcigan Unit 04 Database design and development 4


Figure 33 Main function .......................................................................................................... 34
Figure 34 Delete & Load functions ......................................................................................... 35
Figure 35 Add validation for the Customer Table ................................................................... 36
Figure 36 Add validation for the Product Table ...................................................................... 36
Figure 37 Add validation for the Job Table ............................................................................. 36
Figure 38 Add validation for the Load Table .......................................................................... 36
Figure 39 Add validation for the Payment Table..................................................................... 37
Figure 40 Add validation for the Employee Table .................................................................. 37
Figure 41 Add validation for the Lorry Table ......................................................................... 37
Figure 42 Add validation for the Container Table ................................................................... 37
Figure 43 Add validation for the Trailer Table ........................................................................ 38
Figure 44 Add validation for the Transport Unit Table ........................................................... 38
Figure 45 Add validation for the Depot Table ......................................................................... 38
Figure 46 Validation methods explanation .............................................................................. 38
Figure 47 Progress of Join query ............................................................................................. 39
Figure 48 Usage of SELECT Statement .................................................................................. 40
Figure 49 Before Update .......................................................................................................... 41
Figure 50 On Update works ..................................................................................................... 41
Figure 51 After Update ............................................................................................................ 42
Figure 52 On DELETE working .............................................................................................. 42
Figure 53 Before Delete ........................................................................................................... 43
Figure 54 After Delete ............................................................................................................. 43
Figure 55 DCL Type ................................................................................................................ 44
Figure 56 Create a Role and User in Database ........................................................................ 47
Figure 57 If privileges are given .............................................................................................. 47
Figure 58 If didn't privilege given ........................................................................................... 48
Figure 59 Access denied .......................................................................................................... 49
Figure 60 Access confirmed .................................................................................................... 49
Figure 61 without Group by..................................................................................................... 50
Figure 62 GROUP BY Statement ............................................................................................ 51
Figure 63 Example for ORDER BY ........................................................................................ 52
Figure 64 Customer Table ....................................................................................................... 53
Figure 65 Example of HAVING .............................................................................................. 53
Figure 66 Example for BETWEEN statements ....................................................................... 54

K. Sathurcigan Unit 04 Database design and development 5


Figure 67 Example for WHERE Statements ........................................................................... 55
Figure 68 Feedback Form ........................................................................................................ 61
Figure 69 Response .................................................................................................................. 62
Figure 70 UML Diagram ......................................................................................................... 90
Figure 71 Gantt chart ............................................................................................................... 94

K. Sathurcigan Unit 04 Database design and development 6


Table of Tables
Table 1 Software & Hardware requirements for Client PCs ................................................... 11
Table 2 Un-Normalized Form .................................................................................................. 14
Table 3 First Normalization Form ........................................................................................... 15
Table 4 Second Normal Form .................................................................................................. 15
Table 5 Job in Second Normal Form ....................................................................................... 16
Table 6 Adding transitive dependency .................................................................................... 16
Table 7 Removing Transitive Dependency.............................................................................. 17
Table 8 Explanation for the Validation Methods ..................................................................... 24
Table 9 Functionalities through interface ................................................................................ 33
Table 10 Database Security systems ........................................................................................ 45
Table 11 Test Case ................................................................................................................... 56
Table 12 Test case with examples ........................................................................................... 57

K. Sathurcigan Unit 04 Database design and development 7


Activity 01

Introduction
SmartMovers Company is a kind of transporting company. Which transports especially
chemical products. This company going to change their system, Manuel, to Automatic. So,
now the company ask our software company to develop a system for their use. For this, as a
database developer try to full fill their needs through creating their database of them.

Benefits of Automatic system


• Data storing is very easy
• Data analysing is easy than the manual system
• Data retrieving is easy than the manual system

Cons of Manual system


• Data managing is difficult than the automatic system.
• There are some security issues on the manual system, i.e. if any disaster, can’t

1.1 User requirements and system requirements for the SmartMovers


Company

User requirements

Which means, when starting a new project, user requirement is important for creating
the features of the system. I.e. the user requirements are collected from the customer
after that the other activities will be executed.

• Customer - Here the Customer details (id, name, address, phone number and type)
need to store into the Customer table of the SmartMovers database.

• Product - Here the Product details (id, name, weight and type) need to store into the
Product table of the SmartMovers database.

K. Sathurcigan Unit 04 Database design and development 8


• Job - Here the Job details (id, starting location, ending location, start date and end
date) need to store into the Job table of the SmartMovers database.

• Load - Here the Load details (id and type) need to store into the Load table of the
SmartMovers database.

• Employee - Here the Employee details (id, name, address, phone number and type)
need to store into the Employee table of the SmartMovers database.

• Lorry - Here the Lorry details (id, lorry number and type) need to store into the Lorry
table of the SmartMovers database.

• Container - Here the Container details (id and type) need to store into the Container
table of the SmartMovers database.

• Trailer - Here the Trailer details (id and type) need to store into the Trailer table of
the SmartMovers database.

• Payment - Here the Payment details (id, amount, date and type) need to store into
the Payment table of the SmartMovers database.

• Transport unit - Here the Transport unit details (id and name) need to store into the
Transport unit table of the SmartMovers database.

• Depot - Here the Depot details (id, name and contact number) need to store into the
Depot table of the SmartMovers database.

System requirements

Which means System requirements are shows how the automated system will work is.
I.e. when the client will insert or update or delete, how the activity will execute and
what are the features need to add these are the details should be assumed here.

K. Sathurcigan Unit 04 Database design and development 9


• Customer – When entered the Cus_id, Cus_name, Cus_address, Cus_phoneNo and
Cus_type details into the customer table, the system automatically checks the
Cus_type, is that C – 01 or C – 02 or C- 03. If the Cus_type suit that condition, this
customer data can be stored into the customer table, otherwise the system will show
the error message. Here Cus_id is the unique and primary key. This primary key will
go to another table as a foreign key. Through this, the customer details can be used
in other entity’ tables.

• Product – The Product table has Pro_id, Pro_type, Pro_weight, Pro_name and
Cus_id_fk columns. Additionally, the Cus_id will come as foreign key gave the
customer details to the product table. The Pro_type can be as ‘Low Risk’, ‘Risk’ and
‘High Risk’.

• Job - Job_id, St_location, En_location, St_date and En_Date details are stored inside
of the job table here the customer details and product details will be carried by the
Cus_id and Pro_id through foreign key relationship and also the Transport unit
details can be carried by the Tu_id_fk to here.

• Load – After store the following details (Load_id, Load_type) additionally product
details will be coming here through the Pro_id_fk. Here, the Load_type can be as
‘small’, ‘medium’ and ‘large’.

• Employee - Emp_id, Emp_name, Emp_address, Emp_phoneNo, Emp_type is stored


into the Employee table. As especially the Driver and Assistant details can be pass
to the Transport Unit table as Driver_id and Assis_id.

• Lorry - Lorry_id, Lorry_type, Lorry_licenceNo are store into the Lorry table. And
also, the Container and trailer details passed here through the foreign key
relationships. The Lorry_type can be as ‘small’, ‘medium’ and ‘large’.

• Container - Con_id, Con_type is store into the Container table. The Con_type can
be as ‘small’, ‘medium’ and ‘large’.

K. Sathurcigan Unit 04 Database design and development 10


• Trailer - Tr_id, Tr_type is store into the Trailer table. The Tr_type can be as ‘small’,
‘medium’ and ‘large’.

• Payment - Pay_id, Pay_amount, Pay_date, Pay_type are store into the Payment table.
The Pay_type can be as ‘Cash’, ‘Visa card’ and ‘Credit card’.

• Transport unit – Tu_id and Tu_name store into the Transport unit table.

• Depot – De_id, De_location, De_phoneNo and De_braanchName details are stored


into the Depot table. The Transport unit details can carry here through the foreign
key relationship.

Suggestions of software requirements for the server

• Windows Server 2019


• Microsoft SQL Server 2019 Express (.NET Framework 4.6.1)
• SQL Server Management Studio (SSMS) 18.6
• Micro Soft Office 2019

Suggestions for hardware requirements for the server

• RAM - 8GB
• Processor - Intel Core i7 (Processor speed - x64 Processor: 2.4 GHz)
• Hard drive - 2TB
• VGA - NVIDIA GeForce 4GB

Suggestions for Hardware and Software requirements for Client PCs

Table 1 Software & Hardware requirements for Client PCs


Software requirements Hardware requirements
RAM - 8GB, Windows 10 64 bit,
Processor - Intel Core i5 (Processor speed - x64 Windows Server 2019,
Processor: 2.4 GHz), .NET Framework 4.6.1,
Hard drive - 512TB, SQL Server Management Studio (SSMS) 18.6,
VGA - NVIDIA GeForce 2GB Micro Soft Office 2019

K. Sathurcigan Unit 04 Database design and development 11


1.1.1 ER diagram for the SmartMovers Company’s Database

Lorry_id
Tu_name
Tu_id
Lorry_type Lorry
De_phonrNo
1 De_location
has
m m Transport_unit 1
Lorry_liicenceNo has
1
has Depot
has

1 1 1 1 1 De_branchName
Container De_id
Trailer

in work in
Con_id Done by
Tr_type
Con_type
Tr_id
1 Emp_name
1
Pay_id St_location Load_type
1

Payment Job_id Employee


Load
St_date
Pay_date Job Emp_phoneNo
m En_date
Load_id Emp_address
1 Emp_type
Pay_amount
m En_location 1
Emp_id
pay
Give
into
create
Cus_phoneNo as
1 1 1
1
Cus_adderss
Customer 1 has m Product

Cus_type Pro_name Pro_id


Pro_type
Cus_id Pro_weight
Cus_name

Figure 1 ER diagram for SmartMovers Company

This picture shows the relations between the main entities of the SmartMovers Company.

K. Sathurcigan Unit 04 Database design and development 12


1.1.2 Logical Schema

Figure 2 Logical Schema

This logical schema was designed based on the ER diagram. Through this, can understand their
activities how interconnected are.

K. Sathurcigan Unit 04 Database design and development 13


1.2 Normalization and Graphical Interface

1.2.1 Normalization

Database normalization is a database schema design technique, by which an existing schema


is modified to minimize redundancy and dependency of data. (Normalization, 2020)
The three types of Normalization methods are followed.
• First Normalization
• Second Normalization
• Third Normalization

1. First Normalization Form -


The rule for the first normalization form is, which has atomic values are. There is no Column
include multiple data in SmartMovers database. The second rule for the first normalization
form is, every data should be unique. In the table, each data defines by giving an id. This is
another rule for another normal form.
Table 2 Un-Normalized Form

Cus_name Cus_address Emp_name Emp_address En_location and date


No:02, pillaiyarkovil
road,kallady,
No:11, mamangam,
No:24, Batticaloa
Kumar, Batticaloa
Vimal navalady, 12-10-2020
Ganesh No:18, urani,
batticaloa No:20, eravur,
Batticaloa
Batticaloa
18-10-2020
No:11, No:27, navalapittiya,
No:12, kulavadi,
Raja kallady, Karthik Colombo
Batticaloa
Batticaloa 28-11-2020
No:03, No:20, mosque road,
No:23, navaladi,
Ram kokkuvil, Rakul muthur
batticaloa
batticaloa 10-12-2020

K. Sathurcigan Unit 04 Database design and development 14


Table 3 First Normalization Form
Cus_id Cus_name Cus_address Emp_id Emp_name Emp_address En_location End_date
No:02,
No:24, 12-10-
No:18, urani, pillaiyarkovil
1 Vimal navalady, 100 Ganesh 2020
Batticaloa road,kallady,
batticaloa
Batticaloa
No:24, No:11, No:20,
18-10-
1 Vimal navalady, 120 Kumar mamangam, eravur,
2020
batticaloa Batticaloa Batticaloa
No:11, No:12, No:27,
28-11-
2 Raja kallady, 105 Karthik kulavadi, navalapittiya,
2020
Batticaloa Batticaloa Colombo
No:03, No:23, No:20,
10-12-
3 Ram kokkuvil, 110 Rakul navaladi, mosqueroad,
2020
batticaloa batticaloa muthur

According to this table can understand the first normalization form has each data were unique
and there are no combined values in the same column even though if the data repeated.

2. Second Normalization Form –


The first rule for the second normalization form is, the tables should be in first normal form.
According to tell above, the second rule for the second normalization form is to provide a
primary key for the important (unique) column to finding data by each in exes data inserted
table. The id column is assigned as primary key, through this fulfilled the first and second
normal forms.

Table 4 Second Normal Form


Cus_id Customer_name Customer_address
1 Vimal No:24, navalady,batticaloa
2 Raja No:11, kallady,batticaloa
3 Ram No:03, kokkuvil,batticaloa

The Basic rule for the third normal form is, which have to in as second normal form. And that
specific table should not have the transitive functional dependencies.

K. Sathurcigan Unit 04 Database design and development 15


In the example, there is a need to filter the final table, which is the third table, which was made
from joining tables of Customer table and the Employee table. In the second normal form, the
Job table follows.
Table 5 Job in Second Normal Form

Cus_id Employee_id Ending_location End_date


1 100 No:02, pillaiyarkovil road,kallady,batticaloa 12-10-2020
1 120 No:20, eravur,batticaloa 18-10-2020
2 105 No:27, navalapittiya,Colombo 28-11-2020
3 110 No:20, mosqueroad,muthur 10-12-2020

The primary key of this table is including the Cus_id and Job_id. Which called composite key.

The Company like to add two columns again into the table. Those are Max_distance and cost
of the delivery, which will add follows.
Table 6 Adding transitive dependency

Cus_id Emp_id En_location End_date Depot Transport Unit


No:02, pillaiyarkovil
1 100 12-10-2020 Jaffna Jaffna - 03
road,kallady,batticaloa
No:20,
1 120 18-10-2020 Gale Gale - 01
eravur,batticaloa
No:27,
2 105 28-11-2020 Batticaloa Batticaloa - 02
navalapittiya,Colombo
No:20,
3 110 10-12-2020 Colombo Colombo - 03
mosqueroad,muthur

The depot is depending on the customers' delivery address and the transport unit depends on
the selected depot. So, this a transitive dependency.

Other table's non-key column' data alternations effect is transitive functional dependency. The
column should not be depending on other columns by common using words. When analysing
this SmartMovers' database, can identify the there are no transitive dependencies. So, this a
proof for the created SmartMovers' database is an example for the Third normalization Form.

K. Sathurcigan Unit 04 Database design and development 16


Can remove the transitive dependency by, separating the transport unit and provide the
transport unit id to the main table as follows.

Table 7 Removing Transitive Dependency

TU_id Transport Unit Depot


1002 Jaffna - 03 Jaffna
2203 Gale - 01 Gale
2421 Batticaloa - 02 Batticaloa
6503 Colombo - 03 Colombo

1.2.2 Graphical User interface for the SmartMovers Company

The Customer access will be simple by using these interfaces, these are designed using C#
language.

Figure 3 Login

K. Sathurcigan Unit 04 Database design and development 17


Figure 4 Menu

Figure 5 Customer

K. Sathurcigan Unit 04 Database design and development 18


Figure 6 Product

Figure 7 Job

K. Sathurcigan Unit 04 Database design and development 19


Figure 8 Load

Figure 9 Employee

K. Sathurcigan Unit 04 Database design and development 20


Figure 10 Payment

Figure 11 Depot

K. Sathurcigan Unit 04 Database design and development 21


Figure 12 Transport Unit

Figure 13 Lorry

K. Sathurcigan Unit 04 Database design and development 22


Figure 14 Container

Figure 15 Trailer

K. Sathurcigan Unit 04 Database design and development 23


1.2.3 Validation Mechanism and Their Examples

Validation
Validation is an automatic computer check to ensure that the data entered is sensible and
reasonable. This does not check the accuracy of the data.
(verification, 2020 )
When the data insert into the database and retrieve from the database, the data can be accurately
inserted and retrieve in ensure through the multiple validations.

There are some validation methods were follows.


• Data length
• Data type constraint
• PRIMARY KEY
• CHECK
• NOT NULL

The explanation for the validation methods


Table 8 Explanation for the Validation Methods

Data length When the limitation applies for the word counts, which is used to increase the
system' speed and this will allow only recommended limit of letters. For
example - When using NUMERI data type for Telephone No, the user can
enter limited numbers.
E.g.

Data type When using a specific data type for one insertion, this is useful for getting
constraint correct data through the function. For example - of the data type used as
NUMERIC for any option, the user can add only numbers not texts.
E.g.

K. Sathurcigan Unit 04 Database design and development 24


PRIMARY If the PRIMARY KEY option will use for any data gathering, the data can't
KEY be as zero and also which should be unique.
E.g.

CHECK When the CHECK constraint used for any insert functions, that will check the
data is that data same to already told data. If the data same, that will allow the
data to insert into the table of the database.
E.g.

NOT If this constraint used for any data insert function, that column can't be as
NULL empty. For this purpose, this constraint is using.
E.g.

K. Sathurcigan Unit 04 Database design and development 25


1.3 Analyse the ER diagram and Logical schema to find the effectiveness of
the design.
Firstly, design the user requirements and system requirements accurately based on customer
needs. Through this activity, can design the ER Diagram and Logical Schema perfectly.
According to this detail, the database for the SmartMovers Company was designed. After these
steps, the server PC and client PCs will be choosing.

Secondly, check the ability of the client PC to find the Company needed data by adding the
additional tables. These table details were documented in the requirements.

The relationships were making between the tables, according to the customer requirements for
data insert, update, delete and can retrieve the specific data when the customer needs. I.e.
through this, when the customer inserts any data into any table of the Company' database, this
is the way of adding the data in their specific place.

So, the ER diagram and Logical schema is the blueprint for a way of the data where need to
store is. According to this, an easy to manage the collection of data.

K. Sathurcigan Unit 04 Database design and development 26


Activity 02

2.1 Creating a database for the SmartMovers Company based on the ER


diagram using SQL DDL Statements

2.1.1 Create the Database Using SSMS (SQL SERVER MANAGEMENT STUDIO)

The database of the SmartMovers Company is developed by using SQL Server 2017 and SQL
SERVER MANAGEMENT STUDIO v18.5. Through this software, the database was built,
evidence for that is given below.

1. Create a new Database

Figure 16 Creating a New Database

According to this picture, can identify the query for creating a new database. Here the
SmartMovers_DB is the name of the database and ‘CREATE DATABASE’ is the keyword for
giving the order to create a database to the SQL SERVER MANAGEMENT STUDIO (SSMS).

2. Use the created specific database

Figure 17 Use the Database

The above picture shows the query for using the specific database. I.e. there is one or more
database created in the SSMS. When starting to do create tables for the specific database, have
to choose the database firstly. For this reason, this query is used.

K. Sathurcigan Unit 04 Database design and development 27


3. Table Creations
• Customer table -

Figure 18 Customer Table

According to this above picture, the customer table was created in the SmartMovers database.
If the table will create like this, or first create the table without any constraints and the
constraints will apply thorough the ‘ALTER TABLE’ concept which given below.

Figure 19 Add Constraint through ALTER statement

Same like this, other tables also create with both methods. The simple method for creating
tables given below.

• Product table -

Figure 20 Create the Product table

K. Sathurcigan Unit 04 Database design and development 28


• Job table

Figure 21 Create Job Table

• Load table

Figure 22 Create the Load Table

• Payment table

Figure 23 Create the Payment Table

K. Sathurcigan Unit 04 Database design and development 29


• Employee table

Figure 24 Create the Employee Table

• Lorry table

Figure 25 Create the Lorry Table

• Container table

Figure 26 Create the Container Table

• Trailer table

Figure 27 Create the Trailer Table

K. Sathurcigan Unit 04 Database design and development 30


• Transport unit table

Figure 28 Create the Transport Unit Table

• Depot table

Figure 29 Create the Depot Table

K. Sathurcigan Unit 04 Database design and development 31


2.1.2 Create the Interface for doing the insert, update and delete function by using
suitable IDE

The Management software for the SmartMovers Company was developed using C# language
in Visual Studio.

Figure 30 Interface Creation

The above picture is the evidence, for the interface was developed by using Visual studio. After
finish the interface designing, the application can run. The run time application details are given
below.

Figure 31 Fix the validation for Customer Form

K. Sathurcigan Unit 04 Database design and development 32


According to the above picture, the validation is assigned to the customer as Cus_type
(Customer type). Through this, customer can enter the already defined customer types. This is
like a restriction for the customer.
Table 9 Functionalities through interface

Function Before After

Insert

Update

Delete

For these functions, how the code was written is show on below pictures.

K. Sathurcigan Unit 04 Database design and development 33


Figure 32 Insert & Update Codes Calling

Figure 33 Main function

K. Sathurcigan Unit 04 Database design and development 34


Figure 34 Delete & Load functions

According to these codes, the application forms were developed.

K. Sathurcigan Unit 04 Database design and development 35


2.1.3 Explanation for the Implementation of Validation methods

The above-told validation methods were used in SmartMovers database for their management
process. Used for that the SQL Queries below.

1. Customer

Figure 35 Add validation for the Customer Table


By using this CHECK constraint can restrict the which data can be inserted into the specific
column. Here, ‘C-01’,’C-02’ and ’C-03’ data only can add to the Cus_type column in the
Customer table.

2. Product

Figure 36 Add validation for the Product Table

Here also the ‘High_Risk’, ’Risk’ and ‘Low_Risk’ data only can add into Pro_type column
in Product table through using this Check validation method.

3. Job

Figure 37 Add validation for the Job Table

4. Load

Figure 38 Add validation for the Load Table

K. Sathurcigan Unit 04 Database design and development 36


5. Payment

Figure 39 Add validation for the Payment Table

Here the ‘Cash’, ’Visa Card’ and ‘Master Card’ data only can add into Pay_type column in
Payment table through using this Check validation method.

6. Employee

Figure 40 Add validation for the Employee Table

Here the ‘Driver’ and ‘Assistant’ data only can add into Emp_type column in Employee table
through using this Check validation method.

7. Lorry

Figure 41 Add validation for the Lorry Table

Here the ‘Small’, ‘Medium’ and ‘Large’ data only can add into Lorry_type column in Lorry
table through using this Check validation method.

8. Container

Figure 42 Add validation for the Container Table

Here the ‘Small’, ‘Medium’ and ‘Large’ data only can add into Con_type column in Container
table through using this Check validation method.

K. Sathurcigan Unit 04 Database design and development 37


9. Trailer

Figure 43 Add validation for the Trailer Table

Here the ‘Small’, ‘Medium’ and ‘Large’ data only can add into Tr_type column in Trailer
table through using this Check validation method.

10. Transport Unit

Figure 44 Add validation for the Transport Unit Table

11. Depot

Figure 45 Add validation for the Depot Table

The advantages of the CHECK Constraint method using specific examples are explained
above. Below are how other validation methods were used to create the database.

Figure 46 Validation methods explanation


Here the several types of validation methods were used and which is point out in the above
picture. For this proper explanation is given below.

K. Sathurcigan Unit 04 Database design and development 38


• Data type constraint – To make restriction on data type when inserting a data. Here INT
is pointing out as an example for this, so when inserting data in Pro_id column which
should be numerical.
• Data length validation – For make restriction on data’ count (characters). This is seen
as a limitation for when entering a data on a specific column.
• Primary Key – This validation method makes the column data unique.
• Foreign Key – This is seen as a bridge between two tables, through this can represent
their table.
• Not Null – By using this verification method you can avoid adding data to the table
without entering the data in the specified column.

2.1.4 Join query for showing the Payment details with Customer and Job details

When the user sees the payment details, who need to understand the whole related activity in
the same view. For this reason, this join query was used here. The evidence for this given
below.

Figure 47 Progress of Join query

This statement is used to getting a summary from the more data. Through this can reduce the
time for searching the data one by one.

K. Sathurcigan Unit 04 Database design and development 39


2.2 Explanations for the usage of the DML with an example for per cases
from developed Database
1. Select
The select statement is used to getting a collection of data from the mentioned table on the
query.

The example of using this SELECT statement in SmartMovers database is given below.

Figure 48 Usage of SELECT Statement

2. Update
The UPDATE Statement Works in the table based on the specific data value, because the
system can’t identify the data without any specific instructions. For this purpose, the WHERE
statement used here to identify the specific data set. Through this UPDATE statement can edit
the already stored data in the database.

K. Sathurcigan Unit 04 Database design and development 40


The example of using this Update statement in SmartMovers database is given below.

Figure 49 Before Update

Figure 50 On Update works

After the update, the output is shown below picture.

K. Sathurcigan Unit 04 Database design and development 41


Figure 51 After Update

Can understand how the UPDATE statement will work on stored data from above 3 pictures.
The data transform is shown on the above pictures.

3. Delete
DELETE statement is used to delete the stored data from the database. This statement also
works like UPDATE statement which means this condition need to work then the WHERE
condition need to combine with this statement for identifying the specific data.

The DELETE statements work in SmartMovers’ database is shown on the below picture.

Figure 52 On DELETE working

K. Sathurcigan Unit 04 Database design and development 42


Figure 53 Before Delete

Figure 54 After Delete

The Cus_id value as 1 row was deleted by the DELETE statement which detail is the shown
on the above picture.

K. Sathurcigan Unit 04 Database design and development 43


2.3 Explanation for the Security mechanism how used in a database to secure
the data

2.3.1 Details of the Security Mechanism

SQL has some security features to protect the data and provide the privileges to a specific
person to access the data. This feature is already inbuilt into the system. I.e. the security ability
based on created character, that character can access some data based the administrator
provided privileges. This character will be created by the administrator same like these other
users can be created by the admin and their access privileges will be provided by him. Finally,
the users are all together as a group. But the access ability will change between the users within
the group.

The Data Control Language (DCL) is used to control the privileges for access in the database.
For creating a table, views or sequences, the DCL used and by this, the privilege can provide
to the user to perform any operation in the database.

The DCL has two types of commands, those are Grant and Revoke.

Figure 55 DCL Type

1. Grant - This provides the privilege to the user to access the database objects.

2. Revoke - This gets back or cancels the already defined privileges, i.e. can allow or deny.

K. Sathurcigan Unit 04 Database design and development 44


Database security is most important because the customers' data need to be secure. This is one
of the rules to run the Company. This makes an impact on the customers' trust in the company.
Like this kind of security setups make the trust in the company, i.e. the third person can't get
the customers' data without their knowledge. And this security setup makes the restrictions for
access the customers' data, by this can trust with that company.

The two types of privileges can be granted or revoked.


• System - This includes the privileges of the create table, sessions, etc. and other system
privileges.

• Object - The permissions for operating queries, commands and other operations on the
database tables were included here.

Database Security Controls


Table 10 Database Security systems

System hardening and The underlying architecture provides additional access to


monitoring the DBMS. This is vital that all systems are patched
consistently, hardened using known security configuration
standards, and monitored for access, including insider
threats.
DBMS configuration This is critical that the DBMS be properly configured and
hardened to take advantage of security features and limit
privileged access that may cause a misconfiguration of
expected security settings. Monitoring the DBMS
configuration and ensuring proper change control
processes helps ensure that the configuration stays
consistent.
Authentication Database security measures include authentication, the
process of verifying if a user’s credentials match those
stored in your database, and permitting only authenticated
users’ access to your data, networks, and database platform.

K. Sathurcigan Unit 04 Database design and development 45


Access A primary outcome of database security is the effective
limitation of access to your data. Access controls
authenticate legitimate users and applications, limiting
what they can access in your database. Access includes
designing and granting appropriate user attributes and roles
and limiting administrative privileges.
Database auditing Monitoring (or auditing) actions as part of a database
security protocol deliver centralized oversight of your
database. Auditing helps to detect, deter, and reduce the
overall impact of unauthorized access to your DBMS.
Backups A data backup, as part of your database security protocol,
makes a copy of your data and stores which on a separate
system. This backup allows you to recover lost data that
may result from hardware failures, data corruption, theft,
hacking, or natural disasters.
Encryption Database security can include the secure management of
encryption keys, protection of the encryption system,
management of a secure, off-site encryption backup, and
access restriction protocols.
Application security Database and application security framework measures can
help protect against commonly known attacker exploits that
can circumvent access controls, including SQL injection.
(security, 2020 )

K. Sathurcigan Unit 04 Database design and development 46


2.3.2 Implementation of the Security Mechanism

Figure 56 Create a Role and User in Database

According to this picture can understand the security was how is enabled in the database.

The first step is creating the Administrator Role, then one user was created. The user and
administrator were joining together by using the stored procedure sp_addrolemember at the
end.

The table was allocated based on users’ privileges, to them.

Figure 57 If privileges are given

K. Sathurcigan Unit 04 Database design and development 47


The above picture shows the details of how to give a privilege to the specific person for a
specific database. Here, the Administrator can access the tesTable but can’t access the
testTable2. When trying to access the testable which allow to him.

Figure 58 If didn't privilege given

When the Administrator tries to access the testTable2 which denied his access. This detail
shows on the above picture.

Login Restriction
The login processes make restriction access un-authorized persons interfere into the database.
Which means if the management gives access to the specific person who only knows his
password to enter into the database. Through this restriction, others can’t access his account.
This detail shows on below picture.

K. Sathurcigan Unit 04 Database design and development 48


Figure 59 Access denied

Figure 60 Access confirmed

Who has access to privilege people only can access the database. These details show on the
above picture.

K. Sathurcigan Unit 04 Database design and development 49


2.4 Explanation for the SQL Statements with their Examples
1. GROUP BY -
This GROUP BY statement is used to getting summary from more table to as show as one
table. For example, find the number of customers in each branch.

The GROUP BY statement is often used with aggregate functions (COUNT, MAX, MIN,
SUM, AVG) to group the result-set by one or more columns. (w3schools.com, 2020)

This GROUP BY statement can be used to find how many customers are in each Cus_type,
in the SmartMovers database.

Figure 61 without Group by

K. Sathurcigan Unit 04 Database design and development 50


Figure 62 GROUP BY Statement

The above picture shows the GROUP BY statement used output result. Here, the customer
table grouped based the Cus_id < 4. For this condition, there is only one data eligible for this
condition in the customer table of the SmartMovers database.

2. ORDER BY -
This ORDER BY statement is used to sort the data within the table. Some database has the
sorting ability as ascending order by default.

This statement can be used in SmartMovers company database, the customer data should
be the sort to descending is show on below which is based on ORDER BY the Cus_id.

K. Sathurcigan Unit 04 Database design and development 51


Figure 63 Example for ORDER BY

3. HAVING -
This statement works like the WHERE statement, at the same time which is effective on
the data in the column itself, and in the GROUP BY statement used table the ORDER BY
statement is useful.

For instance, if SmartMovers choose to furnish a proposal to the classification with a


minimal number of customers, can utilize the HAVING provision in a query to distinguish
which class has the sum short of what those want.

K. Sathurcigan Unit 04 Database design and development 52


Figure 64 Customer Table

The following picture shows the number of customers’ Cus_id less than 4.

Figure 65 Example of HAVING

K. Sathurcigan Unit 04 Database design and development 53


4. BETWEEN –
BETWEEN statement is used to get data suite within varies. I.e. the starting value and the
end value will provide by the developer then which data can be fit for the limitation that
will retrieve as output.

The example of using this statement in the SmartMovers database is given below.

Figure 66 Example for BETWEEN statements

K. Sathurcigan Unit 04 Database design and development 54


5. WHERE -
WHERE statement is used in more area of database development. This is the keyword to
find specific data.

This command will help to finish the other activities like SELECT, UPDATE and DELETE
through the point out the specific data. Usually, this where the condition will be executed
with the primary key value.

This condition can be used in SmartMovers database for finding specific data through
their primary key value.

Figure 67 Example for WHERE Statements

K. Sathurcigan Unit 04 Database design and development 55


Activity 03

3.1 Test case for check the system


Table 11 Test Case

Test
Test case name Process Expected Outcome
no
Enter the Username and
The message box shows
Password
1 Check the Login function “Login successful” and
Ex - Username: Administrator
goes to the Main menu.
Password: Admin123@
Check the Main menu Just click one of the names of
2 The specific form will show.
button click functions the form

The message box shows


Enter the customer details in
Check insert data “Insert successful” and
3 the text box and click the
function show the inserted data on
insert button.
the grid view.
Enter the insert customer The message box shows
Check update data details to text box and “Update successful” and
4
function changes the details and click show the updated data on
update button. the grid view.
The message box shows
Enter the insert information to
Check to delete data “Delete successfully” and
5 textbox and click the delete
function show without deleted data
button.
on the grid view.
Customer information is
Enter the Null-value in the wrong. An error message
6 Check
customer information should appear near the
message box.
Check login function Enter the user name password Moved to the selection
7
work properly and click the login button. form
Login information is
Checking login Enter the wrong user name
8 wrong. Enter the correct
information validation password.
user name password

K. Sathurcigan Unit 04 Database design and development 56


3.1.1 Test Cases Related with Implemented Database Activities

Table 12 Test case with examples

Test Results
Input data Output Actual result
case (Pass/Fail)

Enter the
Username &
Display the
Password
main menu
form after
Username:
1 shown the Pass
Administrator
Login
,
successfully
message.
Password:
Admin123@

Click the Customer


2 Customer form will Pass
button open

K. Sathurcigan Unit 04 Database design and development 57


Click the
Insert button
Id – 8,
The data
Name – vijay,
will add into
Address –
the database
3 kulavadi, Pass
and which
Customer show on
type – C- 01, grid view.
Customer
phone no –
0789.

The data
Click the
will be
Update button
edited and
4 Customer Pass
which show
type – C – 01
on grid
to C - 02
view.

Click the The data


delete button will remove
5 Pass
by using the from the
id (id = 6) database.

K. Sathurcigan Unit 04 Database design and development 58


The system
Click the will show a
6 Pass
Insert button warning
message.

7 Click the An error


& Login button message Pass
8 Without data will show.

K. Sathurcigan Unit 04 Database design and development 59


3.2 Suggest by Explaining about the selected test data on how to improve the
effectiveness of testing.
Test case 01:
Through test case 01, can control unknown persons interfere with the system. Because the
registered user only has the username and password for login into the system. So, the login
form is one kind of security feature.

Test case 02:


Through this test case 02, can find is the menu function work. By this, can make the perfect
system without errors.

Test case 03:


Through this test case 03, can check is the insert function working correctly. If there any
problems on that, can reduce the errors through this.

Test case 04:


Through this test case 04, can check is the update function working correctly. If there any
problems on that, can reduce the errors through this.

Test case 05:


Through this test case 05, can check is the delete function working correctly. If there any
problems on that, can reduce the errors through this.

Test case 06:


Through this test case 06, can check is the insert function working correctly. I.e. if the customer
misses any data to fill, the insert function won’t work and that need to indicate to the user.
Through this can check this function is work correctly.

Test case 07 & 08:


This is one of the validation methods. Because, through this, can block or limit the unknown
persons disturbs.

K. Sathurcigan Unit 04 Database design and development 60


3.3 Get Feedback for the developed database connected to System

Figure 68 Feedback Form

The feedback gathering is most important in the software sector. That’s why this feedback form
issued to the same software sector people to get them advises to can update the developed
SmartMover Management system. The responses of their, for this feedback form, is given
below.

K. Sathurcigan Unit 04 Database design and development 61


Figure 69 Response

According to this response, can understand the weak part in the system of the SmartMovers.
When developed a system, every developer gets feedback for their developed systems for
checking the accuracy of the system.

K. Sathurcigan Unit 04 Database design and development 62


Activity 04

4.1 User’ guide for maintaining the software

K. Sathurcigan Unit 04 Database design and development 63


Table of Contents
Introduction .............................................................................................................................. 65

System Requirements............................................................................................................... 66

Suggestions of software requirements for the server ........................................................... 66

Suggestions of hardware requirements for the server .......................................................... 66

Suggestions of Hard ware and Software requirements for Client PCs ................................ 66

Default Pass Keys ................................................................................................................ 67

Installation Steps .................................................................................................................. 67

The Application Overview ................................................................................................... 68

Functionalities of the system................................................................................................ 82

Insert the data ................................................................................................................... 83

Update the data................................................................................................................. 84

Delete the data .................................................................................................................. 85

Logout .................................................................................................................................. 85

Validations ........................................................................................................................... 86

K. Sathurcigan Unit 04 Database design and development 64


Introduction
This document will help to do the activities through this Application. And details of how to
handle this application are given below and can follow that instruction, can manage the whole
system very easy and secure.

So, follow these instructions. Thank you.

K. Sathurcigan Unit 04 Database design and development 65


System Requirements
Suggestions of software requirements for the server

• Windows Server 2019


• Microsoft SQL Server 2019 Express (.NET Framework 4.6.1)
• SQL Server Management Studio (SSMS) 18.6
• Micro Soft Office 2019

Suggestions for hardware requirements for the server


• RAM - 8GB
• Processor - Intel Core i7 (Processor speed - x64 Processor: 2.4 GHz)
• Hard drive - 2TB
• VGA - NVIDIA GeForce 4GB

Suggestions for Hardware and Software requirements for Client PCs

Software requirements Hardware requirements


RAM - 8GB, Windows 10 64 bit,
Processor - Intel Core i5 (Processor speed - x64 Windows Server 2019,
Processor: 2.4 GHz), .NET Framework 4.6.1,
Hard drive - 512TB, SQL Server Management Studio (SSMS) 18.6,
VGA - NVIDIA GeForce 2GB Micro Soft Office 2019

K. Sathurcigan Unit 04 Database design and development 66


Default Pass-Keys
Username – Administrator
Password – Admin123@
After login can change your password and Username also.

Installation Steps
Step 1 – Open the SmartMovers Management Information System (SMMIS.exe)

Step 2 – Before start, the installation has changed your account into Administrator.

Then follow the setups show on the images.

K. Sathurcigan Unit 04 Database design and development 67


The Application Overview

K. Sathurcigan Unit 04 Database design and development 68


This is the Login form to entry into the SmartMovers Management Information System
(SMMIS). For this, the user needs to prove his identity for this purpose the login form usually
used in the systems.

Here the number 1 indicates the username requirement, on this text box the user needs to enter
his username. Through this, who has the privileges for access the application they only can
enter into the application.

Number 2 indicates the password requirement, once the user was registered into the system
he can get the password for his accessibility.

After entering the required details can sign in through pressing the Sign-in button which was
indicated by the number 3.

The number 4 indicates the ‘create a new account’ to give access for the new user through
this can enter into the registration form.

This is the main form for entering the other form through pressing these buttons.
Button functionalities are given below.

K. Sathurcigan Unit 04 Database design and development 69


Button 1 Through the press, this button can enter into the Lorry form.
Button 2 Through the press, this button can enter into the Container form.
Button 3 Through the press, this button can enter into the Trailer form.
Button 4 Through the press, this button can enter into the Job form.
Button 5 Through the press, this button can enter into the Load form.
Through the press, this button can enter into the Login form by logging out their
Button 6
account.
Button 7 Through the press, this button can enter into the Customer form.
Button 8 Through the press, this button can enter into the Product form.
Button 9 Through the press, this button can enter into the Payment form.
Button 10 Through the press, this button can enter into the Depot form.
Button 11 Through the press, this button can enter into the Transport Unit form.
Button 12 Through the press, this button can enter into the Employee form.

For these indicated properties functionalities are given below as table format.

K. Sathurcigan Unit 04 Database design and development 70


Text box 1 Have to enter the Customer id here.
Text box 2 Have to enter the Customer name here.
Text box 3 Have to enter the Customer address here.
Text box 4 Have to enter the Customer type here.
Text box 5 Have to enter the Customer phone no here.
Text box 6 Have to enter the Customer password for access his account here.
Text box 7 Have to enter the Customer again correctly here (same like above).

The common properties (for all forms) functionalities are given below.

Number 8 After entering the Customer id, through the press this button can get
customer details into the text boxes.
Number 9 After fill, this form, through pressing this button can insert the entered data
into the database.
Number 10 After found the customer details, through pressing this button can edit the
selected data.
Number 11 After found the customer details, through pressing this button can delete
the selected data.
Number 12 This label is used to identify selected data’ id.
Number 13 Through pressing this button, can go to the menu form.
Number 14 Through pressing this button, can go to the previous form.
Number 15 This grid view is used to show a specific table.

K. Sathurcigan Unit 04 Database design and development 71


The functionalities of the properties are given below.
Text box 1 Have to add the product id here
Text box 2 Have to add the product name here
Text box 3 Have to add the product type here
Text box 4 Have to add the product weight here
Text box 5 Have to add the customer id here

K. Sathurcigan Unit 04 Database design and development 72


Text box 1 Have to add the job id here.
Text box 2 Have to select the customer name here.
Text box 3 Have to select the product name here.
Text box 4 Have to select the transport unit name here.
Text box 5 Have to add the starting location of the job here.
Text box 6 Have to add the ending location of the job here.
Text box 7 Have to add the start date of the job here.
Text box 8 Have to add the end date of the job here.

K. Sathurcigan Unit 04 Database design and development 73


Text box 1 Have to select the load id here.
Text box 2 Have to select the Product name here.
Text box 3 Have to select the Transport unit name here.
Text box 4 Have to select the Load type here.

K. Sathurcigan Unit 04 Database design and development 74


Text box 1 Have to select the employee id here.
Text box 2 Have to add the employee name here.
Text box 3 Have to add the employee address here.
Text box 4 Have to add the employee type here.
Text box 5 Have to add the employee phone no here.

K. Sathurcigan Unit 04 Database design and development 75


Text box 1 Have to select the product id here.
Text box 2 Have to select the customer name here.
Text box 3 Have to select the product id here.
Text box 4 Have to select the Job id here.
Text box 5 Have to select the payment type here.
Text box 6 Have to add the payment amount here.
Text box 7 Have to add the payment date here.

K. Sathurcigan Unit 04 Database design and development 76


Text box 1 Have to select the Depot id here.
Text box 2 Have to enter the branch name here.
Text box 3 Have to enter the Depot location here.
Text box 4 Have to enter the Depot phone no here.
Text box 5 Have to select the transport unit here.

K. Sathurcigan Unit 04 Database design and development 77


Text box 1 Have to select the Transport unit id here.
Text box 2 Have to enter the Transport unit name here.
Text box 3 Have to select the driver name here.
Text box 4 Have to select the assistant name here.
Text box 5 Have to select the lorry id here.

K. Sathurcigan Unit 04 Database design and development 78


Text box 1 Have to select the Lorry id here.
Text box 2 Have to select the lorry type here. (small/medium/large)
Text box 3 Have to select the lorry license no here.
Text box 4 Have to select the container type here.
Text box 5 Have to select the lorry type here.

K. Sathurcigan Unit 04 Database design and development 79


Text box 1 Have to select the container id here.
Text box 2 Have to select the container type here. (small, medium, large)

K. Sathurcigan Unit 04 Database design and development 80


Text box 1 Have to select the trailer id here.
Text box 2 Have to select the trailer type here. (small, medium, large)

These are the forms for manage the whole system through the data storing and control them.

K. Sathurcigan Unit 04 Database design and development 81


Functionalities of the system
• Insert
• Update
• Delete
• View

When running this application first need to log in with your Username and Password these
details are shown on the below picture.

Likewise, the Username and Password should correct the can enter into the main menu
otherwise the user will see the error message.

K. Sathurcigan Unit 04 Database design and development 82


If the username and Password were correct the can access the main menu options.

Through this main menu can enter the whole system form. Because each form linked into
this menu form.

Insert the data

First need fills the form after that insert data into the database. Everything is ok then, you
can see data saved successfully message. If you missed any empty spaces you will receive
an error message.

K. Sathurcigan Unit 04 Database design and development 83


Update the data

The customer details can be view through the find button option. After selecting the
customer’ id, just press the find button. The specific customer’ detail can be load into the
text boxes. After that can edit the customer details.

K. Sathurcigan Unit 04 Database design and development 84


Delete the data

If you want to remove any customer’ data from the database, same like update option, first
find the customer data by using his id. After that can delete the customer details by press the
delete button.

Logout
After the management activities, the user has to logout his account properly. The logout option
was built on the main menu.

Through this can protect the account from others.

K. Sathurcigan Unit 04 Database design and development 85


Validations
Some of the forms have some restriction which means the required data already defined by
the developer based on the customer needs.

In customer form, customer type was already defined. That can be ‘C - 01’ or ‘C - 02’ or
‘C - 03’. Through this kind of restrictions, can avoid unnecessary data inserting.

Thank you, Using this Application.


**********************************

K. Sathurcigan Unit 04 Database design and development 86


4.2 Technical document for SmartMovers Company Management Software

K. Sathurcigan Unit 04 Database design and development 87


Table of Content
Flow chart for the SmartMovers Management Application .................................................... 89

UML Diagram (Unified Modeling Language) ........................................................................ 90

K. Sathurcigan Unit 04 Database design and development 88


Flow chart for the SmartMovers Management Application

According to this flow chart, the application starting page (Login page) was designed.
Normally, before creating a software this flow chart will be designed by the developer. After,
the software can be implemented through that.

K. Sathurcigan Unit 04 Database design and development 89


UML Diagram (Unified Modeling Language)

Figure 70 UML Diagram

According to this UML diagram, can understand when the customer registration, Payment
method changing and retrieving the Job details, how the system will work. The validations are
mostly taking part in this application.

K. Sathurcigan Unit 04 Database design and development 90


4.3 Suggestion for the future improvements of the database system for
maintaining database effectively
This software' main purpose is storing the data and secure that. But this has some troubles
because data handling is very important and need protection. So, this works needs to secure
and very confidential. For this purpose, the database should be maintained carefully.

For these reasons, the database security features should be continually changed. And the
administrator has the responsibility to maintain the data and this software is mostly used by
him.

Some features need to add to this software in coming days to increase the efficiency. Those
follow.

• Now, this software developed as work as only for the PCs. So, this needs to update as can
work in the smartphones and other smart devices. Through this, can manage the system in
anywhere.

• Now the data were stored in local server, if any disasters or any crashes will happen, the
stored data may be lost. For this reason, the data need to be stored in clouds as a backup.
Through this, the company feel the data were stored safely. This makes the confidence in
the data.

• In this system, were designed as the data are retrieving based on their id (unique). But in
future, specifically, the employee data of the SmartMovers Company can be retrieved by
using their figure print when wanted.

These are some future upgradable suggestions for SmartMovers Company Management
software.

K. Sathurcigan Unit 04 Database design and development 91


Conclusion
The SmartMovers Company going to switch their system manual to Automatic. For these, as a
database developer, need to create a perfect database for their system based on their User
requirements. After gathering User requirements, the ER Diagram was prepared based on user
requirements. Then the logical schema was designed from the ER diagram. But the database
mainly based on the logical schema, because the logical schema shows the relationships
between the entities. Through this can identify the connections between the entities can manage
the whole system very easy. Because each entity has one of the tables in SmartMovers company
database, for the store there the specific details about the entity. So, the company manage every
data through this database structure. According to this features the database was designed and
after which was connected to the graphical user interface. Through this, the company
employees and others can do their activity.

So, this is a good opportunity to understand the SQL queries. Because the several types of SQL
Queries used to implement this database. Through this, can get more knowledge in database
subject.

K. Sathurcigan Unit 04 Database design and development 92


Self-Criticism
This subject focuses to improve the database skill. As well as which subject has more important
steps of the database.

Advantages of the database subject


• Can get more knowledge about the SQL Queries.
• Can develop a database without any errors.
• This is a good opportunity to understand the User needs and can give the solution for
that.

Through this subject, can understandable the SQL Queries and the DFD Diagram, ER Diagram
and Use case Diagram. And also get knowledge about the Logical Schema.

K. Sathurcigan Unit 04 Database design and development 93


Gantt chart

Figure 71 Gantt chart

K. Sathurcigan Unit 04 Database design and development 94


References

Normalization, D., 2020. Database Normalization. [Online]

Available at: https://www.w3schools.in/dbms/database-normalization/

[Accessed 17 August 2020].

security, D., 2020 . Database security. [Online]

Available at: https://looker.com/definitions/database-

security#:~:text=Database%20security%20can%20include%20the,backup%2C%20and%20

access%20restriction%20protocols.

[Accessed 15 August 2020].

verification, D. v. a., 2020 . Data validation and verification. [Online]

Available at: https://www.bbc.co.uk/bitesize/guides/zdvrd2p/revision/1

[Accessed 15 August 2020].

w3schools.com, 1999-2020 . w3schools.com. [Online]

Available at: https://www.w3schools.com/sql/sql_groupby.asp

[Accessed 19 August 2020].

K. Sathurcigan Unit 04 Database design and development 95

You might also like