You are on page 1of 90

2019 Database

Contents
Part 1...........................................................................................................................................................4

Introduction.............................................................................................................................................4

Relational Database System using appropriate design tools and techniques:.........................................4

Data Modeling:........................................................................................................................................6

-Logical Data Model:............................................................................................................................7

ER-Diagram:.............................................................................................................................................9

Data Dictionary:.....................................................................................................................................12

User Requirements:...............................................................................................................................14

System Requirements:...........................................................................................................................14

Conclusion:............................................................................................................................................14

Normalization:.......................................................................................................................................15

Example of normalization:.................................................................................................................16

Data Validation:.....................................................................................................................................20

2.Data Format Validation/Data Type validation................................................................................22

3.Data Range Validation:...................................................................................................................22

4.Data Presence Validation:...............................................................................................................23

Effectiveness of the design in relation to user and system requirements.............................................23

[Part 2].......................................................................................................................................................24

Introduction:..........................................................................................................................................24

Evidence of User Interface (UI)..............................................................................................................25

Queries across multiple tables:..............................................................................................................28

CREATE STATEMENT:.........................................................................................................................28

ALTER Statement...............................................................................................................................30

Constraints............................................................................................................................................31

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 1


2019 Database

1.Primary Key:...................................................................................................................................31

2.Foreign Key:....................................................................................................................................32

3.Unique Key:....................................................................................................................................33

4.Not Null:.........................................................................................................................................34

Implementing a query language into the relational database system...................................................34

Introduction.......................................................................................................................................34

SELECT statement:.................................................................................................................................35

INSERT statement:.................................................................................................................................37

DELETE statement:................................................................................................................................38

UPDATE statement:...............................................................................................................................39

SQL Clauses:...........................................................................................................................................40

there are three sql clauses , they are group by clause, having clause and order by clause...................40

Having clause:....................................................................................................................................41

Order by clause:.................................................................................................................................41

Joins:......................................................................................................................................................42

Inner Join:..........................................................................................................................................42

Left Outer Join:..................................................................................................................................42

Right Outer Join.................................................................................................................................43

Full Outer Join:...................................................................................................................................44

Database Security:.................................................................................................................................44

Windows Authentication:..................................................................................................................44

SQL Server authentication:....................................................................................................................45

Password Policy:....................................................................................................................................46

Database Maintenance:.........................................................................................................................47

1. Log File Maintenance.....................................................................................................................48

2.Backup/Restore Plan:.....................................................................................................................48

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 2


2019 Database

Evaluation of effectiveness of the database solution in relation to user and system requirements, and
suggest improvements..........................................................................................................................49

Future Enhancements:..........................................................................................................................50

[Part 3].......................................................................................................................................................51

Testing the system against user and system requirement:...................................................................51

3. Integration Testing: It is that kind of testing where different small units of a program are
combining together and then tested is known as integration testing. It can be carried out in two
ways Bottom-up method and Top-down method. Bottom-top method is started from lower part of
unit and move up where as top-down method is tested starting from the top and moves down to
the lower part....................................................................................................................................52

3. Black Box Testing:..........................................................................................................................52

White Box Testing:.............................................................................................................................54

Explanation of choice of data used:.......................................................................................................69

Technical and user documentation.......................................................................................................70

User Documentation:........................................................................................................................70

Technical Documentation:.................................................................................................................70

System/Application Description........................................................................................................70

Important features of application of this application and limitations...............................................70

Future improvements that may be required to ensure the continued effectiveness of the database
system...................................................................................................................................................86

Bibliography...............................................................................................................................................88

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 3


2019 Database

Part 1
Before you start the development process, your manager has a

1. The design of the relational database system using appropriate design tools and techniques. It
should contain at least four interrelated tables. 2. Clear statements of user and system
requirements. You would prefer to produce a more detailed document, so you will produce a
comprehensive design for a fully functional system which will include interface and output
designs, data validations and cover data normalization.

Your manager would like a separate report on your assessment of the effectiveness of the design
in relation to user and system requirements

Introduction
Data is the appearance of a fact which can be recorded, stored, modified and sent on whereas
information is the experienced, sensed and understood data which is useful and has meaning.
(Gopi & Ayyavaraiah, 2017). Database is a collection of data stored on computer storage
medium, that can be used for multiple purposes whereas database management is the task of
storing data in a database and retrieving information from that data. Database Management
System (DBMS) is the system or software for creating and managing database.

A relational database is a set of information with pre-defined relationships between them. These
items are managed as a set of tables with columns and rows. A Relational Database Management
System (RDBMS) is a database management system which is based on the relational model of
data. RDBMS is a type of database Management System with a row-based table structure that
connects related data elements and includes functions that maintain the security, accuracy,
integrity and consistency of the data.

Relational Database System using appropriate design tools and techniques:


Using ‘Visual Studio’ IDE in a .net framework, we have built a desktop application (Inventory
Management System) using c# language. We have used My SQL for backend development
where all the data of clients and transactions are stored in a database. For the SQL queries I used
SQL Server which is a software for managing the database.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 4


2019 Database

According to Microsoft, “Visual Studio is an Integrated Development Environment (IDE) that


enables to write code accurately and efficiently without losing the current file context. We can
easily zoom into details such as call structure, related functions, check-ins, and test status. You
can also leverage the functionality to refactor, identify, and fix code issues”.

SQL server management system is a relational database management system (created by


Microsoft) used to create, maintain, analyze the data. Reporting services, analyzing services,
integration services are some of the features of SQL server management.

Fig: An Overview of Visual Studio.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 5


2019 Database

Fig: An overview of SQL Server Management System

Computers only understand the binary(machine) language. To communicate with the computers,
we should develop a language that can be understood by both us and computer. This is what a
programming language is-a set of rules that instruct computer to do a certain task.

For our project I have used a programming language called C# (C Sharp) which is a high-level
language.I have used C# programming language for my project because it is a modern language
which is easy to learn and well documented. It contains a lot of features such as code reuse and
re-cycling, inheritance, polymorphism and so on. My SQL is used to communicate with
database. It is an Oracle-backed open source relational database management system (RDBMS)
based on Structured Query Language (SQL)

The following are a portion of my proposed plan with the legitimization to meet the prerequisite
of the client and the frameworks.

