Database Assignment
Database Assignment
Database Assignment
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
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
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
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
Security ………………………………………………………………………………….…...60
Features Improvements in PRMS ………………………………………………………...61
Conclusion ……..……………………………………………………………………………61
LO4[D3] ……………………………………………………………………………………..62
Introduction ………………………………………………………………………………...62
Software ……………………………………………………………………………………..62
Hardware …………………………………………………………………………………..62
Security …………………………………………………………………………..………...62
Conclusion …………………………………………………………………………………..63
References …………………………………………………………………………………..63
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.
The given below diagram is the ER diagram for the 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
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:
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.
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.
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.
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);
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);
Product Table
CREATE TABLE Product (
ProductID uniqueidentifier NOT NULL);
Customer Table
CREATE TABLE Customer (
CustomerID uniqueidentifier NOT NULL);
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);
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”.
Drop down validation enables you to get the substance that is recorded in it like that of "Size"
as said above in the figure.
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).
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>
………
Examples:
Product Table
Query in SQL
Customer Table
Query in SQL
Front End
private void button1_Click(object sender, EventArgs e)
{
if (txtFirstName.Text == "")
{
MessageBox.Show("FirstName is required");
return;
}
conn.Open();
Supplier Table
Query in SQL
Front End
private void btnInsert_Click(object sender, EventArgs e)
{
if (txtSupplierName.Text == "")
{
MessageBox.Show("SupplierName is required");
return;
}
conn.Open();
Purchase Table
Query in SQL
Front End
private void btnInsert_Click(object sender, EventArgs e)
{
conn.Open();
Sales Table
Query in SQL
Front End
private void btnInsert_Click(object sender, EventArgs e)
{
conn.Open();
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>
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();
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();
Front End
private void btnUpdate_Click(object sender, EventArgs e)
{
conn.Open();
update Purchase
set PurchaseRate = '90'
where PurchaseQty = '40'
Front End
private void btnUpdate_Click(object sender, EventArgs e)
{
conn.Open();
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();
Delete statement is that statement or command which are used for deleting the data in the
table of database.
Syntax:
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();
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();
Front End
Purchase Table
Query in SQL
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();
conn.Close();
dataLoad();
}
else
{
dataLoad();
}
}
Sales Table
Query in SQL
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();
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()
{
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
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
Front End
public void dataLoad()
{
conn.Open();
String query = "Select * from Purchase";
SqlDataAdapter sda = new SqlDataAdapter(query, conn);
dataGridView1.DataSource = dt;
conn.Close();
}
Sales Table
Query in SQL
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]
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;
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.
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
Back End
After inserting the values in the front end, the values were inserted successfully in the back
end as well.
Back End
After updating the value, I checked in front-end, the value was updated there successfully
too.
Test Log:
Test Test Expected result Actual result
Date description
12th Insert button The dialogue
may box with
message
“Product
Inserted
Successfully!”
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]
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:
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 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
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 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.
LO1 [M1]
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:
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.
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:
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:
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:
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:
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:
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.
To connect to the database through Windows Authentication Mode you are not required to
enter password. You can easily connect to the database.
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:
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.
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
return @ProductName
End
Corruption Detection
SQL Query
Result
Index Fragmentation:
Stored Procedure
Code
Result
Database Trigger
Code
Result
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.
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.
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.
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.
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
Snapshot of Result
Snapshot of Result
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]
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 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 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.
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
Choice of Data:
While testing the login module I have tested it by three different ways. They are:
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.
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:
1. Product Table
2. Customer Table
3. Supplier Table
4. Purchase Table
5. Sales Table
6. Login
Admin Request
User
Respond
Respond
SMS Request
Request
Respond
Respond
Request
Supplier Customer
1- Level DFD
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.
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.
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.
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
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:
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.
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.
LO4 [D3]
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
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].
Thank You…!!