Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Database Assignment

Download as pdf or txt
Download as pdf or txt
You are on page 1of 65

D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Table of Contents

LO1[P1] ………………………………………………………………………………………6
Introduction ………………………………………………………………………………….6
Entity Relationship diagram ………………………………………………………………..6
Relationship diagram ………………………………………………………………………..7
Data dictionaary ……………………………………………………………………….…….8
Product Table …………………………………………………………….…………………..8
Customer Table ……………………………………………………………….………………8
Suppliers Table ……………………………………………………………………………….9
Purchase Table ………………………………………………………………………………..9
Sales Table ……………………………………………………………………….…………..9
Conclusion ……………………………………………………………………….………….9

LO2[p2] …………………………………………………………………………………….10

Introduction ……………………………………………………………………….……….10
Data Validation …………………………………………………………………….………10
Constraints …………………………………………………………………………...……..10
Primary Key ………………………………………………………………………….……..10
Foreign Key ……………………………………………………………………………........10
Unique Key ………………………………………………………………………………….10
Not-Null Key ………………………………………………………………………………..11
Implementing Necessary……………………………………………………………………11
Constraints……………………………………………………......…………………………11
Primary Key ……………………………………………………………….……..………….11
Foreign Key ………………………………………………………………………….………12
Unique Key …………………………………………………………………………………..12
Not-Null Key …………………………………………………………………………….......12
Evidence of user interface and data validation ……………….………………………….13
Snapshots of login page and error message ……………………………...……………….13
Snapshots of data entry forms …………………………………………………….……….13
Validate data querying multiple tables using joins ………………………………………14

Raghunandan Chaudhary (HND / First Semester)


1
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

LO2[p3] …………………………………………………………………………………….15

Introduction …………………………...……………………………………………………15
Insert statement …………………………...……………………………………………15
Update Statement ………………………………………………………………………18
Delete Statement ……………………………………………………………………….21
Select Statement ………………………………………………………………………..24
Conclusion …………………………………………………………………………….26

LO3[p4] ………………………………………………………………………………..26

Introduction …………………………………….………………………………….…26
Unit Testing …………………………………………………………………………..27
Integrated Testing ……………………………………………………………………27
Testing Of Stock Management System ……………………………………………..27
Insert ……………………………………………………………………………………27
Test log …………………………………………………………………………………29
Conclusion …………………………………………………………………………….30

LO4[p5] ………………………………………………………………………………….30

Introduction ……………………………………………………………………...………30
Technical Documentation ……………………………………………………….………30
Introduction ………………………………………………………………………………30
Overviews …………………………………………………………………………………..31
User Documentation …………………………………………………………………..……31
User Manual …………………………………………………………………………….…..31
Introduction …………………………………………………………………………….…..31
Login Form ………………………………………………………………………………....31
For Inserting Data ……………………………………………………….…………………31
For Updating Data ………………………………………………………...……………….32
For Deleting Data …………………………………………………………..………………32
Conclusion …………………………………………………………………………………..32

Raghunandan Chaudhary (HND / First Semester)


2
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

LO1[m1] …………………………………………………………………………...………..33

Introduction …………………………………………………………………………...……33
Choice of data …………………………………………………………………...………….33
Data Normalization and Validation …………………………………….…………………33
Normalization ………………………………………………………………………………33
Types of Normalization ……………………………………………………………………33
1st Normalization Form ……………………………………………………………………...34
2nd Normalization Form ……………………………………………………………………..34
3rd Normalization Form …………………………………………………………………...…35
Conclusion …………………………………………………………………………………..36

LO2[m2] ……………………………………………………………………….……………36

Introduction ………………………………………………………………………………...36
Implementation of system security ………………………………………………………..36
Implementation of T-SQL Programmability Features …………………………………..38
Stored Procedure …………………………………………………………………………….38
Database Trigger …………………………………………………………………………….39
Views ………………………………………………………………………………………...39
Functions …………………………………………………………………………………….39
Implementation of database maintenance ………………………………………………..40
Corruption Detection ………………………………………………………………………...40
Index Fragmentation ………………………………………………………………………...40
Backup and Restore Plan ………………………………………………………………….42
Full Backup ………………………………………………………………………………….42
Differential Backup ………………………………………………………………………….43
Conclusion …………………………………………………………………………………..44

LO2[m3] …………………………………………………………………………………….45
Introduction ………………………………………………………………………………...45
Choice of Tools ……………………………………………………………………………..45
Conclusion …………………………………………………………………………………..47
LO3[m4] ……………………………………………………………………………………47

Raghunandan Chaudhary (HND / First Semester)


3
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Introduction ………………………………………………………………………………...47
White Box Testing ………………………………………………………………………….47
Black Box Testing …………………………………………………………………………..47
Testing ………………………………………………………………………………………48
Choice of Data ……………………………………………………………..……………….49
Conclusion …………………………………………………………………………………..51
LO4[m5] ………………………………………………………………….…………………51
Introduction ………………………………………………………………………………...51
Techical Documentation …………………………………………………………………...51
Introduction ………………………………………………………………………………...51
Overviews ………………………………………………………………………………...…51
Choice of Tools ……………………………………………………………………………..52
Design of layout For Application …………………………………………………………52
Design Dictionary used for Application …………………………………………………..55
Algorithm for Application ………………………………………………….……………...56
Flow Chat For Application ……………………………………………….………………..56
Case Diagram For Application ……………………………………………………………56
Context Level DFD………………………………………………………………………….56
0-Level DFD ………………………………………………………………………………...56
1-level DFD ………………………………………………………………………………….57
2-level DFD ………………………………………………………………………………….57
Conclusion …………………………………………………………………………………..57

LO1[D1] ……………………………………………………………………………………..57
Introduction ………………………………………………………………………………...58
User Requirenments …………………………………………………………………………58
System requirenments ……………………………………………………………………….58
Benefits of SMS System ……………………………………………………………………58
Conclusion ………………………………………………………………………………….59
LO2 and LO3 [D2] ………………………………………………………………………...59
Introduction ……………………………………………………………………..………...59
Performance ……………………………………………………………………..…….…...60
Scalability ……………………………………………………………………………….…...60
High Availability……………………………………………………………………………60

Raghunandan Chaudhary (HND / First Semester)


4
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Security ………………………………………………………………………………….…...60
Features Improvements in PRMS ………………………………………………………...61
Conclusion ……..……………………………………………………………………………61

LO4[D3] ……………………………………………………………………………………..62
Introduction ………………………………………………………………………………...62
Software ……………………………………………………………………………………..62
Hardware …………………………………………………………………………………..62
Security …………………………………………………………………………..………...62
Conclusion …………………………………………………………………………………..63
References …………………………………………………………………………………..63

Raghunandan Chaudhary (HND / First Semester)


5
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

LO1 [p1]
Design a relational database system using appropriate design tools and techniques,
containing at least four interrelated tables, with clear statements of user & system
requirements.
Introduction:
A Relational Database Management System (RDMS) is one of the digital database
management system which is based on relational model of data introduced by E.F CODD in
1970s. In relational model, the data has been designed in the form of rows and columns. Each
row of relation shows the record and each column represents the attribute of the data. RDMS is
mainly used to manage the relational database. Relational database is also used to maintain the
security, accuracy, integrity and consistency of data. It represented the data in form of tuples.
Relational model contains the collection of objects or relations and set of operations to act on the
relations. Relational database used SQL as database query language. Nowadays, Relational
database is most commonly used for storing the data.