Data Modeling:
The process of creating the model of data which has to be stored in the database is called data
modeling. It is the presentation of data structures or tables which is required for the database.
The first step of database design is data modelling where designer creates the conceptual

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 6


2019 Database

representation of the data objects. It tells what data are used in the database and how it is
organized instead of its operations. There are three types of data modelling. They are:

1.Conceptual data Model

2.Logical data Model

3.Physical data Model

-Conceptual Data Model:

It defines what database contains. This model is created by the database architect to
define and organize the concepts and rules of business. This type of model should contain three
different properties: Entities, attributes and relationships.

The conceptual data model for my scenario (database) is presented below:

There are five entities i.e. Customer, Supplier, Order, product and Order Item each having
multiples of attributes. Also, these entities have relationships with other entities.

-Logical Data Model:


Logical data modelling defines the structure of database and also sets the relationship between
them by adding more information to the conceptual data model. Primary key and secondary key

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 7


2019 Database

is not defined in this data model and consists the data types with its length. It is also known as
the implementation of conceptual data modeling .

The Logical data model of my scenario (database) is presented below:

There are five entities (Customer, Product, Supplier, Order and Order Item) and each entity has
different attributes. Also, these entities are defined with their datatypes and precise length which
is the logical data model.

-Physical Data Model:

The physical data model shows all the details of the database. It shows the structure of the table,
its attributes, the data types and length, primary keys, foreign keys and also the relationship
between the entities. This data model is made by database administrator and it is quite complex
therefore, it is difficult to understand by the non-technical users.

The Physical Data Model of my scenario (database) is presented below:

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 8


2019 Database

It consists five different entities (Customer, Supplier, Product, Order and Order Item) and each
entity has different attributes. Entities are defined with their length and datatypes. It also includes
different keys to show the relationship.

ER-Diagram:
Entity Relational (ER) is a diagrammatic technique used as a top-down method for analyzing the
nature of an application system, its objectives being to help in understanding the nature and
relationship that exists within the data of the system. The ER diagram can be used to set a
relational table that model the data of the application system.(Ritchie, 2002).It is used as a high-
level logical data model, which assists in developing a conceptual design for databases. In ER-
diagram different symbols are used while representing i.e. rectangle, diamonds, lines and ovals.

Entity:

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 9


2019 Database

Entity is an object that exists. An entity can be single person, thing, place or object.Data can be
stored about such entities. A design tool that allows database administrators to view the
relationships between several entities is called the entity relationship diagram (ERD). It is
represented by a rectangle.

Attributes:

An attribute defines the information about the entity that needs to be stored. If the entity is an
employee, attributes could include name, employee ID, employee address and work location. An
entity will have zero or more attributes, and each of those attributes apply only to that entity. For
example, the employee ID of 123456 belongs to that employee entity alone.An attribute is
represented by an oval.

Relationship:

It shows the relationship between the entities which is represented by diamond shape in
ER diagram. There are four types of relationship:

1. One-to-One relationship: When a single instance of an entity is associated with a single


instance of another entity then it is called one to one relationship. For example, in a
school database, each student has only one student ID, and each student ID is assigned to
only one person.
2. One-to-many: When a single instance of an entity is associated with more than one
instances of another entity then it is called one to many relationships. For example, each
customer can have many sales orders.
3. Many-to-many: When more than one instances of an entity is associated with more than
one instances of another entity then it is called many to many relationships. For example,
a many-to-many relationship exists between customers and products: customers can
purchase various products, and products can be purchased by many customers.

The Entity-Relational Diagram (ER-Diagram) for my project i.e. Inventory Management


System is drawn below:

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 10


2019 Database

INDEX:

Symbols Relation
One to many
Many to Many
One to One

The above diagram is an Entity Relational Diagram which shows the relationship among entity
sets. An entity set is a group of similar entities and these entities can have attributes. In terms of
DBMS, an entity is a table or attribute of a table in database, so by showing relationship among
tables and their attributes, ER diagram shows the complete logical structure of a database.

In the diagram above, we have 5 entities (Customer, Supplier, Product, Order and Order
Item) which has their own relationships. Each entity contains multiple attributes. Customer entity
has one-to -many relationship with order entity which means one customer can place multiple of
orders but one order cannot be placed by multiple customers. The relationship between supplier

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 11


2019 Database

and product is many-to -many because many suppliers can supply many products and many
products can be supplied by many suppliers. Hence, the ER-diagram shows the logical flow or
the structure of an Inventory Management System.

In the ER-diagram which I have designed according to user’s requirement has a Customer entity
where the information of customer like name, address, contact number, country can be saved. In
another entity Order, the details of order which is placed by customer such as order date, order
number and total amount can be saved. Order Item entity saves product Id, order Id, price,
quantity and so on where Product entity saves the details of product. Also, we have Supplier
entity which saves the details of supplier.

Data Dictionary:
A data dictionary contains metadata i.e. data about the database. The data dictionary contains
records about other objects in the database, such as data ownership, data relationships to other
objects, and other data. Its main function is to store description of all the objects that interact
with the database. In addition, data dictionary is a tool that helps database administrator solves
conflict problems.(Singh, 2018)

The data dictionary of some of the tables is given below:

Table S.N Columns Data Type Has Primary Allow Null


Key
(Yes/No)
Customer 1 Id Int Yes No
2 FirstName Nvarchar(40) No No
3 LastName Nvarchar(40) No No
4 City Nvarchar(40) No Yes
5 Country Nvarchar(40) No Yes
6 Phone Binary No Yes

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 12


2019 Database

Product S.N Columns Data Type Is Primary Key? Allow Null?


1 Id Int Yes No
2 ProductName Nvarchar (50) No No
3 SupplierId Int No No
4 UnitPrice Decimal (12, 2) No Yes
5 Package Nvarchar (30) No Yes
6 IsDiscontinued Bit No No

Order S.N Columns Data Type Primary Key? Allow Null?


1 Id Int Yes No
2 OrderDate DateTime No No
3 OrderNumber Nvarchar (10) No Yes
4 CustomerId Int No No
5 TotalAmount Decimal (12, 2) No Yes

Supplier S.N Columns Data Type Primary Key? Allow Null?


1 Id Int Yes No
2 CompanyName Nvarchar (40) No No
3 ContactName Nvarchar (50) No Yes
4 ContactTitle Nvarchar (40) No Yes
5 City Nvarchar (40) No Yes
6 Country Nvarchar (40) No Yes
7 Phone No Yes
8 Fax Nvarchar (30) No Yes

