You are on page 1of 39

Task 1

User Requirement and System Requirement


The user requirement is spacious statement of the system feature which is the detailed
description of system functionality. It is written in a usual language, of services of system is
expected to provide the system users, (collegenote.net, 2023). To provide detailed description
of system functionality of United Limited, Firstly I have included user requirement in given
table which provides information to system users of relational database system.

System Requirements
Components Descriptions
RAM The minimum requirement of RAM is 4 GB
or above for smooth and better performance
of application.
System Capability 64 bits operating system, (x64) based
processor
Operating System Windows 7, 8, 10 and 11
Hard Disk Drive 2 GB free space
Processor Intel, AMD etc. minimum 2.0 GH and more
for better performance
Full set up .net framework 4.0 or above and 1.8 size
(Zip or .exe) file
Table no 1.

System Requirement of United Limited

Secondly, I have included user requirement in given table which will provide detailed
description of software system’s function, services and operational constrains.

User Requirements
Requirements Description
Login System Administrator can login directly as a default
user. Other users will be created for data
entry only or both (owner & data entry)
privileges.
Product The system should be able to store product
information
Supplier The system should be able to store supplier
information
Elements The system should be able to elements
information and supplier can be one or more
in element area.
Table no. 2 User Requirement

Relational database system


As per (Oracle.com, 2023), prophase the websites information This relational database
system includes entity relational diagram, relational database and data dictionary of database
system which have been created for system software. Improve with citation in this section

Entity Relationship Diagram

The given ERD has been created using 7 different entities such as problem, specialist, call,
person, element, software and user. The problem table have ProblemID(Primary Key),
Description, CallID, SpecalistID, CreatedDate to manage problem which we get from caller.
The specialist table …..
The relation between problem and call is many to one relationship, relation between problem
to specialist many to relationship, ……

Figure no.1 ERD of United Limited

The given ERD has been created successfully as per scenario which is in above image. We
may see an ERD of a FoodMart management with various entities and their attributes in the
diagram.

Relational Database Diagram

Figure no.2 Database Diagram

The relational diagram of United Limited has been successfully created which is indicating
the relationship between entities.
Data Dictionary
As per (Ucmerced.edu, 2023), Data Dictionary is a list of names, definitions, and properties
for data elements in a database, information system or research project. It explains the
meanings and goals of data elements in the context of a project, as well as interpretations,
accepted meanings and representation. A Data Dictionary also contain information about data
pieces in the form of metadata. A Data Dictionary metadata can help to define the scope and
properties of data items, as well as the rules that govern their use and application.

For the project development, we should build a user table which user is an entity with
username and password. We must create product entity to manage information of product
including fields Product Name, Unit, Quantity, Price etc. Then we must build element entity
to manage element information using such properties like Element Name, Category etc. In
addition, we should build a supplier entity to manage information about suppliers using
following properties like supplier name, address, phone, email etc. in order to save record.

The element, attributes and its description is shown on following data dictionary.

User Table
Column Name Data Type Length Constrains Description
(Attributes)
UserID Int 10 Primary Key Unique
identification of
user identity
FirstName Varchar 50 Not Null Require 50
characters data
in various
format
LastName
Username Not Null
Password
Product Table
ProductID Int 10 Primary Key Unique
identification of
Product Identity
ProductName
Unit Varchar 10 Not null Require 50
characters of
unit names
Quantity Int 10 Not null 10 numbers of
integer value
require
Price Money Not null Require amount
value with
decimal places
Element Table
ElementID Primary Key
SupplierID Foreign Key
ProductID Foreign Key
Category
Description
Supplier Table
SupplierID Primary Key
SupplierName
Address
Phone
Email

Interface Design and Output


The interface has been finalized using different forms to manage information of relational
database system. There are 5 forms which has been included to appropriate design and output
for the accurate result of United Limited.

SS of forms with title


Data Validation Mechanism
Data quality and accuracy are ensures through a procedure known as data validation. In order
to assure the logical consistency of input and stored data, it is implemented by including a
number of checks in a system or report …. (Explain with citation)

For the data quality and accuracy to ensure through a procedure has been used in United
Limited for the data validation. It can ensure logical consistency of input and stored data. It is
implemented in designed system to check system report.

 Data Check

Data type check ensures in designed system of United Limited that the information entered is
correct data type in domain names. E.g. int data type allows only number value and date data
type only allows a date value to be entered.

 Range Check

When working with data that contains numbers, currencies or date and time values, range
check is necessary to identify data within a range.

 Length Check

