0% found this document useful (0 votes)
30 views63 pages

COL-A-060083 DB Com 80

Uploaded by

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

COL-A-060083 DB Com 80

Uploaded by

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

ESOFT METRO CAMPUS

#3, De Fonseka Road, Colombo 04.

Higher National Diploma in Computing & Systems Development / Business Management


Assignment Submission Form
Name Ali Urfan Noori Name of Group Members (If
ESOFT Reg. No COL/A-060083 Applicable)
Edexcel No
Module Name Database assignment
Name of the Lecturer Miss. Mahesha Thejani
Date Due
Date Submitted 13/06/2018
Fine
Email-Address [email protected]
Contact No 0783781747
Check List CD Assignment Formatting Sheet Harvard Referencing
() Brief
Signature on Signature on Student Declaration
Coversheet

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

Higher National Diploma in Computing & Systems Development / Business Management


Assignment Submission Form
Name Ali Urfan Noori
Student Reg. No COL/A-060083
Edexcel No
Module Name Database
Name of the Lecturer Miss. Mahesha Thejani
Date Due
Date Submitted 13/06/2018
Fine
Email-Address [email protected]
Contact No 0783781747
Check List CD Assignment Formatting Sheet Harvard Referencing
() Brief
Signature on Signature on Student Declaration
Coversheet

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

Assessor Internal Verifier


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

Student’s name
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
Y/N
• Identifying opportunities for
improved performance?
Y/N
• Agreeing actions?
Does the assessment decision need Y/N
amending?
Assessor signature Date

Internal Verifier
Date
signature
Programme Leader signature (if required)
Date

Confirm action completed


Remedial action taken
Give details:

Assessor signature Date


Internal Verifier
signature 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

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 M2 M3 D2


Descripts

LO3 Test the system against user and system requirements.


Pass, Merit & Distinction P3 M4 D3
Descripts

LO4 Produce technical and user documentation.


Pass, Merit & Distinction P4 P5 M5 D4
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.
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:


(Provide E-mail ID) (Provide Submission Date)
Higher National Diploma in Computing
Assignment Brief
Student Name /ID Number

Unit Number and Title Unit 4: Database Design & Development

Academic Year 2017/18


Unit Tutor

Assignment Title Data base system for the SmartMovers Transport


Company

Issue Date

Submission Date

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

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.

System/Software Requirements for the developed System


The general software requirements to use the Smart-mover company Management system is listed as
follows:

• Microsoft SQL Server 2008 add on


• Microsoft Silverlight 3 SDK
• Microsoft ASP.net
• Visual Studio 2013 (Professional)

Hardware Requirements for developed System


The general Hardware requirements to use the Smart-mover Management system is listed as follows:

• Intel Core2 Quad 2.0 GHz processors or faster


• 1024 MB RAM
• 500 MB of disk allocation for installation
• Disk Resolution 5,400
• Dedicated Standard 128MB Graphics Card
• HP LaserJet 2135 Ink advantage printer
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.

Identify entities, attributes, and primary keys


I identified the table and their primary Keyes,
Entities Primary keys Attributes
Customer Customer ID customer name, customer category
Product product Id product name, product type
Load load Id load type
payment payment Id payment amount
transport assistant Id driver, lorry number, location
employee Employee Id employee name
depots depots Id depots location
jobs job ID job type, job location,
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.

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

In this part I changed logical ER diagram entities, in mapping method


Purpose of mapping is which entity needs the primary key of another entity
Example: customer table needs product Id to identify the product and customer id and product id are both
primary keys. In customer table product id becomes a foreign key.

Figure 2 logical mapping


Activity 1.2
1.2.1 Explain data normalization with examples. Check whether the provided logical design in task 1.1 is
normalised. If not, normalize the database by removing the anomalies.

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.

First Normal Form


First Normal Form is defined in the definition of relations (tables) itself. This rule defines that all the
attributes in a relation must have atomic domains. The values in an atomic domain are indivisible
units.

Second Normal Form


Second normal form (2NF) is the second step in normalizing a database. 2NF builds on the first
normal form (1NF).
Normalization is the process of organizing data in a database so that it meets two basic requirements:
 There is no redundancy of data (all data is stored in only one place).
 Data dependencies are logical (all related data items are stored together).

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

Third Normal Form


Third normal form (3NF) is a normal form that is used in normalizing a database design to reduce the
duplication of data and ensure referential integrity by ensuring that the entity is in second normal form,
and all the attributes in a table are determined only by the candidate keys of that relation and not by
any non-prime attributes.
3NF was designed to improve database processing while minimizing storage costs.
first normal form

Custom Custome Produ Product


er ID r Name ct ID Name

123 Ahmad 0012 Acrylonitri


le
124 Mahmo 0013 Ammoniu
od m sulfate
125 Jamal 0014 Chloride

Second normal form

Customer Customer Product ID Product Job Id Job type


Name Name
123 Ahmad 0012 Acrylonitrile 1234 Sales
124 Mahmood 0013 Ammonuium 1235 HR
125 Jamal 0014 Chloride 1236 Account

Third normal form

Custom Custom Produ Product Job Job Payeme Payme Transpo


er Id er Name ct ID Name Id type nt Id nt rt
amoun
t
123 Ahmad 0012 Acrylonitri 123 Sales 21325 $500 Car
le 4
124 Mahmoo 0013 Ammonuiu 123 HR 14548 $300 Van
d m 5
125 Jamal 0014 Chloride 123 Accou 12635 $1000 Van
6 nt
1.2.2 Design set of simple interfaces to input and output
for the above scenario using Wireframe or any interface-designing tool.

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

Figure 3 login form


Customer table form

Figure 4 customer form

Employee interface table


Figure 5 Employee form