Order S.N Columns Data Type Primary Key? Allow Null?


1 Id Int Yes No
2 OrderId Int No No

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 13


2019 Database

3 ProductId Int No No
4 UnitPrice Decimal (12, 2) No No
5 Quantity Int No No

These table showing data dictionary gives all the information about the data types, the keys used
in the column in the detail form of the attribute of the ER diagram

User Requirements:
User requirements, often referred to as user needs, describe what the user does with the system,
such as what activities that users must be able to perform. As our system is an Inventory
Management System it should contain entities such as Customer, Order, Supplier, Product and so
on. A customer places orders on the product that are being supplied from the Supplier. One
Customer can place many orders; one Supplier can supply many products. All above outline
helps in checking the character of product with customers, suppliers and with sales and purchase
information and data. The user prerequisites are to perform multi user, user verification,
centralized, information security, accuracy, upgradable, easy to understand to satisfy that what
ought to be done which can be tackled by the Relational Database Management System.

System Requirements:
I have made an Inventory Management System using dot net framework and C# language with
‘visual studio’ IDE. Following are the minimum system requirements for my application:

Specification Minimum requirements


Operating System Windows 7
RAM 4 GB
Processor I3 processor
Free Space 5 GB

Conclusion:
With the help of data model, ER-Diagram and data dictionary, I have designed the system
i.e. Inventory Management system with different requirements of user. Different entities such as

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 14


2019 Database

Customer, Product, Supplier, Order are used. The relationship between these entities are shown
with the help of ER-diagram and also the data dictionary shows the data types, keys and so on
which completes the design or overview of our system according to the user requirements.

Normalization:
Data Normalization is systematic technique of decomposing or dividing database tables to
remove redundancy and undesirable characteristics anomalies. It puts data into multiple tables by
using different steps by removing the duplicated data from the table. Normalization is done to
make sure that data are stored logically in database using different tables. If data is not properly
normalized, data may loss and inconsistency in database may occur(Gour, et al., 2018). There are
three common types of normalization which are listed below:

1)First Normal Form (1NF)

2)Second Normal Form (2NF)

3)Third Normal Form (3NF)

-First Normal Form (1NF):

First Norm Form or 1NF is the technique of dividing unnormalized into another table by
identifying therepeating groups and removing those repeating groups within the table. Repeating
groups can be attributes or group of attributes which comes with multiple values for a single
occurrence of the nominated key attribute(s) for the table. Normally, it means every attributes in
the table must be unique and separate table must be created for the set of related data.(Connolly
& Begg, 2014)

-Second Normal Form (2NF):

For a table to be in 2NF, first table should be in 1NF and it should not contain partial
dependency. It is based on the concept of full functional dependency.It is the relation which is in
1NF and all the attributes which are not primary key must be fully functionally dependent on the
primary key.

-Third Normal Form (3NF):

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 15


2019 Database

Though 2NF is less redundant then 1NF, they may still suffer from the update anomalies which
is caused by transitive dependencies. We need to remove those anomalies by progressing into
3NF. So, the relation which is in 1NF and 2NF and when non-primary-key doesn’t contain
transitive dependencies on the primary key is called third normal form (3NF).

Example of normalization:
Example of1NF:

Roll No Name Subject


1 Apaar Dahal Database, programming
2 John Serchan Networking
3 Sujan KC Networking
4 Nischal Niraula Networking
5 Kushal Pradhan Programming
6 Piyush Yadav Programming
Fig: Unnormalized table

The above table is not normalized because it contains multiple values in a single column. To
make the table into 1NF, I have to break those values into atomic values. The First Normalized
table is given below:

Roll No Name Subject


1 Apaar Dahal Database
1 Apaar Dahal Programming
2 John Serchan Networking
3 Sujan KC Networking
4 Nischal Niraula Networking
5 Kushal Pradhan Programming
6 Piyush Yadav Programming
Fig: Table in 1NF

In the table above, multiple values do not contain in the single row, so it is in 1NF. Here, the
name of student i.e. Apaar Dahal studies two subjects (Database and Programming) so we have
divided them into two different rows. Therefore, there are not two values in a single column.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 16


2019 Database

Example of 2NF:

Teacher’s Id Subjects Teachers address


1 Programming Koteshwor
1 Networking Koteshwor
2 Database Bhaktapur
3 Professional Practice Lalitpur
4 Programming Sankhuwasava
Fig: 1NF Table

This is the database of the teachers who teaches different subjects in school. It has multiple rows
for same teacher. To make this table into 2NF, let’s break it into two tables: teachers_info and
teacher_subject

Table:teachers_info

Teachers Id Address
1 Koteshwor
2 Bhaktapur
3 Lalitpur
4 Sankhuwasava

Table: teacher_subject

Teachers Id Subject
1 Programming
1 Networking
2 Database
3 Professional Practice
4 Programming

Now, these tables are in Second Normal Form (2NF)

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 17


2019 Database

Example of 3NF:

Std_id Std_name Std_zip Std_dis Std_state Std_city Std_country


001 Apaar 00101 Kathmandu 3 Koteshwor Nepal
002 John 00202 Jhapa 1 Damak Nepal
003 Sujan 00303 Morang 1 Urlabari Nepal
004 Nini 00404 Sarlahi 2 Sarlahi Nepal

This is the database of students who studies in a school which contains the record of students’
full address. Now, to comply this table to 3NF, lets divide it into two tables students and
student_address.

Table:students

Std_id Std_name Std_zip


1 Apaar 00101
2 John 00202
3 Sujan 00303
4 Nini 00404

Table: student_address

Std_zip Std_dis Std_state Std_city Std_country


00101 Kathmandu 3 Koteshwor Nepal
00202 Jhapa 1 Damak Nepal
00303 Morang 1 Urlabari Nepal
00404 Sarlahi 2 Sarlahi Nepal

In the tables above, there is no transitive dependencies. Therefore, it is in 3NF.

Normalization in my scenario:

Unnormalized table

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 18


2019 Database

Id Customer Address Phone Product


Name
1 Maria Anders Berlin, Germany 030-0074321 Chai, Chang
2 Ana Trujillo Mexico Df, (5)555-4792 Aniseed syrup
Mexico
2 Antonio Moreno Mexico Df, (5)555-3932 Lkura
Mexico