This is used to ensure that the correct number of characters are entered into the field,
preventing it from being too long or too short.

 Format check

It is used to verify that data imputed are in right format and eliminate confusion.

Normalization
Introduction to Normalization

Normalization is the process of managing data of our existing database as well as new
database. It puts data in tabular form and make relationship between those tables and remove
redundancy and duplicity of data from our tables to protect our data. In another word, it is a
process that splits single larger tables into multiple tables to organize the data. "The process
of a complex database structure in simple and more reliable database is called
Normalization". The benefits and drawbacks of normalization are as follows: - Improvise
with citation
Benefits of Normalization

1. Reduces data redundancies.


2. Fast updates, inserts.
3. Better understanding of data.

Drawbacks of Normalization

1. Reduces performances.
2. Joins.
3. Consume more time.

Types of Normalization:
Normalization 1NF

A relation in which intersection of each row and column contains only one value. Each table
is by default in first normal form.

Example:

ProblemId Description Problem Type Specialist Duration


1 Software Crash, Major Ram 5 min
Keyboard Major Sita 2 min
replacement
2 Antivirus update Normal Gita 2 min
3 Printer refill Major Ram 3 min

Solution of 1NF:

ProblemId Description Problem Type Specialist Duration


1 Software Crash Major Ram 5 min
1 Keyboard Major Sita 2
Replacement
2 Antivirus Normal Gita 2 min
update
3 Printer refill Major Ram 3 min
This table is first normal form. There should be non-repeated value in second normal form.
So, we have to remove the repeated value from this table.

Normalization 2NF

A relation is said to be the second normal form when we normalize the first normal form. In
other word, the output of first normal form will be the input of second normal form. To
achieve the second normal form, we have to remove dependency.

Example:

ProblemId Description Problem Type Specialist Duration


1 Software Crash Major Ram 5 min
1 Keyboard Major Sita 2
Replacement
2 Antivirus Normal Gita 2 min
update
3 Printer refill Major Ram 3 min

Solution of 2NF:

ProblemId Description Problem Type Duration


1 Software Crash Major 5 min
1 Rashmi Urgent 2 min
2 Neha Tandi 3 min

Specialist Id Specialist
1 Ram
1 Sita
2 Gita
This table is second normal form.

Normalization 3NF

A relation is said to be the third normal form when we normalize the second normal form. All
non-key attributes are not dependent on any other non-key attributes. Each field has a unique
name. To achieve the third normal form, we have to remove transitive dependency.

Example:

ProblemId Description Problem Type Duration


1 Software Crash Major 5 min
2 Rashmi Urgent 2 min
3 Neha Tandi 3 min

Specialist Id Specialist
1 Ram
2 Sita
3 Gita

Solution of 3NF:

ProblemId Description Problem Type Duration


1 Software Crash Major 5 min
2 Keyboard Urgent 2 min
replacement
3 Neha Tandi 3 min
4 Virus threat Urgent 3 min
Specialist Id Specialist
1 Ram
2 Sita
3 Gita

Conclusion:
Conclusion of Task 1
Task 2 question copy paste
You can write you are implementing the query for the help desk system

1. Creating database
Query:

Create database DesktopApp

Output:

This query helps to create database for the Unted Limited. u

2. Using database
Query:

Use DesktopApp

Output:
This query helps to use database to select as a current database for further procedure to create
relational databases.

3. Creating tables
Query:

create table users(


UserID int identity(1,1) primary key,
FirstName varchar(50) not null,
LastName varchar(50) not null,
Username varchar(50) not null unique,
Password varchar(50) not null,
);

Output:
Query:

create table product(


ProductID int identity(1,1) primary key,
ProductName varchar(50) not null,
Unit varchar(10) not null,
Quantity int not null,
Price money
);

Output:
Query:

create table supplier(


SupplierID int identity(1,1) primary key,
SupplierName varchar(50) not null,
Address varchar(100) not null,
Phone bigint not null,
Email varchar(50) not null
);

Output:

Query:

create table element(


ElementID int identity(1,1) primary key,
ProductID int foreign key references product(ProductID),
SupplierID int foreign key references supplier(SupplierID),
Category varchar(50) not null,
Description varchar(200) not null
);

Output:
This query helps to create tables for the application in relational database system using
various constrains and data types.

Implementing data manipulation query language into relational database:


4. Inserting data
Query:

insert into product


(ProductName, Unit, Quantity, Price)
values
('waiwai','crt',5,200),
('biscuit','pkt',10,120),
('cadboury','pcs',5,350),
('kitkat','pcs',4,80),
('frooti','pkt',5,25)
;