Since, there is a high possibility of duplication issue faced by the company having same name,
item and address and therefore, the company hired me to remove the duplication issue by
designing & developing a relational database system.

Entity Relationship Diagram:


An Entity Relationship Diagram is that diagram which displays the relationship of entity sets
stored in a database. ER diagrams help to explain the logical structure of databases. ER
diagrams are created based on 3 basic concepts: Entities, Attributes, and Relationships. ER
diagrams contain different symbols that use rectangles to represent entities, ovals to define
attributes and diamond shapes to represent relationships. At first, ER diagram looks like
flowchart.

The given below diagram is the ER diagram for the Stock Management System:

Raghunandan Chaudhary (HND / First Semester)


6
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

FIG: ER Diagram of Stock Management System

Relationship Diagram:

The interrelationship of graph or flowchart system which describes the structure of database
is known as the relationship diagram. ER model is one of the blueprint or design that helps to

Raghunandan Chaudhary (HND / First Semester)


7
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

develop the database. The diagram of ER model shows the complete logical structure of a
database. ER model is a high level conceptual data model diagram which helps to
systematically analyze data requirements to produce a well-designed database. ER model
represents the real world entities and relationship between circumstances and end results. ER
diagram is used to visually represent data objects. Such diagrams are typically used in first
stage of information system design like to describe information needs to be stored in a
database during requirements analysis. It is one of the most widely used design model to
design database.

Data Dictionary:

A Data Dictionary is a gathering of names, definitions and attributes about the data elements
that used in a database system or a part of research. A data dictionary also provides metadata
about data elements.

Product Table:

Customer Table:

Raghunandan Chaudhary (HND / First Semester)


8
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Supplier Table:

Purchase Table:

Sales Table:

Conclusion:
In this learning outcomes I have concluded that what kind of database is good for the
company. I have clearly explained about the Entity Relationship Diagram, Relationship
Diagram which describe the connection between the different tables and their information
and therefore the proper database design that demonstrate the framework necessary for the
company.

Raghunandan Chaudhary (HND / First Semester)


9
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

LO2 [ p2 ]

Develop the database system with evidence of user interface, output, data validations
and querying across multiple tables.

Introduction:

In this task I will describe the requirements like primary key, foreign key, unique key and not
null key. Furthermore, I will also clarify the user interface, output, data validation and joins
like inward join, left join, right join, external join etc.

Data Validation:

Data validation is the process of establishing the accuracy and quality of data that
implemented by building several checks into a system which set the logical consistency of
input and stored data.

Constraints:

Primary key:

Primary key is one of the special key of relational database which is the combination of
columns designated to uniquely identify each table record. A primary key is used as a unique
identifier. This key concept is critical to an efficient relational database.

Foreign key:

Foreign key is the group of columns in a relational database table and a set of attributes in a
table which refers to the primary key of another table that provides link between these two
tables. Foreign keys and their implementation are more complex than primary keys.

Unique key:

Unique key is the set of attributes within a relational database table which the system verifies
the each set of values is unique. Unique key provides the means for the database user and
application software to identify, access and update information in a database table. Unique
key is also known as the candidate key.

Raghunandan Chaudhary (HND / First Semester)


10
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Not Null key:

The Not Null key is a restriction placed on a column in a relational database table. It enforces
the condition that, in that column, every row of data must contain a value - it cannot be left
blank during insert or update operations. If this column is left blank, this will produce an
error message and the entire insert or update operation will fail.

Implementing Necessary Constraints:

Primary key:

Product Table
create table Product(
ProductID uniqueidentifier PRIMARY KEY);

Customer Table
create table Customer(
CustomerID uniqueidentifier primary key);

Supplier Table
create table Supplier(
SupplierID uniqueidentifier primary key);

Purchase Table
create table Purchase(
PurchaseID uniqueidentifier primary key);

Sales Table
create table Sales(
SalesID uniqueidentifier primary key);

Raghunandan Chaudhary (HND / First Semester)


11
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Foreign key:

Unique Key:
Product Table
CREATE TABLE Product (
ProductID uniqueidentifier UNIQUE);

Customer Table
CREATE TABLE Customer (
CustomerID uniqueidentifier UNIQUE);

Supplier Table
CREATE TABLE Supplier (
SupplierID uniqueidentifier UNIQUE);

Purchase Table
CREATE TABLE Purchase (
PurchaseID uniqueidentifier UNIQUE);

Sales Table
CREATE TABLE Sales (
SalesID uniqueidentifier UNIQUE);

Not Null Key:

Product Table
CREATE TABLE Product (
ProductID uniqueidentifier NOT NULL);

Customer Table
CREATE TABLE Customer (
CustomerID uniqueidentifier NOT NULL);

Raghunandan Chaudhary (HND / First Semester)


12
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Supplier Table
CREATE TABLE Supplier (
SupplierID uniqueidentifier NOT NULL);

Purchase Table
CREATE TABLE Purchase (
PurchaseID uniqueidentifier NOT NULL);

Sales Table
CREATE TABLE Sales (
SalesID uniqueidentifier NOT NULL);

Evidence of user interface and data validation


Snapshots of login page and error message:

If wrong user name or password is entered, it does not let you to login or open and give the
error message “Invalid username or password”.

Snapshots of data entry forms:


 Drop down validation

Raghunandan Chaudhary (HND / First Semester)


13
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Drop down validation enables you to get the substance that is recorded in it like that of "Size"
as said above in the figure.

 Field validation with messages

Validate data querying multiple tables using joins:

 Inner Join:

Inner join creates a new result table by combining column values of two tables (A and
B) based upon the join-predicate.

 Left Join:

The result of a left join for tables A and B always contains all rows of the "left" table
(A), even if the join-condition does not find any matching row in the "right" table (B).

select ProductName,s.SalesDate,(C.CustomerName +' '+ C.MiddleName +' '+ C.LastName)as


CustomerName from Product As p
Left Outer Join Sales As s
on p.ProductID = s.ProductID
Left Outer Join Customer as c
on s.CustomerID = c.CustomerID

Raghunandan Chaudhary (HND / First Semester)


14
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

LO2 [p3]
Implement a query language into the relational database system.
Introduction
In this task, I will explore about SQL and its generally utilized statements for accessing and
manipulating the database. For example; select, create, insert, update and delete. In this task, I
will also study about the portion of SQL declaration in back-end and front-end.

SQL:

SQL stands for Structured Query Language. SQL is used for accessing and manipulating the
database. According to ANSI, ‘SQL is the standard language for Relational Database
Management System (RDBMS). SQL presentation are used to carry out the tasks such as
update data on a database or retrieve data from a database. Some of the RDBMS that are used
in SQL are; Oracle, MSSQL server, Sybase etc. The commands which used while developing
database are: create, select, insert, update and delete. By the helping of SQL we can create
and drop databases & tables. SQL also offers to use the function in a database that create a
view and stored procedure.

Insert Statement:

Insert statement is the command of SQL server which are used to insert the data in the table
of database.

Syntax:
Insert into <tablename>

Values (expression1, expression2, …..),

(expression1, expression2, …..),

………

Examples:

Product Table

Query in SQL

Raghunandan Chaudhary (HND / First Semester)


15
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

insert into Product


values(newid(),'Iphone 10','Normal','Iphone','PCS','10','100'),
(newid(),'Redmi 9','Normal','Redmi','PKT','20','10')
Front End

Customer Table
Query in SQL

insert into Customer