1NF:

Id First Last Name City Country Phone Product


Name
1 Maria Anders Berlin Germany 030-0074321 Chai
1 Maria Anders Berlin Germany 030-0074321 Chang
2 Ana Trujillo Mexico Df Mexico (5)555-4792 Aniseed syrup
3 Antonio Moreno Mexico Df Mexico (5)555-3932 Lkura
In the table above, first name and last name are kept in separate column which is in 1NF.

2NF:

Customer Table:

Id First Name Last Name City Country Phone


1 Maria Anders Berlin Germany 030-0074321
2 Ana Trujillo Mexico Df Mexico (5)555-4792
3 Antonio Moreno Mexico Df Mexico (5)555-3932
Product Table:

Id Product Name
1 Chai
2 Aniseed Syrup
3 Lkura
I have broken down a single table into two table which is in 2NF.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 19


2019 Database

3NF

Customer Table

Id First Name Last Name City Country Phone


1 Maris Anders Berlin Germany 030-0074321
2 Ana Trujillo Mexico Df Mexico (5)555-4792
3 Antonio Moreno Mexico Df Mexico (5)555-3932

Product Table

Id Product Name
1 Chai
2 Aniseed Syrup
3 Lkura

Id Product Id
1 11
2 42
3 72
In the tables above, there is no transitive dependencies. Therefore, it is in 3NF.

Data Validation:
As its name suggests it helps to check the accuracy and quality of source data before using,
importing or otherwise processing data. We perform data validation test for analyst can get
insight into the scope or nature of data conflicts. It ensures that the data complies with the
requirement and quality benchmarks. It is also known as input validation. Some of the typed of
validation includes data length validation, data format validation, data range validation and data
presence validation.

Data validation means checking the accuracy and quality of source data before using, importing
or otherwise processing data. A data validation test is performed so that analyst can get insight
into the scope or nature of data conflicts. It ensures that the data complies with the requirements

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 20


2019 Database

and quality benchmarks. It is also known as input validation. Some of the types of data validation
include:

-Data Length validation

-Data Format validation

-Data range validation

-Data presence validation

1.) Data Length Validation:

The data length validation checks whether the data isn’t too short or too long. For example,
password cannot be less then 8 characters and also phone number should not be less than 9 (land
line and mobile).

Error Message is shown because password is less than 8 characters.

Error Message is shown because phone number contains more than 10 digits.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 21


2019 Database

2.Data Format Validation/Data Type validation.


The data format validation checks whether the data is in right format or not. It is also known as
data type validation. For example, if characters are supplied in the field ‘Phone number’, error
message should be show because phone number should be in numeric.

Error Message is displayed because phone number contains character which should be
numeric.

Error Message is displayed because First Name contains numeric value which should be
characters.

3.Data Range Validation:


The data range validation checks whether the value falls within the specified range.

Error Message is displayed because units exceed more than 1000 unit (specified)

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 22


2019 Database

4.Data Presence Validation:


Data presence validation checks whether the field contains value or not. The key field
cannot be blank.

Error Message is displayed because First Name is left blank.

Error Message is displayed because the number of Units is not selected.

Effectiveness of the design in relation to user and system requirements


As an IT person of a company, I have first designed a relational database using different
development tools and techniques. As per my client’s requirement I have designed my
application which has a simple and user-friendly interface which helps my client to interact with

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 23


2019 Database

the application easily. Basically, the system that I have designed has four basic elements which
are products, purchases, order and suppliers which is also the requirement of my client. Using
this application, vendor can store data on the products that has been bought from any of its
suppliers and data of customers located in different countries that can make orders on these
products. The application has function to save all the information of customers that have ordered
the particular product which acts as an evidence for communication, decision making and further
actions. It also contains feature to generate reports of products and suppliers which allows user to
view the report such as maximum sales in a particular date, total sales with tax, number of
products supplied in one year and so on which helps to develop the further strategy of a
company. Vendors can also view the statement of order; which product has been ordered by
whom, what’s the price of that particular product, the details of person who has ordered that
particular product and the amount of the ordered product.It also contains separate password
policy for users and separate password policy for admin which is very effective in the point of
security.

[Part 2]
Once the designs have been accepted by your manager you have been asked to develop the
database system using evidence of user interface, output and data validations and querying across
multiple tables.

You want to include more than just the basics so you will implement a fully functional database
system which will include system security and database maintenance features.

 You have decided to implement a query language into the relational database system.  The
developed system will be demonstrated to your manager.  Your manager has asked you to
produce a report including the followings: 1. Assessing whether meaningful data has been
extracted through the use of query tools to produce appropriate management information. 2.
Evaluating the effectiveness of the database solution in relation to user and system requirements,
and suggest improvements.

Introduction:
According to Thomas J. Watson, the legendary CEO of IBM: “Good design is good business.”
Despite how important Inventory Management System are for retailers, the market is still filled

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 24


2019 Database

to poorly-designed software. We have to step up in the game in the user interface (UI) sector,
making the sometimes-tedious process of inventory management less painful—and much easier
on the eyes. Having a great UI is not enough; database should be consistent as well. Data
validation is the aspect of a database that keeps data reliable.

Evidence of User Interface (UI)


User interface (UI) design is the process of making interfaces in software or computerized
devices with a focus on looks or style. A good user interface provides a "user-friendly"
experience, allowing the user to interact with the software or hardware in a natural and intuitive
way. There are certain principles and laws that guide effective design, there is always a certain
amount of craft and creativity involved in producing effective designs.

Following is the User Interface (UI) of our project i.e. Inventory Management System.

Login Page:

Parent Form:

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 25


2019 Database

Interfaces:

These are the User Interfaces (UI) of the Inventory Management System which is very user-
friendly, simple and attractive. Basically, it has four basic elements or navigation menus: File,
Order, Report and Help. Each menu has multiple sub-menus which directs user to different
pages.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 26


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 27


2019 Database

Here are the different interfaces to insert, update and delete data in my ‘Inventory Management
System’ project.

Queries across multiple tables:


DDL (Data Definition Language) allows database administrator (DBA) or user for creation
and deletion of the table.DDL statements are used to create, alter, and remove database
objects. These statements are used to create, destroy and change the structures that make up
the conceptual schema(Connolly & Begg, 2014). It is also used to define a schema or to
modify an existing one. Common DDL statements are