Output:
This query helps to insert data on product table to manage information of product items in
application.

Query:

insert into supplier


(SupplierName,Address,Phone,Email)
values
('Nitya Poudel','Gaindakot','9845044321','nitya@gmail.com'),
('Nirjala Thapa','Aaptari','9845088665','nirjala@gmail.com'),
('Surakshya Poudel','Naurangi','9845554434','spoudel@gmail.com'),
('Paras Adhikari','Amarapuri','9845088776','parasad@gmail.com'),
('Safal Lamsal','Devchulli','9845658585','safal@gmail.com')
;

Output:
This query helps to insert data in supplier table to manage information of suppliers in
application.

Query:

insert into element


(ProductID,SupplierID,Category,Description)
values
('1','3','Veg','Regular Supplier'),
('2','1','Sugar Free','Not regular supplier')
;

Output:
This query helps to insert value on element table to manage information for the application
using foreign key constrains.

5. Retrieving data
Query:

select * from product

Output:
This query helps to retrieve all data from product table which was designed in relational
database system.

Query:

select * from supplier

Output:

Using select query on supplier table, data has been retrieved which was designed in relational
database.

Query:

select * from element

Output:
By the help of select query, data can be retrieve from relational database system which was
built as per requirement.

6. Updating data
Query:

update product
set Unit='pkt'
where ProductID=4

Output;
The update query helps to modify the existing data of product table from relational database
system.

7. Deleting data
Query:

delete from product


where ProductID=5

Output:

Using delete query, data can be delete from product table of relational database system and
make sure which is not integrated with other tables.

Retrieving meaningful data for the United Limited


I have

8. Sorting data
Query:

use DesktopApp
select * from product
order by Price ASC

Output:
This query helps to sort the result in ascending and descending order to manage information
on relational database system.

9. Group by
Query:

select ProductName
from product
group by ProductName
having ProductName='kitkat'

Output:
The Group By statement groups rows that have the same values into summary rows. It helps
to include ( COUNT( ), MAX( ), MIN( ), AVG( ) and SUM( ) ) to aggregate functions.

Query:

select ProductName, sum(quantity) as TotalQuantity


from product
group by ProductName

Output:
The sum() function helps to summation of value which have same product name on table of
relational database system.

Query:

select ProductName, count(quantity) as TotalOrder


from product
group by ProductName

Output:

This query helps to count the particular row who have similar values in table of relational
database system.

10. Joins
Joins are used to combine the rows of two or more tables to display (retrieve) selected data in
relational database system. There are different kinds of joins as follow:

a. Inner join
This keyword helps to select the records that have matching value on both side on table1 and
table2 in relational database system.
b. Left Join
You can do self

c. Right Join
You can do self

d. Full Outer Join


You can do self

11. Union
Union and union all operation in relational database system, are used to combine the result-
set two or more select queries.

Query:

use DesktopApp
select * from product
union all
select * from prductgodown

Output:
Security and Maintenance on relational database system
12. View
View is nothing more than a saved SQL query to protect original data displaying virtual table
data. It can be used to reduce complexity of the database schema in relational database
system to provide security.

Query:

use DesktopApp
create view vwProByEle
as select ProductName, Unit, Quantity, Price, Category from product
join
element
on (product.ProductID=element.ElementID)

select * from vwProByEle

Output:
13. Trigger
Triggers are the SQL odes that are automatically executed to response in certain events on
particular table which is used to provide security on the table. It can handle errors of the
table. Generally, triggers used in data inspection in relational database system.

Query:

create trigger tr_product


on product
for insert
as
begin
select * from inserted
end

insert into product values('potato','kg','10','50');

Output:
This query helps to create trigger for the insert, update and delete to manage information of
databases.

14. Store Procedure


Store procedure is a process of minimizing work load just calling the it’s name while it is
being used over and over again.

Query:

use DesktopApp
create procedure spGetProduct
as
begin
select ProductName, Unit, Price from product
end

execute spGetProduct

Output:
Store Procedure on Save:
Query:

create procedure sp_save


(
@ProductName varchar(50),
@Unit varchar(10),
@Quantity int,
@Price money
)
as begin
insert into product values (@ProductName,@Unit, @Quantity, @Price)
end

exec sp_save 'Daal','kg',1.5,150

Output:
Delete
Query:

create proc pdelete


@ProductID int
as begin
delete product where ProductID=@ProductID
end
exec pdelete 10

