COL-A-060083 DB Com 80
COL-A-060083 DB Com 80
Herewith I agree for the given terms and conditions on plagiarism & Academic dishonesty also I declare the work submitted doesn’t
breach these regulations.
Note: Keep the softcopy of the assignment with you until the official results released by ESOFT. ESOFT has all rights to request the softcopy again at any time.
Aliurfan Noori 13/06/2018
Signature Date
I will keep the copy of this sheet until I receive the Results of my Submitted work
Aliurfan Noori 16/06/2018
Signature Date
Higher Nationals
Internal verification of assessment decisions – BTEC (RQF)
INTERNAL VERIFICATION – ASSESSMENT DECISIONS
Programme title
Student’s name
List which assessment criteria Pass Merit Distinction
the Assessor has awarded.
Internal Verifier
Date
signature
Programme Leader signature (if required)
Date
Programme Leader
signature (if required) Date
Higher Nationals - Summative Assignment Feedback Form
Student Name/ID
Unit 04: Database Design & Development
Unit Title
Assignment Number 1 Assessor
Date Received
Submission Date 1st submission
Date Received 2nd
Re-submission Date submission
Assessor Feedback:
LO1 Use an appropriate design tool to design a relational database system for a substantial problem
LO2 Develop a fully functional relational database system, based on an existing system design
Resubmission Feedback:
* Please note that grade decisions are provisional. They are only confirmed once internal and external moderation has taken place and
grades decisions have been agreed at the assessment board.
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).
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.
Issue Date
Submission Date
Submission format
Part 1: The submission is in the form of an individual written report. This should be written
in a concise, formal business style using single spacing and font size 12. You are required
to make use of headings, paragraphs and subsections as appropriate, and all work must be
supported with research and referenced using the Harvard referencing system. Please also
provide a bibliography using the Harvard referencing system. The recommended word
limit is 2,000–2,500 words, although you will not be penalised for exceeding the total word
limit.
Part 2: The submission is in the form of a fully functional relational database system
demonstrated to the Tutor; and an individual written report (please see details in Part 1
above).
Part 3: The submission is in the form of a witness statement of the testing completed by
the Tutor; technical documentation; and a written report (please see details in Part 1
above).
Unit Learning Outcomes:
LO1 Use an appropriate design tool to design a relational database system for a
substantial problem.
LO2 Develop a fully functional relational database system, based on an existing
system design.
LO3 Test the system against user and system requirements.
LO4 Produce technical and user documentation.
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
Initially, I would like to thank my parents for their valuable contributions for their morally, financially
towards the completion of this project. I am also grateful to appreciate my lecturer at ESOFT Computer
Studies (Pvt.) Ltd, Colombo, Miss. Mahesha Thejani who was guiding me with her kindness and patience
throughout the assignment, without her help and kind guidance this assignment would not have been
completed.
I would take this opportunity to thank my Program Coordinator Miss. Oshadhi Karunaarachchi who gave
me this wonderful opportunity to do the assignment.
Thank you!
Table of Contents
Activity 01................................................................................................................................24
Activity 1.1................................................................................................................................................. 24
1.1.2 Identify the user and system requirements to design a database for the above scenario............24
1.1.3 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................................................................................................................26
1.1.4 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.
............................................................................................................................................................... 26
Activity 1.2................................................................................................................................................. 28
1.2.1 Explain data normalization with examples. Check whether the provided logical design in task 1.1
is normalised. If not, normalize the database by removing the anomalies............................................28
1.2.2 Design set of simple interfaces to input and output for the above scenario using Wireframe or
any interface-designing tool.................................................................................................................. 31
1.2.3 Explain the validation mechanisms to validate data in the tables with examples.........................35
Activity 1.3................................................................................................................................................. 37
1.3.1 Check whether the given design (ERD and Logical design) is representing the identified user and
system requirements to access the effectiveness of the design............................................................37
Activity 2..................................................................................................................................38
Activity 2.1................................................................................................................................................. 38
2.1.1 Develop a relational database system according to the ER diagram you have created (Use SQL
DDL statements).................................................................................................................................... 38
2.1.2 Provide evidence of the use of a suitable IDE to create a simple interface to insert, update and
delete data in the database................................................................................................................... 43
2.1.3 Implement the validation methods explained in task 1.2-part c...................................................45
2.1.4 Display the details payment with the job details and the customer details using Join queries.....46
Activity 2.2................................................................................................................................................. 47
2.2.1 Explain the usage of DML with below mentioned queries by giving at least one single example
per each case from the developed database.........................................................................................47
Activity 2.3................................................................................................................................................. 49
2.3.1 Explain how security mechanisms have been
used and the importance of these mechanisms for the
security of the database. Implement proper security mechanisms (EX: -User groups, access
permissions) in the developed database............................................................................................... 49
Activity 2.4................................................................................................................................................. 49
2.4.1 Explain the usage of the below SQL statements with the examples from the developed database
............................................................................................................................................................... 49
Activity 3..................................................................................................................................53
Activity 3.1................................................................................................................................................ 53
3.1.1 Provide a suitable test plan to test the system against user and system requirements....................53
3.1.2 Provide relevant test cases for the database you have implemented...........................................54
Activity 3.2...............................................................................................................................59
3.2.1 Explain how the selected test data in task 3.1 b) can be used improve the effectiveness of
testing.................................................................................................................................................... 59
3.3.1 Get independent feedback on your database solution from the non-technical users and some
developers (use surveys, questioners, interviews or any other feedback collecting method) and make
recommendations and suggestions for improvements in a separate conclusion/recommendations
section........................................................................................................................................................ 59
5.1 Analysis feedback report..............................................................................................................60
Activity 4..................................................................................................................................61
Activity 4.1................................................................................................................................................ 61
4.1.1 Prepare a simple users’ guide and a technical documentation for the support and maintenance of
the software............................................................................................................................................ 61
Activity 4.3...............................................................................................................................62
4.3.1 Suggest the future improvements that may be required to ensure the continued effectiveness of
the database system.................................................................................................................................. 62
References................................................................................................................................63
Figure 1 ER diagram....................................................................................................................................... 26
Figure 2 logical mapping................................................................................................................................ 27
Figure 3 login form......................................................................................................................................... 30
Figure 4 customer form..................................................................................................................................31
Figure 5 Employee form................................................................................................................................. 32
Figure 6 Load form......................................................................................................................................... 32
Figure 7 Product form.................................................................................................................................... 33
Figure 8 Payment form...................................................................................................................................33
Figure 9 NOT NULL......................................................................................................................................... 35
Figure 10 PRIMARY KEY SQL CODE.................................................................................................................36
Figure 11 Primary Key.................................................................................................................................... 36
Figure 12 Login Table SQL code......................................................................................................................38
Figure 13 Customer Table SQL code...............................................................................................................39
Figure 14 Employee Table SQL code.............................................................................................................. 39
Figure 15 Deport Table SQL code...................................................................................................................40
Figure 16 Loads Table SQL code.....................................................................................................................40
Figure 17 Payment Table SQL code................................................................................................................41
Figure 18 Product Table SQL code................................................................................................................. 41
Figure 19 Transport Table SQL code.............................................................................................................. 42
Figure 20 SQL INSERT QUERY......................................................................................................................... 43
Figure 21 SQL UPDATE QUERY....................................................................................................................... 44
Figure 22 SQL DELETE QUERY.........................................................................................................................44
Figure 23 SQL PREMARY KEY Constraint........................................................................................................ 45
Figure 24 SQL FOREIGN KEY Constraint..........................................................................................................45
Figure 25 SQL NOT NULL KEY Constraint........................................................................................................46
Figure 26 SQL JOIN QUERY............................................................................................................................. 46
Figure 27 Select Query SQL code................................................................................................................... 47
Figure 28 Update query SQL code..................................................................................................................48
Figure 29 Delete query SQL code................................................................................................................... 48
Figure 30 Group BY query SQL code...............................................................................................................49
Figure 31 ORDER BY query SQL code............................................................................................................. 50
Figure 32 BETWEEN query SQL code..............................................................................................................51
Figure 33 WHERE query SQL code..................................................................................................................52
Introduction
Now a day everyone using database for their companies and organizations because it makes humans work
easier to save their important files secure in other hand it saves humans time. In past humans store their data
manually since database came in modern world everyone got comfortable with storing data. They got
benefits of database. According to the scenario the smart mover company wants to have a database system
which they could store the staff data and details, customers detail and other important company’s files,
As a database developer the smart mover company needs to have a database system my task is to design
database system according their requirement, and expectations that should be user-friendly with the features
as they want.
Activity 01
Activity 1.1
1.1.2 Identify the user and system requirements to design a database for the above scenario.
User requirement
The user system requirement belongs to company and client demands that which type of system an
organization want from developer and the system requirement related to their system like how big
system they are going to use, according to this scenario The Smart Mover Company wants to have
an automated system to handle their daily activities.
User requirement
login in system should one by administrator.
Transport details should register with company staff.
Customer detail should store in system by staff.
Transport drive can access payment details.
An entity relationship diagram (ERD) shows the relationships of entity sets stored in a database. An entity in
this cont
ext is a component of data. In other words, ER diagrams illustrate the logical structure of databases. At first
glance an entity relationship diagram looks very much like a flowchart. It is the specialized symbols, and the
meanings of those symbols, that make it unique. In this section I designed logical plan for smart mover
company which include customer, product, job, load, transport unit, payment,
Figure 1 ER diagram
Relational mapping of the ER diagram
Database normalization
Database normalization is process of maintaining data into table in such a way that the results of using the
database always cannot open more than one interpretation
Such normalization is essential to relational database. It may have the effect of duplicating data within the
database and often results in the creation of additional tables.
A 1NF table is in 2NF form if and only if all of its non-prime attributes are functionally dependent on the
whole of every candidate key
In this section I have created interfaces for each tables with using visual studio application software.
Login form for administration to login. In below I inserted some other interfaces screenshots which are show
users can store data with functionalities of using insert data, delete, search, and update buttons.
Log-in form
1.2.3 Explain the validation mechanisms to validate data in the tables with examples.
Constraints of SQL server
A limitation is the limit place on data that users can enter into a Colum or Colum Limit is part of the
definition of the table; you can run constraints when creating a table or later. You can delete a limit from
the table without affecting the table or data, and you can temporarily disable some restrictions
Primary key
The primary limitation of the key represents a column or a
combination of columns as the primary table key. It creates an integrated integration that requires each row
to have a unique identifier, so that data changes or queries always refer to an entirely unambiguous rows.
When we place a key constraint on a column, we need to have each row in that column for a unique value,
which cannot be NULL. The primary key constraint in multiple columns needs to combine the values in
those columns, which is unique. Examples of the primary keys include the billing number, employee ID,
purchase order number and item number or number.
we can have only one primary key in each table. When we set a primary key, SQL Server automatically
creates the index on the specified column or column. By default, this is a cluster index, although you can
specify a non-linear index. This unique index maintains the integrity of the entity for the primary key. You
cannot have a primary key restriction without this index and you cannot quit the index. To remove the
listing, you must abandon the restriction
(Reilly, 1999).
Activity 1.3
1.3.1 Check whether the given design (ERD and Logical
design) is representing the identified user and system
requirements to access the effectiveness of the design.
I have created database system for Smart-mover company, according the scenario I made eight interface
form for the client demand. In addition, one of the most important GUI in the database is Customer
details interface where all the customer registrations details will be stored. Also, Transport Unit, Depots,
Load, Jon etc… detailed interfaces are also there in the database to store data. Those were user
requirements by the Smart- movers company and I have implemented those according to their request.
By that the reader can see, I have perfectly implemented the database design as user’s request.
Also I have designed a user logging form to secure the data structure in the database. That logging form
will neglect the unauthorized personal’s access in to the database. It was a system requirement and I
have also implemented it according to that.
All in all, I have mainly implemented the both user and system requirements as to the company requests.
Activity 2
Activity 2.1
2.1.1 Develop a relational database system according to the ER diagram you have created (Use SQL DDL
statements).
Under this section I created tables and within tables I set values, primary keys below I inserted screenshots
of creating tables for each entities.
Login-table
The Integrated Development Environment (IDE) is an application that facilitates software development. In
general, an IDE is a GUI- (graphical user interface) based working environment designed to help a
developer build software application in an integrated environment with all the tools needed. Common
features such as debugging, controlling the copy, and reviewing the data structure help a developer to
quickly move things to other applications without changing them. Therefore, it helps maximize
productivity by providing the user interface (UI) for relevant components and reducing time to learn
languages. An IDE supports single or multiple languages (Techopedia, n.d.).
Insert Query
The INSERT Statement functionality is to add new rows of data to a table.
SQL UPDATE Query is used to change the records in a table. You can use WHERE clause with the
UPDATE request to update selected rows, otherwise all rows will be affected.
Example:
Delete Query
Primary key
Foreign key
2.1.4 Display the details payment with the job details and the customer details using Join queries
As I mentioned in this part the job detail customer details and payment details by using join query
Data Manipulation Language (DML) is a family of computer languages that contain commands that enable
users to manipulate data in a database. This manipulation involves inserting data into database tables,
retrieving existing data, deleting data from existing tables, and modifying existing data. DMLs are mainly
located in SQL databases.
DML resembles simple English language and enhances efficient user interaction with the system. The
functional capability of DML is organized in manipulation commands like SELECT, UPDATE, INSERT
INTO and DELETE FROM, as described below:
DELETE: This command removes one or more files from a table based on specified conditions.
Activity 2.4
2.4.1 Explain the usage of the below SQL statements with the examples from the developed database
Group by
Group by clause is used to group the results of a SELECT query based on one or more columns. It is also
used with SQL functions to group the result from one or more tables.
Order by
Order by clause is used with the SELECT statement to set
the retrieved data in the ordered order. Ordering by default restores recovery data in ascending order. To
sort the data in descending order to sort the data in descending order DESC keyword is used with Order by
clause. (Tutorialspoint, n.d.)
We have created a test plan to the smart-mover company we are testing the database system
through this test plan table we are going to test the system and their functionalities work or not the
thing should test are listed in below.
Test plan
SQL server test plan
Test plan
Test case Button click, to create a statement
Thing should to Insert, Delete, Search, Update, User-Login
test
Software need MySQL and visual studio
Responsible Tester and users of the system
Scheduled 6:00pm to 9:00pm
3.1.2 Provide relevant test cases for the database you have
implemented
I tested the login form and the result was positive and as a evidence I inserted my name in login form
otherwise I could able to inserted administrator name as well.
3.3.1 Get independent feedback on your database solution from the non-technical users and some
developers (use surveys, questioners, interviews or any other feedback collecting method) and
make recommendations and suggestions for improvements in a separate
conclusion/recommendations section.
3.3.1.1 Feedback form
Thank you for taking the time to fill feedback form, you are helping us how much we did well in our
services your idea’s suggestion is important for us.
Feedback
Feedback Excell Good Neutral Dissatisfied
ent
Are agree with server
system?
We have given feedback form to smart-mover staff, it is important for us to evaluate in our work quality
and see how much we are weak in our work and how much the customers have satisfied from our services,
in above table I created the percentages which I have got from clients totally we have given feedback from
for twenty-five people. In return we got fourteen (excellent), Four (Good), and two (Natural), the company
satisfied from our services which we have done for them, they tested their system fortunately their database
run very well we didn’t find any problem in their system.
16
14
12
10
0
Excellent Good Netural Dissatisfied
According to the scenario of Smart-movers company, based on the requirements that developed
system will enhance the managerial process of the Smart-mover. The main user in the smart-mover
company is the administrator.
Activity 4.3
4.3.1 Suggest the future improvements that may be required to ensure the continued effectiveness
of the database system.
The main effort to create this system more user-friendly and creating the system with more features like
advanced graphical user interfaces that will make the user to attract to interact and helpful to use the
system efficiently and effectively. There might be a great advantage if there is a new feature to add any
new fields and details to the management system. This will reduce in time consumption. An improvement
should be done in the way of inserting, updating and deleting the records in the Smart-Mover Company.
The user documentation will give a brief knowledge to the user to interact and should improve the
graphical interfaces in user documentation. If I can make the system more attractive and user-friendly, it
will be more points in development. The Administrator in the Smart- Mover Company should be given
more options and increase the security.
Finally, by considering the security in a database. There should be a critical improvement in order to
protect the database form various kinds of threats using different kinds of control mechanisms.
References
beginnerSQL, 2007. Beginner SQL Tutorial. [Online]
Available at: http://beginner-sql-tutorial.com/sql-order-by-clause.htm
[Accessed 12 June 2018].
Reilly, M. D., 1999. Certifiably SQL: Data Constraints and Integrity. [Online]
Available at: http://www.itprotoday.com/microsoft-sql-server/certifiably-sql-data-constraints-and-
integrity
[Accessed 11 June 2018].
Techopedia, 2006. Not-Null Constraint. [Online]
Available at: https://www.techopedia.com/definition/27370/not-null-constraint
[Accessed 12 June 2018].
Techopedia, n.d. Integrated Development Environment (IDE). [Online]
Available at: https://www.techopedia.com/definition/26860/integrated-development-environment-ide
[Accessed 11 June 2018].
Tutorialspoint, n.d. SQL - ORDER BY Clause. [Online]
Available at: https://www.tutorialspoint.com/sql/sql-order-by.htm
[Accessed 13 June 2018].
Tutorialspoint, n.d. SQL - WHERE Clause. [Online]
Available at: https://www.tutorialspoint.com/sql/sql-where-clause.htm
[Accessed 13 June 2018].