1.CREATE

2. DROP

3.ALTER

CREATE STATEMENT:
The SQL create statement is used to create a new table in the database.

SYNTAX:

CREATE TABLE table_name (

column1 datatype,

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 28


2019 Database

column2 datatype,

column3 datatype;

column datatypeN;

);

I have used CREATE command to create five different tables which have different columns with
different data types. Also, I have determined primary keys to uniquely identify the data.

1.Customer Table

2.Product Table

3.OrderItem Table

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 29


2019 Database

4.Order Table

5.Supplier Table

ALTER Statement
This statement is used to modify columns in the existing table. This statement is also used
to drop different constraints on the existing table.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 30


2019 Database

SYNTAX:

ALTER TABLE table_name

ADD column_name datatype;

I have used ALTER statement to use foreign key in different tables which is the primary key of
another table so that one table can be linked with another table in my project Inventory
Management System.

Constraints
SQL constraints are used to specify rules for the data in a table. These can be specified when
tables are created or after it has been created.Constraints are used to limit the type of data that
can go into a table. This ensures the accuracy and reliability of the data in the table. If there is
any violation between the constraint and the data action, the action is aborted

Some of the common constraints are:

1.Primary Key:
The primary key is a designated candidate key which is noted not to be null and
uniquely identifies each row in a table. If we declare a particular attribute as a primary key, then

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 31


2019 Database

the value of attribute cannot be null and it has to be distinct too.(Sumathi.s & Esakkirajan.s,
2007)

In the picture table ‘Customer’, ID is primary key whose data type is int and it cannot be null.

The above command creates Id as primary key in customer table.

2.Foreign Key:
Foreign key is a set of fields or attributes in one relation that is used to refer to a
tuple in another relation. It is used to relate two tables.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 32


2019 Database

Customer Table Order Table

In Customer table, Id is the primary key which is set as foreign key in Order table as Customer
Id. The value that is entered in Id which is set as foreign key in Order table must be present in
Customer table where it is set as primary key. This prevents invalid data to be inserted into
Customer Id column of Order table.(Sumathi.s & Esakkirajan.s, 2007)

The above command in Order table creates foreign key.

3.Unique Key:
Unique Key ensures that all values in a column are different.A unique constraint requires that
the values in one or more fields be unique. Note that it only makes senseto place a uniqueness
constraint on a superkey. Recall that a superkey is a group of one or more fieldsthat cannot
contain duplicate values. It wouldn’t make sense to place a uniqueness constraint on fieldsthat
can validly contain duplicated values. For example, it would be silly to place a uniqueness
constrainton a Gender field.(Stephens, 2008)

Both the Unique and Primary key constraints provide a guarantee for uniqueness for a column or
set of columns. A primary key constraint automatically has a unique constraint but multiple of
unique keys can be defined in a table whereas only one primary key can be defined in a table.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 33


2019 Database

As Primary key automatically has a unique constraint, following command makes [Id] as a
unique key.

4.Not Null:
It Ensures that a column cannot have a NULL value.This enforces a field to always
contain a value, which means that we cannot insert a new record, or update a record without
adding a value to this field.

Above is the command in order to create a Not Null value. In the above table ‘Order’, Id,
OrderDate, OrderNumber, CustomerId, TotalAmount cannot contain null values which means
this fields must contain values in it.

Implementing a query language into the relational database system


Introduction
Queries are short statements to tell database management system to perform an operation such as
SELECT data from a certain table, INSERT some data into a table, UPDATE the records or data
of a table, DELETE the data from table and so on.(Chatham, 2012). It is the language to retrieve
the data from database. For our project we have used SQL (Structured Query Language) for
implementing a query language into the relational database system. SQL is a database query

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 34


2019 Database

language used for storing and managing data in Relational DBMS. SQL was the first commercial
language introduced for E.F Codd's Relational model of database. Today almost all
RDBMS(MySql, Oracle, Infomix, Sybase, MS Access) use SQL as the standard database query
language. SQL is used to perform all types of data operations in RDBMS.

Following are some of the query statements used in my project:

SELECT statement:
The SELECT query is used to retrieve data from one or more tables form the database.
By using SELECT query, we are able to control how much data is returned by the
database, by means of both how many rows and how many columns are returned.
SELECT query allows the retrieval of data in a read-only form, so whatever is done to
the data retrieved from the table, for example calculation of values or manipulation of
output, will not affect the underlying data stored in the database table.(Chatham, 2012)
Some of the examples of SELECT query from my project.

Here UserName is selected/extracted from ‘User’ table where UserName is supplied from
the textbox named ‘txtusername’ as string. This query is used in login form in my project
to login.
The final query is shown below:
“Select UserName from [User] Where UserName=’Apaar’”;

Here, Id and ProductName is selected from ‘Product’ table. This query is used in
PlaceOrder form in my project to extract Product.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 35


2019 Database

Here, Id, FirstName and LastName is selected from ‘Customer’ table where FirstName
and LastName is extracted as Name (single column). This query is used in PlaceOrder
form in our project to extract the names of customers.

Here, UnitPrice is selected from ‘Product’ table where Id is supplied from the combobox.
The final query is shown below:
“Select UnitPrice From Product Where Id=1;
This query is used in PlaceOrder form in our project to extract the unit price of product.

Here, maximum Order Number is being extracted from ‘Order’ table and 1 is added to
the extracted value. This query is used in Place Order form in my project to extract the
maximum number of Order Number.

Here, the whole data of ‘Product’ table is displayed in the datagridview which is used in
the Product form in my project. Here, the data are displayed in the ascending order.

The above statement is used to display the data from ‘Customer’ in the datagridview
which is used in Customer form in my project which displays data in the ascending order.

The above statement is used to display the data from ‘Supplier’ in the datagridview which
is used in Supplier form in our project which displays data in the ascending order.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 36


2019 Database

The above statement checks whether the supplied username is admin or not. Admin will
have a full control or authority over an application.

INSERT statement:
The SQL INSERT statement is used to insert new records or data into the table. There are
two ways of inserting data or records into the table. They are:
1. INSERT INTO TABLE_NAME
(column1, column2, column3, .... columnN)
VALUES
(value1, value2, value3, .... valueN);
Here, column1, column2, column3,...columnN are the names of the columns in the table
into which you want to insert the data.