Output:
12. Index
Indexes are used to retrieve data from the database more quickly using a clustered index seek.
In other words clustered index seek means its going to scan a particular range of rows.

Syntax:

use DesktopApp
create index index_product
on product (ProductID)
select * from product
where ProductID=9

Output:

Recommendation for Implementing security and maintenance of the database system


I have included all the security and maintenance system in proposed database system. In
other hand we can maintain extra security and maintenance system too.
Task 3:
Testing
Unit Testing
Describe (not required for assignment)

Integrated Testing
Describe (not required for assignment)

Stress Testing
Describe (not required for assignment)

Effectiveness of Testing including explanation of the choice test data used


In this task, Different types of test can be applied to analyze the actual test result against
expected results. The choice of data has been explained for different operation in unit test,
integrated test and stress testing and also explained the purpose of testing the data.

Insert Check
Project Name DesktopApp
Test case ID 1
Test Engineer Nirjala Thapa
Test Scenario Insert data in to the database with correct
data type
Test Step Insert the data into the table with the correct
SQL syntax
Test Data Product(‘waiwai’,’kg’,’5’,’20’)
Expected Result System should show success message on
output
Actual Result Success message was shown
Status Pass
Output:

Use insert query to insert data and SS here if successful

Project Name DesktopApp


Test case ID 2
Test Engineer Nirjala Thapa
Test Scenario Insert data in to the database with correct
data type
Test Step Insert the data into the table with the correct
SQL syntax
Test Data Product(‘waiwai’,’kg’,’five’,’20’)
Expected Result System should show error message on
output
Actual Result Error message was shown
Status Pass
Output:

Use insert query to insert data and SS here if not successful

Data length check


Project Name DesktopApp
Test case ID 3
Test Engineer Nirjala Thapa
Test Scenario Insert data in to the database with correct
data length
Test Step Insert the data into the table with exceeding
length with the correct SQL syntax
Test Data Insert Product Name in product table with
the character more than 50
Expected Result System should show error message on
output
Actual Result Error message was shown
Status Pass
Use insert query with the length more than 50 on product name to insert data and SS here if
not successful

Project Name DesktopApp


Test case ID 4
Test Engineer Nirjala Thapa
Test Scenario Insert data in to the database with correct
data length
Test Step Insert the data into the table with exceeding
length with the correct SQL syntax
Test Data Insert Product Name in product table with
the character less than 50
Expected Result System should show success message on
output
Actual Result Success message was shown
Status Pass
Use insert query to insert data and SS here if successful

Not null check


Project Name DesktopApp
Test case ID 5
Test Engineer Nirjala Thapa
Test Scenario Insert data in to the database with correct
data type
Test Step Insert the data into the table with null value
in not null domain name with the correct
SQL syntax
Test Data Product(Null,’kg’,’5’,’20’)
Expected Result System should show error message on
output
Actual Result Error message was shown
Status Pass
Use insert query with the Null value on product name to insert data and SS here if not
successful

Foreign Key Check


Project Name DesktopApp
Test case ID 6
Test Engineer Nirjala Thapa
Test Scenario Insert data in to the database with correct
data type
Test Step Insert the data into element table which
have foreign key integration from product
table with the 1003 value in ProductID with
the correct SQL syntax
Test Data Element('1003','3','Veg','Regular Supplier')
Expected Result System should show error message on
output
Actual Result Error message was shown
Status Pass
Use insert query with the 1003 value on product id into element table to insert data and SS
here if not successful

Finally, all the test has been done as expected however there was some error on database
system but it was solved correctly.

Effectiveness of Unit Testing


Login Testing
Primary key testing
Foreign key testing
Unique key testing
Effectiveness of Stress Testing
Varchar length
Data type
Date Format
Integer Length
Or,
Effectiveness of Testing
Task 4:
Evaluating the effectiveness RDBMS

Evaluating the implementation of query

Evaluating the testing

Task 5:
User:
 Starting SSMS

 Connecting Database

 Creating table

 Inserting data

 Retrieving data (order by, group by, sum, count)

 Updating data

 Delete data

 View

 Trigger

 Store Procedure

Technical:
 Dataflow diagram banaune

 Flowchart banaune
Record video how user can use this application appropriately and upload into drive

Provide link into end of the assignment.


References

Oracle.com. (2021). What is a relational database? [online] Available at:


https://www.oracle.com/database/what-is-a-relational-database/#:~:text=The%20software
%20used%20to%20store,storage%2C%20access%2C%20and%20performance. [Accessed 2
Mar. 2023].

You might also like