values(newid(),'Raghunandan','','Chaudhary','Kathmandu','9814852115'),
(newid(),'Rani','Kumari','Yadav','Baneshwor','9812834957')

Front End
private void button1_Click(object sender, EventArgs e)
{
if (txtFirstName.Text == "")
{
MessageBox.Show("FirstName is required");
return;
}
conn.Open();

String query = "Insert into


Customers(CustomerID,FirstName,MiddleName,LastName,CustomerAddress,CustomerContact)
values(newid(),'" + txtFirstName.Text + "','" + txtMiddleName.Text + "','" +
txtLastName.Text + "','" + txtCustomerAddress.Text + "','" + txtCustomerContact.Text +
"')";
SqlDataAdapter sda = new SqlDataAdapter(query, conn);
sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("Customers Inserted Successfully !!!");
txtFirstName.Text = "";
txtMiddleName.Text = "";
txtLastName.Text = "";
txtCustomerAddress.Text = "";
txtCustomerContact.Text = "";
conn.Close();
dataLoad();
}

Supplier Table
Query in SQL

Raghunandan Chaudhary (HND / First Semester)


16
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Insert into Supplier


values(newid(),'Singh Stores','janakpur','01464829')

Front End
private void btnInsert_Click(object sender, EventArgs e)
{
if (txtSupplierName.Text == "")
{
MessageBox.Show("SupplierName is required");
return;
}
conn.Open();

String query = "Insert into


Supplier(SupplierID,SupplierName,SupplierAddress,SupplierContact) values(newid(),'" +
txtSupplierName.Text + "','" + txtSupplierAddress.Text + "','" +
txtSupplierContact.Text + "')";
SqlDataAdapter sda = new SqlDataAdapter(query, conn);
sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("Supplier Inserted Successfully !!!");
txtSupplierName.Text = "";
txtSupplierAddress.Text = "";
txtSupplierContact.Text = "";
conn.Close();
dataLoad();
}

Purchase Table
Query in SQL

Insert into Purchase


values (newid(),newid(),'2021-08-19','50','200',newid())

Front End
private void btnInsert_Click(object sender, EventArgs e)
{

conn.Open();

String query = "Insert into


Purchase(PurchaseID,ProductID,PurchasedOn,PurchasedRate,PurchaseQTY,SupplierID)
values(newid(),'" + txtProductID.Text + "','" + txtPurchasedOn.Text + "','" +
txtPurchasedRate.Text + "','" + txtPurchaseQTY.Text + "','" + txtSupplierID.Text +
"')";
SqlDataAdapter sda = new SqlDataAdapter(query, conn);
sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("PurchaseDetail Inserted Successfully !!!");
txtProductID.Text = "";
txtPurchasedOn.Text = "";
txtPurchasedRate.Text = "";
txtPurchaseQTY.Text = "";
txtSupplierID.Text = "";
conn.Close();
dataLoad();
}

Raghunandan Chaudhary (HND / First Semester)


17
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Sales Table
Query in SQL

insert into Sales


values (newid(),newid(),'2021-08-20','34',newid())

Front End
private void btnInsert_Click(object sender, EventArgs e)
{
conn.Open();

String query = "Insert into


Sales(SalesID,ProductID,SalesDate,SalesQTY,CustomerID) values(newid(),'" +
txtProductID.Text + "','" + txtSalesDate.Text + "','" + txtSalesQTY.Text + "','" +
txtCustomerID.Text + "')";
SqlDataAdapter sda = new SqlDataAdapter(query, conn);
sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("SalesDetail Inserted Successfully !!!");
txtProductID.Text = "";
txtSalesDate.Text = "";
txtSalesQTY.Text = "";
txtCustomerID.Text = "";
conn.Close();
dataLoad();

Update Statement:
Update statement is that statement or command of SQL server which used in updating the
data while making the database.

Syntax:
Update <tablename>

Set< column1> = value1, column2 = value2, ..

Where condition

Examples:
Product Table
Query in SQL
update Product
set Model = 'Iphone'
where ProductName = 'Iphone 12'

Front End
private void btnUpdate_Click(object sender, EventArgs e)
{
conn.Open();

Raghunandan Chaudhary (HND / First Semester)


18
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

String query = "Update Product set ProductName = '" + txtProductName.Text


+ "', Brand ='" + txtBrand.Text + "', Size ='" + txtSize.Text + "', UOM ='" +
txtUOM.Text + "', MinStockLevel ='" + txtMinStock.Text + "', SalesPrice ='" +
txtSalesPrice.Text + "' where ProductID = '"+txtProductId.Text+"'";
MessageBox.Show(query);

SqlDataAdapter sda = new SqlDataAdapter(query, conn);


sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("Product Updated Successfully !!!");
txtProductName.Text = "";
txtSize.Text = "";
txtBrand.Text = "";
txtMinStock.Text = "";
txtUOM.Text = "";
txtSalesPrice.Text = "";
conn.Close();
dataLoad();
}

Customer Table
Query in SQL

update Customer
set LastName = 'Bhandari'
where CustomerName = 'Saroz'

Front End
private void button2_Click(object sender, EventArgs e)
{
conn.Open();

String query = "Update Customers set FirstName = '" + txtFirstName.Text +


"', MiddleName ='" + txtMiddleName.Text + "', LastName ='" + txtLastName.Text + "',
CustomerAddress ='" + txtCustomerAddress.Text + "', CustomerContact ='" +
txtCustomerContact.Text + "' where CustomerID = '" + txtCustomerID.Text + "'";
MessageBox.Show(query);

SqlDataAdapter sda = new SqlDataAdapter(query, conn);


sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("Customers Updated Successfully !!!");
txtFirstName.Text = "";
txtMiddleName.Text = "";
txtLastName.Text = "";
txtCustomerAddress.Text = "";
txtCustomerContact.Text = "";
conn.Close();
dataLoad();
}
Supplier Table
Query in SQL
update Supplier
set SupplierAddress = 'hetauda'
where SupplierName = 'tip top Supliers'

Front End
private void btnUpdate_Click(object sender, EventArgs e)
{
conn.Open();

Raghunandan Chaudhary (HND / First Semester)


19
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

String query = "Update Supplier set SupplierName = '" +


txtSupplierName.Text + "', SupplierAddress ='" + txtSupplierAddress.Text + "',
SupplierContact ='" + txtSupplierContact.Text + "' where SupplierID = '" +
txtSupplierID.Text + "'";
MessageBox.Show(query);

SqlDataAdapter sda = new SqlDataAdapter(query, conn);


sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("Supplier Updated Successfully !!!");
txtSupplierName.Text = "";
txtSupplierAddress.Text = "";
txtSupplierContact.Text = "";
conn.Close();
dataLoad();
}
Purchase Table
Query in SQL

update Purchase
set PurchaseRate = '90'
where PurchaseQty = '40'

Front End
private void btnUpdate_Click(object sender, EventArgs e)
{
conn.Open();

String query = "Update Purchase set ProductID = '" + txtProductID.Text +


"', PurchasedOn ='" + txtPurchasedOn.Text + "', PurchasedRate ='" +
txtPurchasedRate.Text + "', PurchaseQTY ='" + txtPurchaseQTY.Text + "', SupplierID ='"
+ txtSupplierID.Text + "' where PurchaseID = '" + txtPurchaseID.Text + "'";
MessageBox.Show(query);

SqlDataAdapter sda = new SqlDataAdapter(query, conn);


sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("Product Updated Successfully !!!");
txtProductID.Text = "";
txtPurchasedOn.Text = "";
txtPurchasedRate.Text = "";
txtPurchaseQTY.Text = "";
txtSupplierID.Text = "";

conn.Close();
dataLoad();
}

Sales Table
Query in SQL

update Sales
set SalesDate = '2021-08-18'
where SalesQty = '3'

Front End
private void btnUpdate_Click(object sender, EventArgs e)
{
conn.Open();

Raghunandan Chaudhary (HND / First Semester)


20
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

String query = "Update Sales set ProductID = '" + txtProductID.Text + "',


SalesDate ='" + txtSalesDate.Text + "', SalesQTY ='" + txtSalesQTY.Text + "',
CustomerID ='" + txtCustomerID.Text + "' where SalesID = '" + txtSalesID.Text + "'";
MessageBox.Show(query);

SqlDataAdapter sda = new SqlDataAdapter(query, conn);


sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("SalesDetail Updated Successfully !!!");
txtProductID.Text = "";
txtSalesDate.Text = "";
txtSalesQTY.Text = "";
txtCustomerID.Text = "";
conn.Close();
dataLoad();
}
Delete Statement:

Delete statement is that statement or command which are used for deleting the data in the
table of database.

Syntax:

Delete from <tablename>


Where condition
Examples:

Product Table
Query in SQL
Delete from Product
where ProductName = 'mobile'

Front End
private void btnDelete_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("Do you want delete selected Row?",
"Important",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
conn.Open();

String query = "Delete from Product where ProductID = '" +


txtProductId.Text + "'";
MessageBox.Show(query);

SqlDataAdapter sda = new SqlDataAdapter(query, conn);


sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("Product Deleted Successfully !!!");
txtProductName.Text = "";
txtSize.Text = "";
txtBrand.Text = "";
txtMinStock.Text = "";
txtUOM.Text = "";

Raghunandan Chaudhary (HND / First Semester)


21
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

txtSalesPrice.Text = "";
conn.Close();
dataLoad();
}
else
{
dataLoad();
}

Customer Table
Query in SQL
delete from Customer
where LastName = 'Chaudhary'

Front End
private void btnDelete_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("Do you want delete selected Row?",
"Important",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
conn.Open();

String query = "Delete from Customers where CustomerID = '" +


txtCustomerID.Text + "'";
MessageBox.Show(query);

SqlDataAdapter sda = new SqlDataAdapter(query, conn);


sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("Customers Deleted Successfully !!!");
txtFirstName.Text = "";
txtMiddleName.Text = "";
txtLastName.Text = "";
txtCustomerAddress.Text = "";
txtCustomerContact.Text = "";
conn.Close();
dataLoad();
}
else
{
dataLoad();
}
}
Supplier Table
Query in SQL

delete from Supplier


where SupplierName = 'kantipur Traders'

Front End

private void btnDelete_Click(object sender, EventArgs e)


{

Raghunandan Chaudhary (HND / First Semester)


22
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

DialogResult result = MessageBox.Show("Do you want delete selected Row?",


"Important",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
conn.Open();

String query = "Delete from Supplier where SupplierID = '" +


txtSupplierID.Text + "'";
MessageBox.Show(query);

SqlDataAdapter sda = new SqlDataAdapter(query, conn);


sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("Supplier Deleted Successfully !!!");
txtSupplierName.Text = "";
txtSupplierAddress.Text = "";
txtSupplierContact.Text = "";
conn.Close();
dataLoad();
}
else
{
dataLoad();
}
}

Purchase Table
Query in SQL

delete from Purchase


where PurchaseRate = '200'

Front End
private void btnDelete_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("Do you want delete selected Row?",
"Important",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
conn.Open();

String query = "Delete from Purchase where PurchaseID = '" +


txtPurchaseID.Text + "'";
MessageBox.Show(query);

SqlDataAdapter sda = new SqlDataAdapter(query, conn);


sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("Product Deleted Successfully !!!");
txtProductID.Text = "";
txtPurchasedOn.Text = "";
txtPurchasedRate.Text = "";
txtPurchaseQTY.Text = "";
txtSupplierID.Text = "";

conn.Close();
dataLoad();
}
else

Raghunandan Chaudhary (HND / First Semester)


23
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

{
dataLoad();
}
}

Sales Table
Query in SQL

delete from Sales


where SalesQty = '30'

Front End
private void btnDelete_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("Do you want delete selected Row?",
"Important",
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
conn.Open();

String query = "Delete from Sales where SalesID = '" + txtSalesID.Text


+ "'";
MessageBox.Show(query);

SqlDataAdapter sda = new SqlDataAdapter(query, conn);


sda.SelectCommand.ExecuteNonQuery();
MessageBox.Show("SalesDetail Deleted Successfully !!!");
txtProductID.Text = "";
txtSalesDate.Text = "";
txtSalesQTY.Text = "";
txtCustomerID.Text = "";

conn.Close();
dataLoad();
}
else
{
dataLoad();
}
}

Select statement:

Select statement is that command that can be used to select the data in the table of database.

Syntax:
Select* from <tablename>

Product Table
Query in SQL
select*from Product

Front End
public void dataLoad()

Raghunandan Chaudhary (HND / First Semester)


24
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

{
conn.Open();
String query = "Select * from Product";
SqlDataAdapter sda = new SqlDataAdapter(query, conn);
DataTable dt = new DataTable();
sda.Fill(dt);

dataGridView1.DataSource = dt;
conn.Close();
}

Customer Table
Query in SQL

select*from Customer

Front End
public void dataLoad()
{
conn.Open();
String query = "Select * from Customers";
SqlDataAdapter sda = new SqlDataAdapter(query, conn);
DataTable dt = new DataTable();
sda.Fill(dt);

dataGridView1.DataSource = dt;
conn.Close();
}

Supplier Table
Query in SQL

select *from Supplier

Front End
public void dataLoad()
{
conn.Open();
String query = "Select * from Supplier";
SqlDataAdapter sda = new SqlDataAdapter(query, conn);
DataTable dt = new DataTable();
sda.Fill(dt);

dataGridView1.DataSource = dt;
conn.Close();
}

Purchase Table
Query in SQL

select *from Purchase

Front End
public void dataLoad()
{
conn.Open();
String query = "Select * from Purchase";
SqlDataAdapter sda = new SqlDataAdapter(query, conn);

Raghunandan Chaudhary (HND / First Semester)


25
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

DataTable dt = new DataTable();


sda.Fill(dt);

dataGridView1.DataSource = dt;
conn.Close();
}

Sales Table
Query in SQL

select *from Sales

Front End
public void dataLoad()
{
conn.Open();
String query = "Select * from Sales";
SqlDataAdapter sda = new SqlDataAdapter(query, conn);
DataTable dt = new DataTable();
sda.Fill(dt);

dataGridView1.DataSource = dt;
conn.Close();
}

Conclusion:

I concluded that, I briefly explained about the SQL and SQL commands in a social database.
I have also studied about the SQL commands or statements such as Insert, update, select and
delete declaration. I have also concluded that the case of both back end and front end as well
as query languages of SQL.

LO3 [p4]

Test the system against user and system requirements.

Introduction

Database Testing is one of the strategy of the database management system which helps to
analyze the errors in the database and then it remove the errors. It must be the tester have
strong background in database server and SQL concepts to perform the back end testing in
database. Many kinds of implementation & integration errors may occur in large database
systems, which negatively affect the system’s performance and therefore testing is used to
secure the data from the errors in the database management system.

In this task I will test my framework against the client with a portion of the testing tasks
which are explained below;

Raghunandan Chaudhary (HND / First Semester)


26
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Unit Testing:

Unit testing is the application or software testing method by which the individual units of
source code which sets the computer program modules with related to control data, store
procedures that are tested to determine whether they are fit to use.

Integrated Testing:

Integrated testing is those strategy of software testing in which application modules are
combined and tested as a group. It is conducted to evaluate the compliance of a system with
specified functional requirements. It occurs after unit testing and before validation testing.

Testing of Stock Management System:


I have done the testing on the system. Now, I am going to present the snapshot of the testing
that I have done.

1. Insert
I have inserted the product with the following values:
ProductName= Iphone
Brand=IPHONE
Model= Iphone 10
UOM = KTM
MINStockLevel = 50
SalesPrice = 80000
Front End

Raghunandan Chaudhary (HND / First Semester)


27
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Back End
After inserting the values in the front end, the values were inserted successfully in the back
end as well.

I have updated the Brand of following values are:


ProductName = Iphone
Brand = IPHONE
Model= Iphone 10
UOM = ktm
MINStockLevel = 50
SalesPrice = 80000

Back End
After updating the value, I checked in front-end, the value was updated there successfully
too.

Raghunandan Chaudhary (HND / First Semester)


28
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Test Log:
Test Test Expected result Actual result
Date description
12th Insert button The dialogue
may box with
message
“Product
Inserted
Successfully!”

12th Delete The dialogue of


may button confirmation
should pop up
before the
dialogue box
with query and
message of
“Product Deleted
Successfully!!!”.

12th Update The dialogue


may button box with the
query of update
is supposed to

Raghunandan Chaudhary (HND / First Semester)


29
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

pop up before
the dialogue box
with message
“Product
Updated
Successfully!!!”.

Conclusion:

In this task, I concluded that I have tested the insert, update and delete statement of Product
table and provided the evidence of testing in the form of test log maintaining test date, test
description, expected result and actual result in table.

LO4 [p5]

Produce technical and user documentation.

Introduction

I have made Item sales Record for the company which helps the manager and staff of
company to get the data and information about item, deals, supplier, buyer and clients. In this
assignment I will provide specialized and client documentation to handle the database
system.

Technical Documentation:

Introduction

Technical documentation is the generic term or documents which describe the users,
functionality, creation or architecture of a product or system. The main goal to achieve the
effective documentation is to protect that the developers are headed in the same direction to
fulfill the objectives of the project and full of documentation types exist.

Over-view:

Raghunandan Chaudhary (HND / First Semester)


30
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

I have made five tables in a program of database. The five tables that are made in program
are tables of item, supplier, clients, deals and buy. The different five tables contains the
information that are identified with the individual table like item table consist the information
like item name, item Id and likewise other tables comprises information which are identified.

User Documentation:

User documentation refers to the documentation for a product or service provided to the end
users. The user documentation is designed to assist end users to use the product or service.
This is often referred to as user assistance. The user documentation is a part of the overall
product delivered to the customer.

User Manual:

User Manual is also called as the User Guide which is considered to help the users in using
the particular product or application that usually written by the developers or company’s
staff. Most of the user manual contains both written guide and associated images.

After short preparation of the program I will explain how the program is run and how might
you perform typical task inside the program.

Login form:

At first when you open the software or application, a login form will be appear. You are
required to login first to open the types of item, clients, buy, deals & supplier. You must have
to login the application with the username and complex key. If there is any wrong while
filling the username and password then the application will not open and it gives the error
message that Invalid username and password. And again you have to give the correct
username and password. When it open the application then you have to refresh, insert or
update the information in various table by clicking in the menu if you like.

For inserting data:

For inserting information, you are required to login first with correct username and complex
key. When it open the application you can pick the table where you need to insert the
information. To insert the information, you are required to insert the substantial qualities in
the individual field. On the off chance that qualities are not inserted in the fields like

Raghunandan Chaudhary (HND / First Semester)


31
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

"ProductName", "CustomerName" and "SupplierName", discussion box will show up with


message "ProductName is required", "CustomerName is required" and "SupplierName is
required". While entering the substantial information in individual field click catch "Insert".
In the wake of tapping the insert catch exchange box with the defence message of inserting
will show up.

For updating data:

In this situation, we are required to first login with correct username and password for
updating the information or data. When it open the application then we have to pick that table
where we need to update the data. For updating the information, we have to choose that field
where we need to update the data by clicking catch “update”. In the wake of tapping the
update button, the exchange box with the inquiry of refresh will be seen. After refreshing, if
there is “alright” then the confirmation message of updating will show up.

For deleting data:

For deleting the data or information from the table, we are required to login first. Inserting the
correct username and complex key, we have to get that table where we need to delete the data
from the table. We have to first choose that information where we need to delete the data.
After picking the information there will be affirmation message shown up that “would you
like to delete selected row” with decision “yes or no”. In that condition if we have to erase
the information then we have to click ‘Yes’ and if not then click ‘No’.

Conclusion:

In this learning outcomes, I have concluded that I have briefly explained about two
documentation i.e. Technical and User Documentation. Technical documentation refers to the
documents which describe the use, function of the data in that way which easy to read, usable
and helpful for the people. Likewise, User documentation is that documentation which
developed to assist the end users to use the product or service and it is also the part of the
overall product delivered to the customer.

Raghunandan Chaudhary (HND / First Semester)


32
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

LO1 [M1]

Produce a comprehensive design for a fully functional system which


includes interface and output designs, data validations and data
normalization.

Introduction:

Data validation is the technique or method which checks the accuracy and quality of the data.
It also checks for the integrity and validity of data that is being inputted to different software
and its components. Data validation ensures that the data complies with the requirements and
quality benchmarks.

Choice of tools:

IDE; Visual Studio:

Visual Studio is an integrated development environment (IDE) that used to develop computer
programs as well as websites, web apps, web services and mobile apps. Visual studio can also
produce the both native code and managed code. It includes a code editor supporting the code
completion component as well as code refactoring.

Data Normalization and Validation:

Data normalization is the process of structuring a database, usually a relational database, in


accordance with a series of so-called normal forms in order to reduce data redundancy and
improve data integrity. It was first proposed by Edgar F. Codd as part of his relational model.
The data in information is regularly refreshed, erased, questioned or moved and it is
especially essential to check the accuracy of data or information. And in this way, applying
the data approval makes information a great deal of dependable and accommodating.

Normalization:

Normalization is the process of rationalizing the data in a database that meets two basic
requirements i.e. there is no discharge of data, where all data is kept in only one place and
other are data dependencies are logical, where all related data items are stored together. It
allows databases to take up as little disk space as possible resulting in increased performance.

Types of Normalization:

Raghunandan Chaudhary (HND / First Semester)


33
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

1st Normalization form:

An entity is in the first normal form if it contains no repeating groups. In relational terms, a
table is in the first normal form if it contains no repeating columns. Repeating columns make
your data less flexible, waste disk space, and makes it more difficult to search for data. The
rules which done in 1NF are:

 The table cells must be of a single value.


 Eliminate repeating groups in individual tables.
 Create a separate table for each set of related data.
 Identify each set of related data with a primary key.

Since the table specified above is in the non- normalized form so the table which I given
below is in the 1st normalization form are:

2nd Normalization form:

A relation is in 2NF if it is in 1NF and every non-key attribute is fully dependent on each
candidate key of the relation. The rules or activities which done in 2nd NF are:

 Remove Partial Dependencies.


 The value of one attribute in a table is determined entirely by the value of another.
 A type of functional dependency where an attribute is functionally dependent on only
part of the primary key (primary key must be a composite key).

Raghunandan Chaudhary (HND / First Semester)


34
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

 Create a separate table with the functionally dependent data and the part of the key on
which it depends. The tables created at this step will usually contain descriptions of
resources.

The table which I given below is in the form of 2nd normalization are:

3rd Normalization form:


A relation is in third normal form if it is in 2NF and every non-key attribute of the relation is
non-transitively dependent on each candidate key of the relation. The following rules that
done in 3rd NF are:

 Remove transitive dependencies.


 Transitive Dependency A type of functional dependency where an attribute is
functionally dependent on an attribute other than the primary key. Thus its value is
only indirectly determined by the primary key.
 Create a separate table containing the attribute and the fields that are functionally
dependent on it. The tables created at this step will usually contain descriptions of
either resources or agents. Keep a copy of the key attribute in the original file.

The following table of 3rd NF are given below:

Raghunandan Chaudhary (HND / First Semester)


35
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Conclusion:
In this task I concluded that I have clarified about comprehensive design for the fully
functional system which includes the data validation, data normalization and the information
approval, & standardization. I have also describe the standardized the customer table up to
the 3rd normalization form.

LO2 [M2]
Implement a fully functional database system which includes system
security and database maintenance.
Introduction:
I am going to implement the fully functional database system by including the system
security, database maintenance and T-SQL programming features.

Implementation of system security:


We can implement the system security through different engines and some them are given
below are:
 Windows Authentication:

To connect to the database through Windows Authentication Mode you are not required to
enter password. You can easily connect to the database.

Raghunandan Chaudhary (HND / First Semester)


36
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

 SQL Server Authentication:

To connect the database through SQL Server Authentication it’s mandatory to create user and
password. The authentication mode provides more security to the database since to it requires
password to connect to the database through this mode. So, if you don’t have the correct
password you can’t connect which helps to keep the data secured

 Password Policy:

Raghunandan Chaudhary (HND / First Semester)


37
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

The security gave by a password framework relies upon the passwords being kept mystery
consistently. In this way, a secret key is helpless against bargain at whatever point it is
utilized, put away, or even known.

Implementation of T-SQL Programmability features:


Stored Procedure:
A stored procedure is a group of one or more pre-compiled SQL statements into a logical unit
that stored as an object inside the database server which is subroutine or a subprogram in the
common computing language that has been created and stored in the database and each
procedure in SQL Server always contains a name, parameter lists, and Transact-SQL
statements.

Query for stored procedure:

Create Procedure [dbo].[USP_ValidateUser]


@UserName varchar(200), @password varchar(200),@status varchar(200) Output
AS
Begin
Declare @DBUser varchar(50) = null
Open symmetric key UserInfo_key
Decryption by certificate SMS_cert

Raghunandan Chaudhary (HND / First Semester)


38
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

select @DBUser = FirstName + MiddleName+LAstName from UserInfo


where UserName = @UserName
and Convert (varchar,Decryptbykey(password))=@password
Close symmetric key UserInfo_key

if @DBUser is not null

set @status = 'Success'


else
set @status = 'Invalid username or password'
select @status

End

Database trigger:
A database trigger is the special stored procedure that is run when specific actions occur
within a database. Most of the triggers are defined to run when changes are made to a table’s
data. Triggers can be defined to run instead of or after DML (Data Manipulation Language)
actions such as INSERT, UPDATE, and DELETE.
Triggers help the database designer ensure certain actions, such as maintaining an audit file,
are completed regardless of which program or user makes changes to the data. For ex;
create trigger Trig_auditlog on Customer
after delete
as
begin
insert into Customer_Audit
select *,'Delete',SYSTEM_USER,getdate() from deleted
end
Views:

A view is a virtual table whose contents are defined by a query which the table consists of a
set of named columns and rows of data. A view acts as a filter on the underlying tables
referenced in the view. The query that defines the view can be from one or more tables or
from other views in the current or other databases.
Query for view are:
create view vw_product
as
select ProductID,ProductName,Size,Brand,UOM from Product

Functions:
Query in SQL

CREATE FUNCTION UDF_GetProductName(@ProductID uniqueIdentifier)


Returns varchar(200)
as
Begin

Raghunandan Chaudhary (HND / First Semester)


39
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Declare @ProductName varchar(200)

SELECT @ProductName = ProductName from Product


where ProductID = @ProductID

return @ProductName

End

Implementation of Database Maintenance:

Corruption Detection
SQL Query

dbcc checkDb (SMS)

Result

Index Fragmentation:
Stored Procedure
Code

Raghunandan Chaudhary (HND / First Semester)


40
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Result

 Database Trigger
Code

Result

Raghunandan Chaudhary (HND / First Semester)


41
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Backup and restore plan:

The SQL Server backup and restore plan provides an essential safeguard for protecting
critical data stored in your SQL Server databases. For minimizing the risk of catastrophic
data loss, we need to back up your databases to preserve modifications to your data on a
regular basis. A well-planned backup and restore strategy helps protect databases against data
loss caused by a variety of failures. Through testing the strategy by restoring a set of backups
and then recovering the database effectively.

Full Backup

Full Back-up is the process of restoring the completely data which protect the data from the
losses. It totally backup the databases and also the part of the transaction log so the database
can be restored.

Raghunandan Chaudhary (HND / First Semester)


42
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Differential Backup
The way differential backup work is that they will back up all degrees that have changed
since the last full backup. In the event that you complete a full backup and after that complete
a differential backup, the differential backup will contain just the degrees that have changed.
On the off chance that you hold up some time and do another differential backup, this new
differential backup will contain all degrees that have changed since the last full back up.

Raghunandan Chaudhary (HND / First Semester)


43
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Conclusion:
In this task I have demonstrated that I have implemented the fully functional database system
which is involving in the system security and database maintenance like confirmation mode,
put away method, database triggers, capacity, sees and the database upkeep, for example, log
document, information record administration, reestablish, reinforcement, debasement
location, reestablish and the list features. I have also describe the functional database system
along with the pictures of each and every functions of databases.

Raghunandan Chaudhary (HND / First Semester)


44
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

LO2 [M3]

Assess whether meaningful data has been extracted through the use of
query tools to produce appropriate management information.

Introduction:

In this learning outcomes, I am going to produce the product wise stock report, sales report,
supplier wise purchase report which shows the meaningful data that has been extracted
through the use of query tools. And also I produce the appropriate management information
that also helps to give the meaningful data or information.

 Product wise Stock report


 Query

select
ProductName,
Brand,
PD.PurchaseQTY,
S.SalesQTY,
P.MINStockLevel,
PD.PurchaseQTy-S.SalesQTY As RemainingStock
from Product As P
Inner Join Purchase As PD on P.ProductID=PD.ProductID
LEFT OUTER JOIN Sales As S on S.ProductID=P.ProductID

 Snapshot of Result

 Periodical Sales Report


 Query

Raghunandan Chaudhary (HND / First Semester)


45
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

select ProductName,s.SalesDate, s.SalesQty, (C.CustomerName +' '+ C.MiddleName +'


'+ C.LastName)as Customer, pu.PurchaseQTy-s.SalesQTY As RemainingStock from
Product As p
Right Outer Join Sales As s
on p.ProductID = s.ProductID
Right Outer Join Customer as c
on s.CustomerID = c.CustomerID
left outer Join Purchase as pu
on p.ProductID = pu.ProductID

 Snapshot of Result

 Product wise margin report


 Query
 Supplier wise purchase details
 Query

select su.SupplierName, ProductName, pu.PurchaseRate, pu.PurchaseQty from Product


as p
Right outer join Purchase as pu
on p.ProductID = pu.ProductID
right outer join Supplier as su
on pu.SupplierID = su.SupplierID

 Snapshot of Result

Raghunandan Chaudhary (HND / First Semester)


46
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Conclusion:

In this task, I have demonstrated the item stock report according the sales, purchase and
supplier which gives the accurate meaning of items that has sold, purchase, supply and the
item at which rate was obtained from the provider and therefore it produce the appropriate
management information or data of the database.

LO3 [M4]

Assess the effectiveness of the testing, including an explanation of the


choice of test data used.

Introduction:

Software Testing is the process of evaluating a system or its components with the intent to
find whether it satisfies the specified requirements or not. Software testing is also the process
of verifying a system with the purpose of identifying any errors, gaps or missing requirement
versus the actual requirement. Software testing is broadly categorized into two types -
functional testing and non-functional testing. Testing is executing a system in order to identify
any gaps, errors, or missing requirements in contrary to the actual requirements. There are two
sorts of testing i.e. White box testing and Black box testing.

White Box Testing:

White box testing techniques that analyze the internal structures the used data structures,
internal design, code structure and the working of the software rather than just the
functionality as in black box testing. It is also called glass box testing or clear box testing or
structural testing. In this technique, the aim is to traverse all statement at least once. Hence,
each line of code is tested. In case of a flowchart, every node must be traversed at least once.
Since all lines of code are covered, helps in pointing out faulty code.

Black Box Testing:

Black box testing is a type of software testing in which the functionality of the software is
not known. The testing is done without the internal knowledge of the products. It can be
referred as outer or external software testing. This testing can be initiated on the basis of
requirement specifications document. It is applicable to the higher levels of testing of
software. It is not suitable or preferred for algorithm testing.

Raghunandan Chaudhary (HND / First Semester)


47
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Testing
Expected Result Actual Result Comments
Testing of login module: As expected while logging Actual result of this testing
in with wrong user name or meets the requirement of
While logging in with the
password it shows the error expected result.
wrong username or
message and does not allow
password it should show the
you to login.
message “Invalid error
username or password”.
Testing of insert statement in As expected while inserting Actual result and expected
tables: the data into any table the result are same.
dialogue box with message
While testing the insert
saying “Product inserted
statement in the table, it
successfully”, “Customer
should show the dialogue
inserted successfully”,
box saying “product inserted
“Supplier inserted
successfully”, “Customer
successfully”, “Purchase
inserted successfully”,
inserted successfully”,
“Supplier inserted
“Sales inserted
successfully”, “Purchase
successfully”.
inserted successfully”,
“Sales inserted
successfully”. Which
confirm that the data is
inserted to the table
successfully.
Testing of update statement As expected the dialogue Actual result and expected
in table: box of query of update result are same.
statement and then the
While testing the update
dialogue box of message
statement in the table, it
saying the update was
shows the dialogue box of
successful.
query of update statement
and then shows the message
saying update is successful
which confirm that the
update was successful in
table.
Testing of delete statement As expected the dialogue Actual result and expected
in table: box of choosing to delete, result are same.
dialogue box of query of
While testing the delete
delete and the dialogue box
statement in the table, it
of confirmation of delete
shows the dialogue box of
appear one after another.
choosing whether you want
to delete or not. After

Raghunandan Chaudhary (HND / First Semester)


48
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

choosing the “yes” button


the dialogue box of delete
query and then the
confirming message saying
delete is successful.

Choice of Data:
While testing the login module I have tested it by three different ways. They are:

Wrong username and right password:

Right username and wrong password:

Raghunandan Chaudhary (HND / First Semester)


49
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

 Right username and right password:


While logging in I entered the right username and right password. Since the username
and password are correct it allowed to login and the home page of table is seen. Then
there you can choose table to insert, update or delete.

Raghunandan Chaudhary (HND / First Semester)


50
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Conclusion:

In this learning outcomes, I have clarified about access the effectiveness of the testing that
includes the explanation of the choice of testing the data such as software testing i.e. white
box testing and black box testing. I have also demonstrate the login module that has been
tested through three different ways: 1. Wrong username & right password. 2. Right username
& wrong password. 3. Right username & right password.

LO4 [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.

Introduction:

I have made a Stock Management System for the company which helps the manager and the
staffs of company to get the data and information about item, deals, buy, supplier and
customers. In this task I will create specialized and additionally client documentation to work
for the database management.

Technical Documentation:

Introduction:

Technical documentation is the generic term or documents which describe the users,
functionality, creation or architecture of a product or system. The main goal to achieve the
effective documentation is to protect that the developers are headed in the same direction to
fulfill the objectives of the project and full of documentation types exist.

Over-view:

I have made five tables in a program of database. The five tables that are made in program
are tables of item, supplier, clients, deals and buy. The different five tables contains the
information that are identified with the individual table like item table consist the information
like item name, item Id and likewise other tables comprises information which are identified.

Raghunandan Chaudhary (HND / First Semester)


51
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Like this each table comprises information identified with them. Staffs can refresh, insert and
delete the information from the database to program.

Choice of tools:

IDE: Visual Studio


Server-side programming language: C#
Database Management System: SQL express
Server: MSSQL Server
Platform: Desktop Application

Design of layout for application:

1. Product Table

2. Customer Table

Raghunandan Chaudhary (HND / First Semester)


52
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

3. Supplier Table

Raghunandan Chaudhary (HND / First Semester)


53
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

4. Purchase Table

5. Sales Table

Raghunandan Chaudhary (HND / First Semester)


54
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

6. Login

Data Dictionary used for application:

Raghunandan Chaudhary (HND / First Semester)


55
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Algorithm for application


Flowchart for application
Case diagram for application
0- Level Data Flow Diagram for application

Admin Request
User
Respond

Respond

SMS Request

Request
Respond

Respond
Request

Supplier Customer

1- Level DFD

Raghunandan Chaudhary (HND / First Semester)


56
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Admin User

Product View
File
Authentication

Reporting Admin

User

2- Level DFD

Admin Request

Request

Respond Validation

Login Respond

Respond
Request

File

User

Conclusion:
In this task, I have concluded that I have produce the technical and user documentation for
the fully functional system including design the layout of the application such as product
table, supplier table, customer table, sales table, purchase table and login form which shows
the movement of the data through the system and flowcharts.

LO1 [D1]
Evaluate the effectiveness of the design in relation to user and system
requirements.

Raghunandan Chaudhary (HND / First Semester)


57
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Introduction:

According to the demand of this task, I am going to present my own opinion that how the
proper database system design meets the user and system requirements.

When we develop the application or software for the company, we must have to know first
about what things are necessary for the company. Through this condition, I will develop or
design the database system for the stock management system which helps the manager or
staffs of the company to storing the Item sales record.

The success of a system rests on how well it meets the users' needs. User engagement during
the development of the system is becoming a standard procedure in the delivery of system
functionality based on user priorities rooted in meeting their business objectives. The user
community has no appetite for waiting long periods to see new system capabilities made
operational. As a result, methods such as "agile" development have become very popular.
These methods call for the demonstration of system capabilities during the development of
the system. System development team members present their progress during short meetings,
called "scrums," in which a clear picture emerges of the timeline of the provisioning of
system capabilities that meet user requirements. For saving the information, diverse tables are
made like one table for product entry, one table for customer entry, one table for sales which
is utilized to save every entry of the points of interest. The primary motivation to making
table there won't shot of information excess. Every stock of the tables is in standardized
shape. There is not the element and qualities are specified in the framework, there also
specified the greatest and small numbers in the framework of the database system according
to the needs. If the customer or client need to include the same number at that point of
interest then there is the big mistake happen in the database system. Along these lines, there
is no possibility to notice of the information. In my own framework, every stock of the tables
is connected with each other.

As I say that the stock management system is tiny model which the project of database
system meets the operational, functional, and system requirements that is necessary to
accomplishing a system’s ultimate goal or satisfying the mission of objectives.

Benefits of Stock Management System:

1. Trusting the report system.


2. Satisfying your customers/buyers.

Raghunandan Chaudhary (HND / First Semester)


58
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

3. Detecting problems sooner.


4. Missing fewer sales opportunities.
5. Improving profit margins with higher returns.

Conclusion:
In this task, I have demonstrate that evaluating the effectiveness of the design in relation to
user and system requirements by developing the stock management system which meets the
system requirements of the company through making the diverse table that help in the
removing the problem of the database of a company.

LO2 & LO3 [D2]

Evaluate the effectiveness of the database solution in relation to user and


system requirements, and suggest improvements.

Introduction:

System requirements are the configuration that a system must have in order for a hardware or
software application to run smoothly and efficiently. Failure to meet these requirements can
result in installation problems or performance problems. The former may prevent a device or
application from getting installed, whereas the latter may cause a product to malfunction or
perform below expectation or even to hang or crash. According to the demand of this task, I
am going to evaluate the effectiveness of the database improvements & security of the
application in the future.

While developing the database, we must care about the information or data that it is right or
wrong. If there is any little mistake happen in the database then the whole structure of the
company of database went to crashed and therefore the authorized user must have to care
about data and adjust the data in a correct form. For removing the problems or issues, security
must be required. If there is no any security in the company then there is no accurate database
and it will not performed the activities in a right way.

The changes which must be involved on the database application for development. They are:
1. Performance
2. Scalability

Raghunandan Chaudhary (HND / First Semester)


59
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

3. High availability
4. Security

Performance:

The activities which is performed by the application in the company to keep the records of
stock within the maximum speed. At that situation, the customer clicks on the save button
and then the data is saved on the database table in a maximum time. The activity of
application must be the fast and sets an opportunity to save and recover the data or
information from the database in a second. However, the SMS works in a moment by
clicking in the function button. And this way, the software or application performed in
database.

Scalability:

SMS application cannot use in all the department of the management because it is developed
for the stock management. This application is only used in the front desk of company. It can
be managed and improved in the future when the company increases its business. Beside the
information of stocks, if a company need the same application with adding new features SMS
application can be modify or update easily then it can be used in all department of the
business. While updating the application the size of application will be increase. When the
scale of company increases then database of the application also increases according to the
needed.

High Availability:

There must be the high availability of data and information in the company for maintain the
performance and activities. There is no any problems or issues in the database of the
company. When developing the application for the database then there must be care about the
performance of the company and security for the maintenance of the activities in the
company for the smoothly running.

Security:

Raghunandan Chaudhary (HND / First Semester)


60
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Database contain highly sensitive data. In company there are important data’s and
information of stock and products so for that security is needed. We must provide the
permission to authorized users to access the database and modify time to time when it is
needed. For maintain the security in the database the user must have username along with
password. The most sensitive data must be in encrypted form so no one can view this.
Administrator should take the backup time to time because electronic device can be crashed
any time. By providing all these security to the company then it meets with the user and
system required effectively to use this application in the company to maintain the item sales
record.

Future Improvement in PRMS:

 The information of this database can be stored in the cloud for backup in the future.
 If the extra data or information needed then it can be added in the future.
 More information regarding the product can be added.

Conclusion:

In this task, I have briefly demonstrate that while developing the application we must care
about the performance, security and capability of it and I kept all these things while making
an application or software. To perform the application there must be care about security
because if there is no security in the company then all the data or information will be crashed
and hacked. The application can also modify according to the need of the company. As we
developed the application it meets the requirements of the system of the database by
evaluating the effectiveness of the database solution and improvements.

Raghunandan Chaudhary (HND / First Semester)


61
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

LO4 [D3]

Evaluate the database in terms of improvements needed to ensure the


continued effectiveness of the system.

Introduction:

Nowadays, the technology and an innovation are upgrading day by day. For this situation, we
have to increase or magnifying the technology and an innovation for running the application
smoothly. But in some cases, there will be the bad application performance and the SQL
queries are extremely slow which can cause the entire database to perform poorly. And
therefore, I am going to present the entire database structure that solve the database
performance issues and improving the overall database performance.

Software:

Software is one of the important part of the computer that contains the entire functions of the
computer which operates the performance of the computer. If there is better software then
there will be the faster and more efficient database performance. There should be the better
performance of the SQL queries for running this application.

Hardware:

Hardware is also the important part of the computer. Without hardware, there is no working
the database performance. At least, there is required the minimum hardware for this
application. We should not need high setup hardware to run the application. If there is more
hardware device is required while structuring the database performance then it will be the
effortlessly. For instance, RAM (Random Access Memory) should be refreshed and then the
application will execute without any issues.

Security:

Database contain highly sensitive data. In company there are important data’s and
information of stock and products so for that security is needed. We must provide the
permission to authorized users to access the database and modify time to time when it is
needed. For maintain the security in the database the user must have username along with
password. The most sensitive data must be in encrypted form so no one can view this.
Administrator should take the backup time to time because electronic device can be crashed
any time. To run this application, we must have to present the highly security to the database

Raghunandan Chaudhary (HND / First Semester)


62
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

performance. If there is no security in the database then there will be the problem in the
developing the database. That’s why we have to maintain the highly sensitive security in the
database development.

Conclusion:

In this task, I have demonstrate that the evaluation of the database in terms of improvements
which needed to ensure the future effectiveness of the database performance system. We
should update and evaluate the database performance according to the software and hardware
configuration. We can use cloud or data keeping application for storing the data and it is a
more effective for securing the data and information.

Referencing:

Anon., nd guru99.
[Online]
Available at:
https://www.guru99.com/
[Accessed 15 September 2021].

Anon., nd w3schools.
[Online]
Available at:
https://www.w3schools.com/
[Accessed 21 September 2021].

Anyaberkut. 2020 iStock.


[Online]
Available at:
https://www.istockphoto.com/
[Accessed 22 September 2021].

Raghunandan Chaudhary (HND / First Semester)


63
D a t a b a s e D e s i g n A n d D e v e l o p m e n t | 2021

Hughes A. n.d Search Oracle. [Online]


Available at:
https://searchoracle.techtarget.com/
[Accessed 17 September 2021].

JSTOR. 2008 wikipedia.org.


[Online]
Available at:
https://www.wikipedia.org/
[Accessed 20 September 2021].

Supriya. 2018 Supriya-DB. [Word


Document]
Available at: C:\Users\DELL\Downloads\supriya-
DB.docx
[Accessed 15 September 2021].

Thank You…!!

Raghunandan Chaudhary (HND / First Semester)


64

You might also like