2. INSERT INTO TABLE_NAME


VALUES (value1,value2,value3,...valueN);
Some of the queries used in our project are:

Here, CompanyName, ContactName, ContactTitle, City, Country, Phone and Fax and
inserted using INSERT query. The inserted values will be saved in ‘Supplier’ table. The
values are supplied through text box which is used in Supplier form

Here, the values of FirstName, LastName, City, Country and Phone are inserted using
INSERT query. The inserted values will be saved in ‘Customer’ table. The values are
supplied through text box which is in Customer form.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 37


2019 Database

Here, the values of ProductName, SupplierId, UnitPrice, Package, and IsDiscontinued are
inserted using INSERT query. The supplied values are inserted in ‘Product’ table. The
values are supplied through textbox which is in Product form in our project.

DELETE statement:
The DELETE statement is used to delete existing records in a table. We can use the
WHERE clause with a DELETE query to delete the selected rows, otherwise all the
records would be deleted.
Syntax:
DELETE FROM table_name WHERE condition;
The DELETE query used in our project is given below:

Here, Using DELETE query one of the records of Customer table is deleted.
The final query will be “Delete From Customer Where Id=1;
Here, the record of customer whose id is 1 is deleted from the ‘Customer’ table.

Here, Using DELETE query one of the records of Product table is deleted.
The final query will be “Delete From Product Where Id=1;
Here, the record of product whose id is 1 is deleted from the ‘Product’ table.

Here, Using DELETE query one of the records of Supplier table is deleted.
The final query will be “Delete From Supplier Where Id=1;

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 38


2019 Database

Here, the record of Supplier whose id is 1 is deleted from the ‘Supplier’ table.

UPDATE statement:
UPDATE statement is used to modify the data or records of the table. It can update one
or more records in a table. We can use WHERE clause with UPDATE statement to
update or modify the records within the table.
The UPDATE query used in my project is given below:

Here, the values of ProductName, SupplierId, UnitPrice, Package and IsDiscontinued are
updated using UPDATE query in my project. This is done in a ‘Product’ form in my project and
also updates in ‘Product’ table

Here, the values of FirstName, LastName, City, Country and Phone are updated using
UPDATE query in my project. This is done in a ‘Customer’ form in my project and also updates
in ‘Customer’ table

Here, the values of CompanyName, ContactName, ContactTitle, City, Country, Phone and Fax
are updated using UPDATE query in my project. This is done in a ‘Supplier’ form in my project
and also updates in ‘Supplier’ table.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 39


2019 Database

SQL Clauses:
there are three sql clauses , they are group by clause, having clause and order by clause.
Group by clause:

This statement is used to arrange the data into a group. This clause is used with the SQL select
statement.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 40


2019 Database

Having clause:
This clause is used to postulate conditions on the aggregate function. This is used instead of
WHERE when aggregate functions are used.

Order by clause:
This clause determines how the data/record should be ordered. It shorts the result in ascending
order in default.

Syntax:

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 41


2019 Database

Joins:
Inner Join:
Inner join is used to select the data that are common in both the tables. It returns the
combination of the data which are common in both tables when the condition is met.

Left Outer Join:


The left outer join returns all the data from table A (left table) and any matching records
from table B (right table).

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 42


2019 Database

Right Outer Join:

This type of join returns all rows from the table B (right table) specified in the condition
and only those rows from the table A (left table) where the join condition is satisfied.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 43


2019 Database

Full Outer Join:


Full outer join is the combination of both left and right outer join.

Database Security:
Data is most important fact that organization try to protect. The data in database could be kept secure
using different model. Database security deals with the security assurance of the structure of the
database and its contents. One of the famous one is CIA model, according to this model data is
confidentiality, integrity and availability so that unauthorized person cannot use these data.

Windows Authentication:
Windows authentication is the default integrated security. When any user login or connects
using the windows account, SQL Server authenticates the username and password with
windows principles (users’ identity is confirmed by windows). In windows authentication mode
no password is required and identity validation is not performed. This type of authentication is
also known as trusted connection because SQL Server trusts the credentials which is provide by
windows.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 44


2019 Database

Fig: Windows authentication in SQL Server Management System

SQL Server authentication:


The type of authentication in which username and password are created using SQL server and
stored in SQL Server and which is not based in windows user accounts is called SQL Server
authentication. While connecting through SQL Server authentication, we must provide our login
details (username and password) every time and must apply strong password for all the
accounts.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 45


2019 Database

Fig: SQL Server authentication in SQL Server Management System

Password Policy:
The first line of defense to protect any important data, financial statements or personal
information is password. Password must be strong and standard to minimize the security issues
in any systems or applications. For a secure application or system, we have to follow some of
the password policies. Password policies are the set of rules which are used for better security
by creating reliable and strong password. Some of the basic policies that must be used for
better security are mentioned below:

-Minimum password length: Shorter password is easier to guess, therefore set the minimum
length of password for better security.

-Password Composition: Password must not only contain alphabets but the mixture of
alphanumeric and special characters.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 46


2019 Database

-Password History: This ensures how often password can be reused. Users should not be using
same password again and again.

-Password Age Policy: Password must be changed after a certain period of time. Same
password must not be used forever.

In my application, different privileges are given to administrator and a user. Full access of an
application is given to administrator and user access or privileges are given to normal user.

For login:

Database Maintenance:
The methods or tasks we perform for the improvement of database is called database
maintenance. We have to have a database management strategy for visual performance and to

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 47


2019 Database

meet our database goals. Database maintenance strategy helps to ensure the data integrity,
consistency and ensures database security too. There are some of the key items for database
maintenance which are:

1.Log File Maintenance

2.Backup/Restore plan

3.Corruption detection.

1. Log File Maintenance:

Log file is the file which keeps record of every actions that are performed in
database. The database of SQL also contains log file which keeps record of every transaction
done in a database. Using database log file, we can actually restore the database to the state it
was before. So, logs play vital role when data are corrupted, harmed or spammed. Each time
data increases, log files also increase in database and Virtual Log File (VLF) is created and data
are stored in it. VLF starts harming the database if the size of VLF increases, so our maintenance
routine determines the maintenance of these virtual log files and also compact these large VLF
for smooth performance.