Load interfacce table


Figure 6 Load form

Product interface table


Figure 7 Product form

Payment interface table


Figure 8 Payment 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

Not null constraint


The non-zero constraint is a constraint placed on a column in a relational database table. Provides the
conditions in which the column, each row of data, must contain a value - during the insertion or update
operation it should not be empty. If this column is left blank, it will generate an error message and all
operations of insertion or update will be corrupted.
Sometimes the non-zero limitation is implicit. When a column is specified as a primary key, it uniquely
identifies all the rows in the table so that they cannot obviously be empty (Techopedia, 2006)

Figure 9 NOT NULL

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

Figure 10 PRIMARY KEY SQL CODE

Figure 11 Primary Key

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

Figure 12 Login Table SQL code


Database and customer table.

Figure 13 Customer Table SQL code

SQL Employee table

Figure 14 Employee Table SQL code


SQL Deports table

Figure 15 Deport Table SQL code

SQL Loads table

Figure 16 Loads Table SQL code


SQL Payment table

Figure 17 Payment Table SQL code

SQL Product table

Figure 18 Product Table SQL code


SQL Transport table

Figure 19 Transport Table SQL code


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.

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.

Figure 20 SQL INSERT QUERY


Update Query

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:

Figure 21 SQL UPDATE QUERY

Delete Query

The DELETE statement is used to delete the records in a table

Figure 22 SQL DELETE QUERY


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

Primary key

Figure 23 SQL PREMARY KEY Constraint

Foreign key

Figure 24 SQL FOREIGN KEY Constraint


NOT NULL KEY

Figure 25 SQL NOT NULL KEY Constraint

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

Figure 26 SQL JOIN QUERY


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

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:

SELECT: This command is used to retrieve a row from a table.

Figure 27 Select Query SQL code


UPDATE: This command changes the information of one or more records

Figure 28 Update query SQL code

DELETE: This command removes one or more files from a table based on specified conditions.

Figure 29 Delete query SQL code


Activity 2.3
2.3.1 Explain how security mechanisms have been used and the importance of these mechanisms for the
security of the database. Implement proper security mechanisms (EX: -User groups, access permissions) in
the developed database.

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.

Figure 30 Group BY query SQL code

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

Figure 31 ORDER BY query SQL code


Between
Between is used to select range of data between two
values. The values can be number, dates, texts.

Figure 32 BETWEEN query SQL code


Where
SQL WHERE clause is used to specify a condition when extracting data from a table or connecting to
multiple tables. If the conditions given are satisfied, it only yields a certain amount of the table. You must
use the clause WHERE to filter records and capture only the required records. The clause WHERE is used
not only in the SELECT statement, but also in UPDATE, DELETE, and so on. (Tutorialspoint, n.d.)

Figure 33 WHERE query SQL code


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

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.

Test Task Screenshot Expected Pass/Fail


ID result
01 Login The result Pass
is positive
Login
successful

02 Interface login Pass


C#
This is creating table which I tested and the result was
positive, pass.
Test Task Screenshot Expected Pass/Fail
ID result
01 Create The result Pass
table is positive
Created
table in
SQL

02 Interface Store Pass


C# Employee
detail
I tested and updated a record in system and the result was positive.
Tes Task Screenshot Expecte Pass/
t ID d result Fail
01 Update Update Pass
The
details

02 Interface Update Pass


the
details
I tested and Deleted a record in system and the result was positive, in both way SQL and in interface
system.
Tes Task Screenshot Expecte Pass/
t ID d result Fail
01 Delete Delete Pass
The
record

02 Interface Delete Pass


the
record
I tested and Deleted a record the result was positive, passed
Tes Task Screenshot Expecte Pass/
t ID d result Fail
01 Insert Insert Pass
The
record

02 Interface Insert Pass


the
record
Activity 3.2
3.2.1 Explain how the selected test data in task 3.1 b) can be used improve the effectiveness of testing.
Over all, all of them important to be test the selected test data which I tested them because those thing are
very important specially administration login form, and load form. And it is more important to check the
button whether the insert, delete, search and update buttons are working are not, and the reason which I
choose those data was that, main uses buttons were in those forms.
Activity 3.3

3.3.1 Get independent feedback on your database solution from the non-technical users and some
developers (use surveys, questioners, interviews or any other feedback collecting method) and
make recommendations and suggestions for improvements in a separate
conclusion/recommendations section.
3.3.1.1 Feedback 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?

Are you satisfied with our


of service?
Are you satisfied with the
database capacity?
Are you satisfied with
system design?
Are you satisfy from
system security?
Do you found any problem
while inserting any data?
Are you satisfy from
installed software in
system?
How would you like to
rate our system
development.
5.1 Analysis feedback report

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

Excellent Column3 Column1 Column2


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

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.

1 Task Time Designation Description


Administrator 9am – 6pm This section Administrator
system Saturday and designated to admin section is to
Sunday controlling main
system.
Database service 10am – 2pm This section It is used to
Monday to designated to troubleshoot the
Thursday database technician database system
problem.
Update software 9am – 6pm Monday This section It is used to update
to Thursday designated to software,
database technician.

Securing the 9am – 6pm This section It is used to protect


database system Saturday to designated to the main server and
against all kind of Thursday database taking backup.
threats. administration.
Hardware maintain 10am – 4pm Sunday This section It is used to repair
only designated only for and fix physical
database technician. troubleshoot.
System redundancy 9am- 6pm Monday This section It used to take
to Thursday designated only for backup daily and
database technician save organization
data
Activity 4.2
b. Your technical documentation should include
some of the UML diagrams (Use case diagram Class diagram, etc.), flow charts for the important
functionalities, context level DFD and the Level 1 DFD

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

You might also like