Database Design and Development Assignment
Database Design and Development Assignment
Assessor Internal
Verifier
Unit 04: Database Design & Development
Unit(s)
Data base system for the SmartMovers Transport Company
Assignment title
A G Dinithi Nimesha Ranathunga
Student’s name
List which assessment criteria Pass Merit Distinction
the Assessor has awarded.
Internal Verifier
Assessor signature
signature Date
Date
Programme Leader signature (if required)
Internal Verifier Date
Date
signature
Programme Leader
Date
signature (if required)
1
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
grades decisions have been agreed at the assessment board.
Assignment Feedback
Formative Feedback: Assessor to Student
2
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Action Plan
Summative feedback
Assessor Date
signature
Student Date
signature
3
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Pearson Higher Nationals in
Computing
Unit 04: Database Design & Development
Assignment 01
General Guidelines
1. A Cover page or title page – You should always attach a title page to your assignment. Use
previous page as your cover sheet and make sure all the details are accurately filled.
2. Attach this brief as the first section of your assignment.
4
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
3. All the assignments should be prepared using a word processing software.
4. All the assignments should be printed on A4 sized papers. Use single side printing.
5. Allow 1” for top, bottom , right margins and 1.25” for the left margin of each page.
1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Use 1.5 line spacing. Left justify all paragraphs.
3. Ensure that all the headings are consistent in terms of the font size and font style.
4. Use footer function in the word processor to insert Your Name, Subject, Assignment No,
and Page Number on each page. This is useful if individual sheets become detached for any
reason.
5. Use word processing application spell check and grammar check function to help editing
your assignment.
Important Points:
1. It is strictly prohibited to use textboxes to add texts in the assignments, except for the
compulsory information. eg: Figures, tables of comparison etc. Adding text boxes in the body
except for the before mentioned compulsory information will result in rejection of your
work.
2. Carefully check the hand in date and the instructions given in the assignment. Late
submissions will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
6. If you are unable to hand in your assignment on time and have valid reasons such as illness,
you may apply (in writing) for an extension.
7. Failure to achieve at least PASS criteria will result in a REFERRAL grade .
8. Non-submission of work without valid reasons will lead to an automatic RE FERRAL. You will
then be asked to complete an alternative assignment.
9. If you use other people’s work or ideas in your assignment, reference them properly using
HARVARD referencing system to avoid plagiarism. You have to provide both in-text citation
and a reference list.
10. If you are proven to be guilty of plagiarism or any academic misconduct, your grade could be
reduced to A REFERRAL or at worst you could be expelled from the course
Student Declaration
5
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
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.
4. I declare therefore that all work presented by me for every aspect of my program, will be my
own, and where I have made use of another’s work, I will attribute the source in the correct
way.
5. I acknowledge that the attachment of this document signed or not, constitutes a binding
agreement between myself and Pearson, UK.
6. I understand that my assignment will not be considered as submitted if this document is not
attached to the assignment.
[email protected]
Student’s Signature: Date: 14-05-2021
(Provide E-mail ID) (Provide Submission Date)
6
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Student Name /ID Number
A G Dinithi Nimesha Ranathunga 009183
Unit Tutor
MR. H N B Herath
Issue Date
Submission format
Part 1: The submission should be in the form of an individual written report written in a
concise, formal business style using single spacing and font size 12. You are required to
make use of headings, paragraphs and subsections as appropriate, and all work must be
supported with research and referenced using Harvard referencing system. Please also
provide in-text citation and bibliography using Harvard referencing system. The
recommended word limit is 3,000–3,500 words, although you will not be penalised for
exceeding the total word limit.
Part 2: The submission should be in the form of a fully functional relational database
system demonstrated to the Tutor; and an individual written report (please see details in
Part 1 above).
Part 3: The submission should be in the form of a witness statement of the testing
completed by the Tutor; technical documentation; and a written report (please see
details in Part 1 above).
Unit Learning Outcomes:
LO1 Use an appropriate design tool to design a relational database system for a
substantial problem.
LO2 Develop a fully functional relational database system, based on an existing system
design.
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.
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.
8
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
9
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Activity 1
1) Design and produce a comprehensive database design document for the above
scenario and it should cover the below mentioned points.
Activity 2
• Implement the database according to the provided ER diagram and use DDL
statements.
• Implement join queries display the details payment with the job details and the
customer details
• Explain and implement the below mentioned SQL statements from the developed
database by giving meaningful examples.
10
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Activity 3
3) Test the developed database system which has created in the Activity 2.
• Create a test plan to test the system against user and system requirements.
• Create test cases to test the developed database.
• Explain and access how the selected test data can be used improve the
effectiveness of testing.
• Get independent feedback and evaluate the effectiveness on the developed
database solution from the non-technical users and some developers.
Activity 4
11
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Grading Criteria Achieved Feedback
12
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
system
13
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
D3 Assess any future improvements that may be required
to ensure the continued effectiveness of the database
system.
Table of Contents
List of figures………………………………………………………………………………………..
………………………………………19
Task 01……………………………………………………………………………………………………………………………….20
1.1 Database ……………………………………………………………………………………………………………………..20
14
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
1.2 Comparison between manual & electronic database …………………………………………………..21
1.3 Advantages & disadvantages of using electronic database …………………………………………..21
1.4 What is a Database Management System (DBMS)? ………………………………………………..22
1.5 Types of requirement………………………….………………………….
……………………………………….23
1.5.1 User Requirements ………………………….………………………….……………………………
23
1.5.2 System requirements ………………………….……………………………………………………
24
1.6 Identifying key fields ………………………….………………………….
………………………………………..25
1.7 What is normalization? ………………………….………………………….
…………………………………….27
1.8 Entities ………………………….………………………….………………………….………………………………………31
1.9 Attributes ………………………….………………………….………………………….………………………………….31
1.10 Primary keys ………………………….………………………….………………………………………………….31
2.1 Interfaces to input and output data ………………………….………………………….………………………33
2.2 SQL DDL statements ………………………….………………………….…………………………………………
37
3.1 Validation mechanism ………………………….………………………….
……………………………………..42
3.1.2 Validation methods ………………………….………………………….……………………………………………42
3.2 Join query ………………………….………………………….………………………….
…………………………….44
3.3 Test plan ………………………….………………………….………………………….……………………………………44
3.3.1 Levels of testing ………………………….………………………….
………………………………………………….45
15
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
4.1 User manual ………………………….………………………….
…………………………………………………….48
4.2 UML ………………………….………………………….………………………….…………………………………….49
4.2.1 Use case diagram ………………………….………………………….
………………………………………….49
4.2.2 Flow charts ………………………….………………………….………………………….…………………………….51
List of figures
17
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Data - Raw fact or unorganized form. (Such as alphabets, numbers or symbols)
Information- Knowledge, Intelligence, a particular piece of data with a special meaning of
a function.
DATABASE
Manual Electronic
database database
Manual Database
A manual database is a hard-file storage system that consists of paper records, folder and
filling cabinets or storage boxes.
(Staff, W.2020)
Electronic Database
An electronic database is, any collection of data or information, that is specially organized for
rapid search, update, delete and retrieve by computer.
1.2 Comparison between manual & electronic databaseX
18
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Manual Database Electronic database
- limited storage space available - can store very large amount of data
- difficult to access - allow easy input and editing of data
- very difficult to share - sharing is very easy
- allow centralized use of information
- extra cost of storing multiple copies amongst many users over a network
- worse when new items are frequently
being inserted or deleted - improved backup and recovery services
- less data security - data security is very high
- data inconsistency - data consistency
Table 1: Manual database and electronic database comparison
Source: author developed
Uses of database
Store large number of records
Read and modify data
Atomicity
Secured data collection
19
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Components of database system
- Hardware
- Software
1. DMBS
2. Application software
- People
1. Users
2. Practitioners
- data
What is a requirement?
Requirements convey the expectations of users from the software. The requirements can be
known or unknown, obvious or hidden, expected or unexpected from client’s point of view.
20
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Requirments
User System
Requirements Requirments
Software
Specification
Hardware
specification
In a database system, identifying user requirements are the main task. According to the above
scenario of smart movers, there are can be identified a lot of user requirements.
i. Finding customer details
ii. Daily reports should be created
iii. Generating daily cash flow
iv. Preparing employee’s salary sheets
v. Managing transportation details
vi. Finding details about daily loads and daily jobs
vii. Generating month end reports
viii. Generating daily payment reports
ix. Find available driver details.
x. Getting security alert details
xi. Store records for future needs
21
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
In the above scenario all these user requirements should be fulfilled for future usage to take
best decisions, improve customer service and improve software effectiveness.
User requirements can be defined using natural language, charts, tables and diagrams.
The system requirements define what software programs or hardware devices should require
to operate the program.
- Software requirement
Gathering software requirement is a main task of a software development process. In
the given scenario following are some of software requirements.
Functional Requirements
i. Searching requested details
ii. Printing requested invoices
iii. Comply administrative functions
Non-functional requirements
i. Security
ii. Storage
iii. Logging
iv. Performance
v. Cost
vi. Accessibility
vii. Maintenance
viii. Disaster recovery
Windows operating system is a good OS for run a database system.
According to above scenario above software requirements should be considered.
There are four types of requirements which are categorized logically as,
22
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Figure 3: software requirements categorized by logically
Source: lecture presentation
- Hardware requirement
To run a database system very efficiently there are should be very good hardware
devices.
i. There should be much hard disk space
ii. To run the system fast can be used a SSD
iii. A RAM which can handle database process
iv. A processor which can handle a database.
1. Super key
A super key is a loop of single or multiple keys which identifies row in a table. A
super key may have additional attributes which are not needed for identification.
23
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
2. Candidate key
Candidate key is a set of attributes that uniquely identify tuples in a table. It is a super
key with no repeated attributes. The primary key should be selected from the
candidate keys. Every table must have at least a single candidate key.
3. Primary key
Primary key is the attribute or set of attributes which uniquely identify every tuple in
the table. The values of the primary key cannot be repeated. The table cannot have
more than one primary key.
4. Alternate key
A table can have multiple choices for a primary key but only one can be set as the
primary key. All the keys which are not set as primary key are known as alternate
keys.
5. Composite key
Composite key is a combination of two or more attributes which uniquely identify
rows in a table.
6. Foreign key
Foreign key is an attribute that create a relationship between two tables. It acts as a
cross reference between two tables and a foreign key always references the primary
key of another table.
Source: (Lecture notes, 03rd January 2021)
24
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
1.7 What is normalization?
Normalization is a database design technique that reduces data redundancy and eliminates
undesirable characteristics like Insertion, Update and Deletion Anomalies. Normalization
rules divides larger tables into smaller tables and links them using relationships. The purpose
of Normalization in SQL is to eliminate redundant (repetitive) data and ensure data is stored
logically.
(guru99, 2021)
In 1NF each cell should contain a single value and each record needs to be unique.
25
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Student Table
Stu_I
Fname Lname Stu_contact1 Stu_contact2 dob
D
001 Kamal Perera 774635001 257880480 5-Jun-97
002 Nimal Silva 711825400 7548485001 5-Jun-98
003 Saman Bandara 662284418 725845875 25-Apr-96
Table 4: example for 2NF
Source: author developed
Course Table
crc00 Jehan
Rs. 150,000.00 6 months
1 Fernando
crc00 Jehan
Rs. 150,000.00 6 months
1 Fernando
crc00 Suesh
Rs. 200,000.00 10 months
2 Bandara
Table 4: example for 2NF
Source: author developed
26
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Student Table
Stu_I Stu_contact
Fname Lname Stu_contact2 dob crc_ID
D 1
5-Jun-
001 Kamal Perera 774635001 257880480 crc001
97
5-Jun-
002 Nimal Silva 711825400 7548485001 crc001
98
25-
003 Saman Bandara 662284418 725845875 crc002
Apr-96
Table 4: example for 3NF
Source: author developed
Course Table
crc00 Jehan
Rs. 150,000.00 6 months
1 Fernando
crc00 Jehan
Rs. 150,000.00 6 months
1 Fernando
crc00 Suesh
Rs. 200,000.00 10 months
2 Bandara
Table 4: example for 3NF
Source: author developed
27
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Assist_ID
Driver_ID
TUnit_ID
Container_ID
Lorry_No
Depot_na
Depot_ID
me
Depot_loc
Pay_ID
Figure 4: ER diagram
Source: author developed
28
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
1.8 Entities
1. Customer
2. Job
3. Payment
4. Product
5. Load
6. Depot
7. Transport unit
1.9 Attributes
1. Customer – (Cus_ID, Cus_lname, Cus_fname, Cus_address1, cus_address2,
Cus_contact , Cus_type)
2. Job – (Job_ID, Job_date, depot_ID, Cus_ID, start_loc, end_loc)
3. Payment – (Pay_ID, Load_type, Cus_type, product_type)
4. Product – (product_ID, product_type, product_name, product_qty)
5. Load – (Load_ID, Load_date, Load_type, product_ID)
6. Depot – (Depot_ID, Depot_name, Depot_loc)
7. Transport unit – (Driver_ID, assist_ID, Tunit_ID, container_ID, Lorry_no)
30
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Task 02
2.1 Interfaces to input and output data
31
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Figure 6: Job user interface
Source: author developed
32
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Figure 8: product user interface
Source: author developed
33
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Figure 10: Depot user interface
Source: author developed
34
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
2.2 SQL DDL statements
Creating Database
Creating tables
Customer Table
CREATE TABLE Customer(
Cus_ID varchar(5),
Fname varchar(50),
Lname varchar(50),
addressline1 varchar(50),
addressline2 varchar(50),
contactNo varchar(10),
cus_type varchar(10),
PRIMARY KEY (Cus_ID),
);
35
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Figure 12: SQL server DDL statement for customer table
Source: author developed
Job table
CREATE TABLE Job(
Job_ID varchar(5),
Job_date varchar(50),
Depot_ID varchar(5),
Cus_ID varchar(5),
start_location varchar(50),
end_location varchar(50),
Load_ID varchar(5),
PRIMARY KEY (Job_ID),
);
36
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Figure 13: SQL server DDL statement for Job table
Source: author developed
Payment Table
CREATE TABLE Payment(
Payment_ID varchar(5),
Load_type varchar(50),
Cus_ID varchar(5),
Product_type varchar(50),
Job_ID varchar(5),
PRIMARY KEY (Payment_ID),
);
Product table
CREATE TABLE Product(
Product_ID varchar(5),
37
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Product_type varchar(50),
Product_name varchar(50),
Product_qty varchar(50),
PRIMARY KEY (Product_ID),
);
Load table
CREATE TABLE Load(
Load_ID varchar(5),
Load_date varchar(50),
Load_type varchar(50),
Product_ID varchar(5),
PRIMARY KEY (Load_ID),
);
Depot table
CREATE TABLE Depot(
Depot_ID varchar(5),
Depot_name varchar(50),
Depot_location varchar(50),
Tunit_ID varchar(5),
PRIMARY KEY (Depot_ID),
);
39
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Figure 18: SQL server DDL statement for Transport unit table
Source: author developed
What is validation?
Validation is an automatic check to ensure that the data entered is sensible and feasible.
Validation cannot ensure data is actually accurate.
40
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
These are needed because it is easier to try and prevent users from entering garbage than
attempting to fix mistakes later.
A drop down box ensures the user can only choose a predefined option from a list, reducing
the chances of spelling mistakes or unwanted responses.
41
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Spelling mistakes would cause problems whilst performing searches on the data, with
some records being accidentally missed out of the results.
Allowing people to enter endless options for certain responses could make the data
unworkable in some situations.
Drop down boxes and lists are an easy way to help reduce these issues, but are obviously not
suited to all types of questions.
(Database Validation - Computer Science GCSE GURU, 2021)
According to above scenario, user can only choose a predefined option from a list, reducing
the chances of spelling mistakes or unwanted responses.
42
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Figure 21: Join query
Source: author developed
What is testing?
Testing is the process of evaluating a system or its component(s) with the intent to find
whether it satisfies the specified requirements or not. In simple words, testing is executing a
system in order to identify any gaps, errors, or missing requirements in contrary to the actual
requirements.
Test planning
The test plan defines the scope of the work to be performed. The test report documents what
occurred when the test scripts were run.
Tes t Cas e Input Data expected res ult Actual Res ult Tes t outcome
entering valid Us ername: Mes s agebox Dis played Pas s
us ername and Smovers "Login "Login
pas s word pas s word: Succes s full" Succes s full"
abc@123
Tes t Cas e Input Data expected res ult Actual Res ult Tes t outcome
entering deleta a Delete * from Mes s agebox Dis played Pas s
data in a row of cus tomer "Succes s fully "Are you s ure?"
a table deleted"
45
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Technical and user documentation
46
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
4.1 User manual
A user manual is a technical communication document intended to give assistance to people
on how to use a product. A good user manual assists users on how to use a product safely,
healthily and effectively. Author used simple language to describe manual because it helps
users to understand it. User manual includes all the details to use the system step by step.
1. If the system user have an account, they can access the system by entering username
and password correctly and clicking login. If it will invalid system shows a warning
message.
2. Main menu display all the tabs in the system. User can select the suitable one and by
clicking it user can access the next interface.
Ex. If user wants to edit customer details then user have to click Customer tab.
3. Each interface has INSERT, DELETE, UPDATE and SEARCH buttons. User can do
the actions about above options.
4. User can print receipts and labels by using print option of viewing each detail form
and accessing database.
5. User can logging out by the system using Log out button.
47
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
- Edit and view details
- Buy products and do transactions.
4.2 UML
UML, short for Unified Modeling Language, is a standardized modeling language
consisting of an integrated set of diagrams, developed to help system and software
developers for specifying, visualizing, constructing, and documenting the artifacts of
software systems, as well as for business modeling and other non-software systems. The
UML represents a collection of best engineering practices that have proven successful in
the modeling of large and complex systems. The UML is a very important part of
developing object oriented software and the software development process. The UML uses
mostly graphical notations to express the design of software projects. Using the UML helps
project teams communicate, explore potential designs, and validate the architectural design
of the software.
(What is Unified Modeling Language (UML)?, 2021)
48
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Figure 27: Use case diagram
Source: author developed
49
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
4.2.2 Flow charts
50
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01
Bibliography
Staff, W.2020, What is an example of manual database? Accessed on 12th December 2020,
https://www.reference.com/world-view/example-manual-database-432e345e60c4b0d
51
A.G.D.N.Ranathunga Database Design & Development Assignment No.
01