2.Backup/Restore Plan:
The process of replicating or copying the data from primary device to secondary device is
called taking a backup. If the primary database is corrupted or crashed, we need to have a
secondary copy of database to make sure important data has not lost.

Following is the SQL statement I have used to back up my database:

Successfully backup.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 48


2019 Database

To restore the backup data, I have used following SQL statement:

Evaluation of effectiveness of the database solution in relation to user and system


requirements, and suggest improvements.
The application that I have designed to my client is effective in so many ways. It has four
different elements i.e. product, supplier, order and purchase. The application can store the data
of product, supplier and customer. It also generates the reports of sales according to different
conditions. It has different features and functions that help vendors to meet their requirements
easily. Following is the user feed form which helps to improve the further strategy of a
company and helps for profit maximization.

Feedback form:

Project Title: Inventory Management System


Feed Back Given By: Date:
Signature:

Project Description: This is a simple and effective inventory management system build to
allow create, delete, update and create data as required

Checklists Yes No Comment

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 49


2019 Database

Does client like this application? They love it.

Does it have all system requirements?

Is it user friendly?

Is this application fully secured? It is partly secured

Does this application can be used in big No bugs


supermarket?
It can be used in future
Can this system overcome the entire problem we
faced before?
Does this system need further enhancement? Yes it does need some.

FeedBack Evaluated By: Ranjan kumar Mukhiya Date:


Signature:

Future Enhancements:
This system is build by the learning student, so there are many errors that could be enhance in coming
future so that we can build more effectives management system. So I have listed some of the
enhancement that can make this system more effective.

1. Need more details of customer so that the data we need can be more reliable.
2. Customer details only search with name so it is not effective if the customer with same name
use this system.
3. To make it more effective we can add payment button for online payment.
4. There should be another table which tells about the damaged product.
5. If user forgets the password then they should be provided with new alternative way to connect
with the system.
6. This runs only on window so it is not that effective if the user use other operating system.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 50


2019 Database

[Part 3]
1.Once the system has been developed, you will test the system and your manager will
complete a witness statement indicating how your tests are performing against user and
system requirements. 2. You will produce a brief report assessing the effectiveness of the
testing, including an explanation of the choice of test data used. 3. Lastly you will produce
technical and user documentation which will be given to the company. 4. You want to provide
some graphical representations for ease of reference in the technical guide, so you have
decided to produce a 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.

Testing the system against user and system requirement:


The activity of checking whether the expected output matches the actual output is called
system testing. It also helps to find bugs or errors and makes sure the products meet the
requirements of the clients. It is the detailed document that explains everything on the tests
that are meant to be made on the unit. Testing helps to enhance the quality of an application
and also reduces the cost, maximizes the Return of Investment (ROI) and saves the
development. For Application Testing, the lifecycle of testing includes different stages which
include requirement analysis, test planning, test analysis, test design, test execution & bug
reporting, etc. There are different methods of ensuring that the application is fully tested and
contains no errors. Some of them are:

1. Unit Testing
2. Integration Testing
3. Black Box Testing
4. White Box Testing

1. Unit Testing:

It is that kind of testing where each and every individual unit of the system is tested. It should
have no dependencies on code outside the unit tested. While writing code this types of testing
id done .The reasons to conduct unit testing is that it saves the cost by fixing the error. It helps

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 51


2019 Database

developer for quick change and help to understand the code easily. It reduce debugging time by
providing documentation. It also helps to re-use the code written at if necessary for new project.

3. Integration Testing: It is that kind of testing where different small units of a program are
combining together and then tested is known as integration testing. It can be carried out in two
ways Bottom-up method and Top-down method. Bottom-top method is started from lower part
of unit and move up where as top-down method is tested starting from the top and moves down
to the lower part.

3. Black Box Testing:


It is that kind of testing which involves looking at the specifications and does not need any kind of
programming skills. These types of testing are done by using the point of view of users.

1. Login Page:

S. No. Where Expected Output Outcome display


1. If the given password and Should display error Has sent error
username is wrong or invalid or message message
not sign up.
2. If the user doesn’t enter Should display error Has sent error
password. message message
3. If the user doesn’t enter user Should display error Has sent error
name. message message
4. If the admin and user selection is Should display error Has sent error
not done message message
5 If username and password is Parent MDI form Parent MDI form was
correctly entered should be displayed displayed

Let’s try it with invalid one :

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 52


2019 Database

We put wrong password and system display this message .

Now with valid one:

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 53


2019 Database

With correct password and username the login form takes us to this main form

White Box Testing:


This is that kind of testing that is also known as clear, glass, or open testing where we look external
functionality of code is tested by looking at the code of program. In project we look as follow:

Login Form:

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 54


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 55


2019 Database

Oder details

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 56


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 57


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 58


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 59


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 60


2019 Database

For customer details:

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 61


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 62


2019 Database

For product

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 63


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 64


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 65


2019 Database

For suppliers:

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 66


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 67


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 68


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 69


2019 Database

Explanation of choice of data used:


The application was tested by one of the small supermarket owner named kamal dhakal . To test this
application we frequently provide both correct and not correct information to this application. By the

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 70


2019 Database

testing we find that login was given with wrong information as it work it doesn’t function. After that we
gave correct information then it works. In all form we tested the nature of the application and found
positive respond even though same error arises. To test my software I use different testing method and
the result was positive. All this kind of testing helps to make an application full of features.

Technical and user documentation


User Documentation:
User documentation is the text that tells what need to be done. This contains user guidance, reference,
rules and how the system works. It tells you about the functions the system have .Not only that it helps
you to operate the system without the help of technical person. There are numbers of solutions to the
problem that users faced frequently while using the application.

Technical Documentation:
Technical document are that kind of document that includes the functionality, creation, handling and
etc. This documentation is provided to administrator and users if authority is given. For the
understanding of technical documentation you should have knowledge of technical field.

System/Application Description:

This is a simple and effective inventory management system suitable for small supermarket.
Here, we can create users, admin as per required. This system is very helpful to for business
point of view and keeps the record of necessary information. This system is secure, easy to use
and effective.

Important features of application of this application and limitations


S.n Important Limitation
1. User-friendly and simple Cannot store big files.

2. Good for small scale organization Need enhancement for better performance.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 71


2019 Database

3. Keeps the record of all the data. Has no backup system.


4. Costumer can view the total amount at the No online payment system features.
end.
5. Can be login with both users and admin Cannot be operate in web application.

User Documentation of my system (IMS):

First you need to purchase the installation files, when you purchase it double click it and the
application will download itself. When an installation is done it will talk you to following
page:

Login Page: Here, you have to add valid username and password and user type and click it on
login.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 72


2019 Database

Parent Form: After you give the correct information to the login page it will take you to this
parent form where you can perform numbers of activities.

Interfaces:

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 73


2019 Database

Here, in this page, you first have to fill you name address and contact number. You also gave
the features of searching. You can see down there are 4 bottom which are use for saving,
updating, deleting and reseting the information provided.

Here, in this page, you can search the details of the customer using their name.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 74


2019 Database

Here, costumer replace the order there are different field like if you order number of product
by writing its name, you can also see the total amount of your all product and this new bottom
change the costumer and reset is use to reset the order.

Here, in this page, you can look the entire product, to do so you have to fill all the necessary
information that the system needs and here too you can save the data, update the data, delete
it and importantly reset it.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 75


2019 Database

Here, in this table, you can see the whole information about the supplier. To use this page you
have to fill all the necessary information and you have the features of searching the name and
company. Here, too, you have the feature of saving, updating, deleting and resetting.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 76


2019 Database

Basic Layout of my applicatio

Data Flow Diagram:

If the flow of data of an application/system are visually represented, then it is called Data Flow
Diagram or simply DFD. DFD is used to describe the transfer of data (input to output) and used
to generate the reports. Different standard symbols and notations are used to represent the
data flow of an application.

Context DFD (Zero Level DFD)

Context DFD is a 0 level DFD that only shows the top-level data flow of an application. It is used
to show the boundaries of an application and to understand the context DFD no technical
knowledge is required. The diagram below shows the context data flow diagram of an

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 77


2019 Database

application that I have built. There are five entities in my DFD (Customer, Product, Supplier,
Order and Order Item) which interacts with the application. There are also connectors to show
the information exchange between entities and application.

Fig: Context Data Flow Diagram

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 78


2019 Database

Fig: Flowchart of Login Management

Level 1 Data Flow Diagram:

The flowing diagram is the level 1 DFD which is the break down of a context DFD.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 79


2019 Database

Index:

Shapes Meaning
Entity

Data Store

Connectors
Processes

In the above Data Flow Diagram (DFD), there are six entities, three processes and two data
stores. By observing the DFD, we know that Customer places Order. Here, Order entity contains

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 80


2019 Database

Order Item. Also, Supplier supplies Product anduser generates reports with the generate report
process. In the above DFD, different relations are shown with the help of different connectors.

Sequence Diagram:

UML Diagram:

It helps in understanding a compact/complex system and shows the inter relation


between the different elements of a system. UML diagrams are categorized based on two

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 81


2019 Database

factors: Behavioral and Structural UML Diagram. There are various types of UML diagram and
among them I’ve chosen Use Case Diagram and Sequential Diagram.

Fig:Use case UML diagram

Using the diagram above, we can see the authentications that are given to admin and user. Admin have
privilage to create user but user do not have access to create user feature.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 82


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 83


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 84


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 85


2019 Database

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 86


2019 Database

Future improvements that may be required to ensure the continued effectiveness of the
database system.
Everything has its pros and cons. The limitations need to be improved for more effective
application. Further improvement can be policy or process within a workplace which helps to
keep focusing on the improving the way things are done on a daily basis. Further improvement
can maintain advantages to a company and can maximize profits as well.

The application that I have made is an Inventory Management System which has four basic
elements i.e. Products, Supplier, Customer and Oder. It is an application where the vendor

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 87


2019 Database

store data on the products that has been bought from any of its suppliers and data of
customers located in different countries that can make orders on these products. It can keep
the records of customers who have ordered products and also can update and delete their
information as per requirement. Vendor can also view different report of sales as per
requirements. The IMS that I have designed is user-friendly.

Though it has basic features which should be considered in Inventory Management


system, it consists of the limitations and drawbacks which can be improved later for the
enhancement of an application.

The application that I have designed can be more user-friendly which helps to determine
the reaction of users towards the application. The design of user interface and color selection is
not quite professional which might be boring. Improvement of application loading time can be
also be done by resizing or removing large size images that takes longer time to load to give
result as we know faster application fulfills the experience of users. My application is a
windows-based desktop application which could be further upgraded into web-based
application which could solve the problems of vendor. We can also use Oracle for data
management because data recovery is easier compared to MySQL. Also, it can handle large
amount of data and allows to change platform any time. My application does not have backup
option which could be improved later as we know how vital data are today. Once product has
been ordered through my application it cannot be cancelled which might not be quite
preferable to vendors. We can add order cancellation feature in it. It doesn’t contain feature to
view the amount of stocks remaining of the products which can be further improved. In my
application, every right is given to admin so, if user forgets his/her login password, they should
contact admin to renew the password. We can give rights to user to change their accounts
passwords which can be more flexible.

Therefore, further improvement helps in user-experience (UX) and focuses on profit


maximization. Further improvement can be effective to the database solution in relation to user
and system requirements

Bibliography

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 88


2019 Database

Basta, A., Zgola, M., Bullaboy, D. & Whitlock L, T., 2011. Database Security. Boston: Course Technology.

Chatham, M., 2012. Structured Query Language. 1st ed. s.l.:Mark Chatham.

Connolly, T. & Begg, C., 2014. Database Systems. 4th ed. New Delhi: Pearson Education.

Desikan, S. & Ramesh, G., 2008. Software testing principles and practices. 6th ed. New Delhi: Dorling
Kindersley.

Gopi, A. & Ayyavaraiah, M., 2017. Database Management System. s.l.:horizon books.

Gour, B., Shrivasthav, M. & Richhariya, v., 2018. Database Management systems and normalization
concepts. New Delhi: educreation publishing.

Ritchie, C., 2002. Relational database principle. 2nd ed. London: Thomson Learning.

Singh, A., 2018. Database at a glance. 1st ed. India: ajit singh.

Stephens, R., 2008. Begining database design solution. s.l.:wrox.

Sumathi.s & Esakkirajan.s, 2007. Fundamentals of Relational Database Management System. New York:
Springer.

Ranjan Kumar Mukhiya (BTEC HND/1st Semester) 89

You might also like