You are on page 1of 59

MUHAMMAD ZAIB

Roll NO Fa17m2ba01

BS Computer Science(7th)
Session 2017-2021

Department Of Computer Science & IT

The Islamia University of Bahawalpur


Online shopping system

IN THE NAME OF ALLAH THE MOST


GRASIOUS THE MOST MERCIFUL AND THE
MOST COMPASSIONATE

ii
Online shopping system

Project Brief
Project Name:
Online Shopping system
Objective:
Online Shopping System project is aimed at developing a Web application that depicts online
Shopping and purchasing using Payment Gateway. Online Shopping is one of the applications to
improve the marketing of the Brands’ products. This web application involves all the features of
the online shopping.

Undertaken BY:

Muhammad Zaib
Supervised By:

DR Imran Sarwar Bajwa


HOD of Department Of Computer Science & IT.

Operating System:

Windows 10 (64bit)

Source Language:
Php/Sql Server

CERTIFICATE

iii
Online shopping system
It is hereby certified that work presented by Muhammad Zaib the Project title “Online
Shopping System” has successfully presented / defended and is accepted in its present
form as satisfying the requirement for the degree of (BSCS&2017 – 2021)in the Islamia
University of Bahawalpur.

Supervisor

__________________________________

External Examiner
__________________________________

Coordinator of Department

Mr. Muhammad Ibrahim _________________________________

Date: __________________

iv
Online shopping system

“GOD HELPS THOSE WHO HELP


THEMSELVES”
MAY ALLAH HELP ME FOR SUCCESS
(AMEEN)

DEDICATION
v
Online shopping system

My Loving Parents
Whose Support
Give me Strength
And determination
To Accomplish my Goal

Acknowledgement

vi
Online shopping system
F i r s t o f a l l , m y d e e p e s t g r a t i t u d e t o a l m i g h t y
A L L A H : t h e m o s t b e n e f i c e n t , c o m p a s s i o n a t e ,
m o s t m e r c i f u l a n d m o s t g r a c i o u s w h o s e f a v o r
a n d k i n d n e s s m a d e i t p o s s i b l e f o r m e t o
c o m p l e t e t h i s p r o j e c t w o r k .

A v e r y s p e c i a l t h a n k s a n d a p p r e c i a t i o n g o e s t o
m y p a r e n t s a n d o t h e r f a m i l y m e m b e r s f o r a l w a y s
e n c o u r a g i n g m e . T h e y r e a l l y d e s e r v e m e f o r
e n d u r i n g m y p r o b l e m s w i t h g r e a t p a t i e n c e a n d
l o v e a n d w h o s e e n d l e s s p r a y e r s a r e a s o u r c e o f
d e t e r m i n a t i o n f o r m e .

I a m g r e a t l y i n d e b t e d t o m y r e s p e c t a b l e t e a c h e r
a n d G r e a t H e a d o f O u r d e p e r t m e n t Sir Dr.
Imran Sarwar Bajwa for his supervision, kind
s u p p o r t , u n f o r g e t t a b l e d e v o t i o n a n d e n c o u r a g i n g
b e h a v i o r .

I a m a l s o t h a n k f u l t o a l l s t a f f m e m b e r s o f t h e
D e p a r t m e n t o f C o m p u t e r S c i e n c e & I T f o r t h e i r
c o o r d i n a t i o n .

ABSTRACT

Online Shopping System is a web system to provide the facilities to customers to purchase all
necessary goods at one place. The purpose of organization to establish the concept of online

vii
Online shopping system
goods which customer can easily select according to his needs. The customer can book his order
from any place.

As project mainly concentrate on online Sales and Purchase so keeping the friendly user
interface the system should provide all necessary goods. A Login Form which asks the User to
browse the whole system and perform different operations step by step such as Purchase, Add to
Craft, Booking and loading records as well as providing the facility to Administrator to generate
the sequence by hiding un-necessary tasks from the user. Also the system is capable of managing
records for Purchaser. The system is also capable to generate reports according to the use.

Currently the System stores information in databases and retrieve information on the interfaces
with the help of data access.

Table of Contents

1 INTRODUCTION...............................................................................................................................................12
1.1 ORGANIZATION PROFILE:................................................................................................................................12
1.2 PROBLEM STATEMENT:...................................................................................................................................12
1.3 PROJECT/PRODUCT FEASIBILITY REPORT:......................................................................................................12
1.3.1 Technical Feasibility:...........................................................................................................................12
1.3.2 Operational Feasibility:.......................................................................................................................12
1.3.3 Economic Feasibility:...........................................................................................................................12
1.3.4 Schedule Feasibility:............................................................................................................................13

viii
Online shopping system
1.3.5 Specification Feasibility:......................................................................................................................13
1.3.6 Information Feasibility:........................................................................................................................13
1.3.7 Motivational Feasibility:......................................................................................................................13
1.3.8 Legal & Ethical Feasibility:.................................................................................................................13
1.4 PROJECT SCOPE:..............................................................................................................................................13
1.5 TOOLS AND TECHNOLOGY:.............................................................................................................................14
1.5.1 Microsoft Project:................................................................................................................................15
1.5.2 Microsoft Visio:....................................................................................................................................15
1.6 RISK LIST:.......................................................................................................................................................15
2 REQUIREMENT ANALYSIS.........................................................................................................................18
2.1 SYSTEM SPECIFICATION:.................................................................................................................................19
2.1.1 Summary of Requirements (Initial Requirements):..............................................................................19
2.2 IDENTIFYING EXTERNAL ENTITIES:................................................................................................................20
2.2.1 Refined Entities:...................................................................................................................................20
2.3 CONTEXT LEVEL DATA FLOW DIAGRAM:......................................................................................................21
2.4 USER CHARACTERISTICS:................................................................................................................................21
2.5 ALLOCATE REQUIREMENTS:...........................................................................................................................22
3 OBJECT ORIENTED ANALYSIS AND DESIGN.......................................................................................24
3.1 HIGH LEVEL USE CASE DIAGRAM:.................................................................................................................24
3.2 ANALYSIS LEVEL USE CASE DIAGRAM:.........................................................................................................25
3.3 USE CASE DESCRIPTION:.................................................................................................................................26
3.4 DOMAIN MODEL:............................................................................................................................................28
3.5 SYSTEM SEQUENCE DIAGRAM:.......................................................................................................................29
3.5.1 User Login:...........................................................................................................................................29
3.5.2 User_Logout:........................................................................................................................................30
3.5.3 User login view and report:.................................................................................................................31
3.6 COLLABORATION DIAGRAM:..........................................................................................................................32
3.6.1 Sale department_Login:.......................................................................................................................32
3.7 DESIGN CLASS DIAGRAM:..............................................................................................................................33
3.8 STATE CHART DIAGRAM:...............................................................................................................................34
3.8.1 User_Login:..........................................................................................................................................34
3.8.2 UC_Enter_Product:.............................................................................................................................34
3.8.3 UC_Sale_Voucher:...............................................................................................................................34
3.8.4 UC_Receive_DD:.................................................................................................................................34
4 DATEBASE INTERNAL &TECHNICAL DESIGN....................................................................................36
4.1 INTRODUCTION OF DATABASE:.......................................................................................................................36
4.1.1 What is database?.................................................................................................................................36
4.2 DATABASE SYSTEM:........................................................................................................................................36
4.2.1 DBMS Approach:.................................................................................................................................37
4.3 THREE-LEVEL ARCHITECTURE.......................................................................................................................37
4.4 DATA:..............................................................................................................................................................38
4.5 HARDWARE:....................................................................................................................................................38
4.6 SOFTWARE:.....................................................................................................................................................38
4.7 USERS:............................................................................................................................................................38
4.8 ADVANTAGES OF DATABASE:.........................................................................................................................39
4.9 BENEFITS OF DATABASE APPROACH:..............................................................................................................39
4.10 DATA INDEPENDENCE:...............................................................................................................................40
4.11 DATA INTEGRITY:.......................................................................................................................................40
4.11.1 Entity integrity:................................................................................................................................40
4.11.2 Referential integrity:........................................................................................................................40
4.11.3 Domain integrity:.............................................................................................................................41
4.12 IDENTIFICATION OF ENTITIES:....................................................................................................................41

ix
Online shopping system
4.13 ATTRIBUTE:................................................................................................................................................41
4.14 NORMALIZATION:.......................................................................................................................................42
4.14.1 First Normal Form:.........................................................................................................................42
4.14.2 Second Normal Form:.....................................................................................................................43
4.14.3 Third Normal Form:........................................................................................................................44
4.15 DATABASE DESIGN:....................................................................................................................................44
4.16 DATA MODELING:......................................................................................................................................45
4.17 PRODUCT TABLE:.......................................................................................................................................47
4.17.1 Product............................................................................................................................................47
4.17.2 Shopping..........................................................................................................................................48
4.17.3 User Login.......................................................................................................................................48
4.17.4 User Feedback.................................................................................................................................49
4.18 DATA MODEL SHOWING RELATIONSHIPS:.................................................................................................49
5 TESTING...........................................................................................................................................................51
5.1 TESTING:.........................................................................................................................................................51
5.2 TESTING STRATEGY:.......................................................................................................................................51
6.1 HOME PAGE.....................................................................................................................................................53
6.2 CUSTOMER RECORD FORM:............................................................................................................................54
6.3 UC_ENTER_PRODUCT:...................................................................................................................................55
6.4 UC_REGISTERUSER:.......................................................................................................................................56
6.5 UC_UPDATEUSER:.........................................................................................................................................57
6.6 USE_LOGIN:....................................................................................................................................................57
6.7 UC_VIEW_REPORTS:......................................................................................................................................58
6.8 UC_REPORTS_VIEW:......................................................................................................................................58
6.9 UC_Update:....................................................................................................................................................59

x
Project Report

Chapter 1 INTRODUCTION

1.1. Organization Profile


1.2. Problem Statement
1.3. Project Feasibility
1.4. Project Scope
1.5. Tools and Technology
1.6. Risk List

11
Project Report

1 INTRODUCTION
The system which I am going to develop as my final project is the Online shopping
management system. This document is developed to serve as a starting point of the
software development process.

1.1 Organization Profile:


Online shopping system software first designed on 13th of July 1998, to provide the
facilities to customer to purchase all necessary goods at one place. The purpose of
organization to establish the concept of online goods which customer can easily select
according to his needs. The customer can book his order from any place.

1.2 Problem Statement:


The existing system uses the concepts and basis of conventional system with clerical
office and clerical staff to maintain information. The existing system works manually.
The firm itself has to maintain, manage and set policies from the format and maintain
data.
This project work is related to the development of online shopping Management System
This project is build because the existing system is manual and is not efficient to provide
all information in due time and make the shopping very easy for any customers.

1.3 Project/Product Feasibility Report:


1.3.1 Technical Feasibility:
The system which is to be developed is Web based and PHP technology along with
SQL Server will be used to develop it. The project team has got the status to use these
technologies. The software required for doing this project is easily available.

1.3.2 Operational Feasibility:


The staff that will be designed software so that it is easy to use. They will additionally
provided with help and guidance (if needed) to operate the software to provide the
accuracy and reliability of the data.

1.3.3 Economic Feasibility:


There is no need for purchasing the tools and license used during the development of
the project. All tool and technologies that are required during development are

12
Project Report

already with the development team. This makes the development economically
feasible. Only costing and sale factor is the effort of the project members and time
that is utilized in project development. The maintenance cost and operation cost is
there.

1.3.4 Schedule Feasibility:


Time is an important factor. I have got the required resources to complete the project
on time. I am in the final semester of my program and there is sufficient time
available to me for completing this project on the required date and time to complete
the task.

1.3.5 Specification Feasibility:


The project team has a clear picture of what we have to develop and what the system
must have in it to be successful. The project team will have a complete and clearer
picture when we are through with the requirements specification and gathering phase.
The requirements are becoming clearer and definite with the passage of time.

1.3.6 Information Feasibility:


The information regarding its completion, reliability, and meaningfulness is ensured
by the use of the Internet, books, and software development requirements. The project
will itself be informative and helpful to the concerned authorities after completion.

1.3.7 Motivational Feasibility:


The client’s staffs that will actually using the system are motivated to use this system
as one of the goals of the system is helping them with their work.

1.3.8 Legal & Ethical Feasibility:


The system is free of any infringements or liabilities. It is not violating any legal or
ethical values.

1.4 Project Scope:


This project work covers the whole data about the Purchase and Sale departments of the
Online shopping Management System. The Sales department includes sales and keeps
the record of all sales. The purchase department includes the records of purchase of
goods and include all the purchases.

13
Project Report

1. A SQL Server that provides interaction with the system to the users that are
physically distributed on same location.
2. A centralized database.
3. The system will have adequate redundancy to ensure fail-safe operation.
4. Tracking of all the stock whether it is in the ware-houses or in the pipeline (in
the process of inspection or delivery).
5. It will handle the production. When the online shopping system receives a
purchase order, it delivers goods to the actual customer, and he receives the
receipt (GRN) (Goods Receive Note) in return.
6. The system will be accessible to all who have a valid login; users with a valid
login can access the system virtually anywhere and do the required task where
computer and Internet facilities are available.
7. The system will deal with the financial module of sale and purchase and other
expenses and HR module.
8. It is not costly, only single computer is sufficient to keep the whole record.
9. It is not a time consuming system.
10. It needs only a single person with basic knowledge of computer.
11. It is fast and generates reports within specified time as required.
12. Insertion, Deletion and updating of the records are very easy.
13. It is easy to add or remove new records according to the requirements.
14. Redundancy problem is solved because information stored on a single place.
15. It has backup facility and recovery options and data can be stored on any
removable media.

1.5 Tools and Technology:


Online shopping management system is complex software, which makes selection of the
technologies required for the implementation of the project, to achieve the required result
according to different operations that are performed.

14
Project Report

1.5.1 Microsoft Project:

Microsoft Project is project management software that is ideal for the


designing and documentation of large projects. MS Project is designed
to assist project managers in developing plans, assigning resources to
tasks, tracking progress, managing budgets and analyzing workloads
perform the any task and make the system reliable and accurate.

1.5.2 Microsoft Visio:

Microsoft Visio is used to make diagrams for design phase and


documentation.

1.6 Risk list:


The possible risks that can occur during the course of the project are listed below:

# Risks Risk Type Probability Mitigation Actions


1. The schedule pressure Schedule Risk 50%  We have divided the
can force some function whole process in
points to be changed or modules.
dropped from being  All activities are listed
implemented as planned on the network diagram
in the planning phase. with proper planning,
and sufficient time
allocated to each
activity.
2. The requirements can Scope Risk 40%  Sufficient time is
change over time. provided for
requirement elicitation.
 The applicable changes
will be handled if
possible.
3. The product scope can Scope Risk 30%  The product will be
keep expanding. built by using relatively
independent modules
so that any new
functionality can be
added.
4. The transaction time can Technological 25%  A relatively simple and
be a bit higher Risk efficient solution will
depending upon the be found and tried.
internet speed
5. This is the largest Organization 15%  Experienced people in

15
Project Report

project the team has Risk the related fields will


ever attempted, so it can be consulted.
result in some pressures  Lack of experience will
and problems because of be reduced by the usage
the lack of experience. of knowledge and
technology.
6. Although the team People Risk 15%  Experienced people in
members have the related fields will
appropriate skills, but be consulted.
they have not used their
skills on such a broader
scope.
7. The users of the system Technological 10%  The user will be
might need some time to Risk provided with sufficient
get familiarize with the on the hands help to
system learn the usage of the
system early and easily.

16
Project Report

Chapter 2 REQUIREMENT ANALYSIS

2.1. System Specification


2.2. Identifying External Entities
2.3. Context Level Data Flow Diagram
2.4. User Characteristics
2.5. Allocate Requirements

17
Project Report

2 REQUIREMENT ANALYSIS
In this chapter I have discussed requirements engineering process, which provides the
appropriate mechanism for understanding what the customer wants, analyzing needs,
assessing feasibility, negotiating a reasonable solution, specifying the solution
unambiguously, validating the specification and managing the requirements as they are
transformed into an operational system.

1. Requirements elicitation
2. Requirements analysis and negotiation
3. Requirements specification
4. System modeling
5. Requirements validation
6. Requirements management

Here, requirements specification is to be discussed. Requirements specification would


lead to the following steps:
1. Identify external interfaces
2. Development of context diagram
3. User characteristics
4. Allocate requirements
5. Prioritize requirements
6. Development of requirements traceability matrix

18
Project Report

2.1 System Specification:

2.1.1 Summary of Requirements (Initial Requirements):


Our purposed system must fulfill the requirements as follow:

1. Database administrator shall register all the users. He will be able to


update, recover and backup the database and maintain the security. He will
set the user privileges. He will also handle day to day matters regarding
the database. He will also define the basic entities like the party, product,
purchase rate, user etc.

19
Project Report

2. A user must login to the system to be able to use the system. A user shall
be able to view different types of reports regarding the system according
to his privilege level. He must logout of the system after using the system
and no one can use the system invalid.

3. The online shopping management sales its products to different customers.

4. The shopping management has Bank Accounts which are used for debit
and credit.

5. The transaction slip has Account id and debit or credit amount.

2.2 Identifying External Entities:


The identification of the external entities is based on the information contained in the
above abstract. The Identification of External entities is done in two phases.

2.2.1. Over Specify Entities from Abstract:


1. Customers
2. User
3. Purchase Order
4. Computer operator
5. Database
6. Stock
7. Product
8. List of all items
9. Sale Order
10. Bank Account
11. Transaction Slip

2.2.1 Refined Entities:


After refining the entities we found the following entities to fit our Business
Logic.
1. Customer

20
Project Report

2. User
3. Purchase Rate
4. Product
5. Bank Account
6. Transaction Slip
7. Quality
8. Sale Order

2.3 Context Level Data Flow Diagram:

2.4 User Characteristics:


Para Initial Requirements
#
1.0 DB Admin “shall” register all users.
1.0 DB Admin “shall” set privileges for all users.
1.0 DB Admin “shall” update database.
2.0 A user “shall” login to the system.

21
Project Report

2.0 A user “shall” logout of the system.


2.0 A user “shall” view his action list.

2.5 Allocate Requirements:

Para Initial Requirements Use Case Name


#
1.0 DB Admin “shall” register all users. UC_Register
1.0 DB Admin “shall” update database. UC_Update
1.0 DB Admin “shall” set privileges for all users. UC_Privileges
2.0 A user “shall” login to the system. UC_Login
2.0 A user “shall” logout of the system. UC_Logout
2.0 User “shall” view reports. UC_Reports_View

22
Project Report

Chapter3 OBJECT ORIENTED ANALYSIS AND DESIGN

3.1. High Level Use case Diagram


3.2. Analysis Level Use Case Diagram
3.3. Use case Description
3.4. Domain Model
3.5. System Sequence Diagram
3.6. Collaboration Diagram
3.7. Design Class Diagram
3.8. State chart diagram

23
Project Report

3 OBJECT ORIENTED ANALYSIS AND DESIGN

The objective of Object Oriented Analysis and Design is to develop a model that
describes computer software as it works to satisfy a set of requirements. After
understanding the current situation of the problem domain the team is ready to strive for
the solution by using OOAD approach and database of the relations.

3.1 High Level Use case Diagram:

24
Project Report

3.2 Analysis Level Use Case Diagram:

25
Project Report

3.3 Use case Description:

UC-ID UC-01
UC-Name UC_Register
Pre-Condition: The DB Admin must login in the system with “administrator” login.
Description: This use case describes the creation of user accounts.
Basic Flow:
1. DB Admin clicks on create a new account link.
2. A Window form appears in front of him.
3. DB Admin fills in the required data (i.e. username, password of the user).
4. DB Admin clicks on the save button and exits.
Alternative Flow: The user can cancel the process at any time.
Post-Condition: DB Admin informs the desired person of his username and password.
Extensions: None.

UC-ID UC-02
UC-Name UC_Update
Pre-Condition:
The DB Admin must login the system as administrator.
Description:
This use case describes how the DB Admin updates any form of the system.
Basic Flow:
1. DB Admin double clicks on the grid view in the form button.
2. DB Admin updates the required fields.
3. DB Admin clicks on the Update Button of the foem.
4. DB Admin clicks on Exit Button.
Alternative Flow: The user can cancel the process at any time.
Extensions: None.

UC-ID UC-03
UC-Name UC_Login
Pre-Condition:
The user must have a valid username and password.
Description:
This use case describes how a user can login the system.
Basic Flow:

26
Project Report

1. The user opens the project and run the project.


2. The user enters his username and password and clicks on the Login button.
3. If the user is validated by the system he is shown main form depending on his
privilege level.
4. The user is ready for doing his work.
Alternative Flow:
3. If the username and/or password is wrong the user remains on the same screen.
The user can cancel the process at any time.
Post-Condition: A log is created.
Extensions: None.

27
Project Report

3.4 Domain Model:

28
Project Report

3.5 System Sequence Diagram:

The UML system sequence diagram (SSD) describes the events sequence inputs from
external source to the system. The SSD will define the system events and operations.
System sequence diagrams are a timeline drawing of an expanded use case. Events are
related by time with the top events occurring first. System events are the important items.
These are events that cause a system response.

The System Sequence Diagrams of the Online Inventory System of online shopping
management system are shown below.

3.5.1 User Login:

SYSTEM

USER

1: Invoke Login Form

2: Show Login Form

3: Login (User Name, Password)

4: Validate(U,P)

5: Invalid Login

6: Show Main Form

29
Project Report

3.5.2 User_Logout:

SYSTEM

USER

1: Invoke Main Form

2: Show Main Form

3: Select Log Out from Main Form

4: Out from Log Table(Data Adapter)

5: Log Out From System

30
Project Report

3.5.3 User login view and report:

SYSTEM

USER

1: Invoke Main Form

2: Show Main Form

3: Select Required Report

4: Prepare Report

5: Show Report

6: Select Action(action)

7: Action()

8: Action() Result

31
Project Report

3.6 Collaboration Diagram:

A collaboration diagram describes a pattern of interaction among objects and its relations;
it shows the objects involved in the interaction by their links to each other and the
messages that they send to each other for information.
interacted diagrams are used to show how objects interact to perform the behavior of a
particular use case, or a part of a use case. Along with sequence diagrams, collaborations
are used by designers to define and clarify the roles of the objects that perform a
particular flow of events of a use case. They are the primary source of information used
to determining class responsibilities and functions.

The collaboration diagrams of the Sales and Purchase Management System of online
shopping management system are shown below:

3.6.1 Sale department_Login:

7: Show Main Form


User Screen

USER

2: Prompt User Info 6: Initialize User Screen

1:Login, 3:Enter(username,password)

5: Valid Input

System Screen DB Handler

4: Valid Input

32
Project Report

3.7 Design Class Diagram:

33
Project Report

3.8 State Chart Diagram:

3.8.1 User_Login:
Start Login
System Screen Main Form

3.8.2 UC_Enter_Product:
/ Fill Required Fields

Request Product Form


Main Form Product Form

3.8.3 UC_Sale_Voucher:
/ Fill Required Fields

Request BankAccount Form


Main Form BankAccount Form

3.8.4 UC_Receive_DD:
/ Fill Required Fields

Request Transaction Form


Main Form Transaction Form

34
Project Report

Chapter4 DATEBASE INTERNAL &TECHNICAL DESIGN

4.1. Introduction to Database


4.2. Database system
4.3. Three Level Architecture
4.4. Data
4.5. Hardware
4.6. Software
4.7. Users
4.8. Advantages of Database

4.9. Benefits of Database approach


4.10. Data Independence
4.11. Data Integrity
4.12. Identification of Entities
4.13. Attribute
4.14. Normalization
4.15. Database design
4.16. Data Modeling
4.17. Product Table
4.18. Data Model Showing Relationships

35
Project Report

4 DATEBASE INTERNAL &TECHNICAL DESIGN


4.1 Introduction of database:

Database is a collection of information in a structured way. It is collection of the data.


Data is a collection of raw, fact and figure. We can say that it is a collection of a group of
facts. Your personal address book is a database of names you like to keep track of, such
as personal friends and members of your family.
A database consists of an organized collection of data for one or more uses, typically in
digital form. One way of classifying databases involves the type of their contents, for
example: bibliographic, document-text, statistical etc.

4.1.1 What is database?


“A database is a collection of information organized into interrelated tables of
data and specifications of data objects. It is used to store information. Of related
records.”
The specific features of database may include:
 Representing the information about a real-world enterprise or part of an
enterprise.
 Collected and maintained to serve specific data management needs of the
enterprise.
 Activities of the enterprise are supported by the database and continually
update the database.

4.2 Database system:


It is a used to collect and store the data. It is also known as computerized data files.
Database system is essentially a computerized record keeping system. The database itself
can be regard there are basically four components of database system
4.2.1. Database Management System (DBMS):
A general purpose software system enabling:
 Creation of large disk-resident databases.
 Posing of data access of data in a standard manner.

36
Project Report

 Retrieval of query results efficiently.


 Concurrent and accuracy of the data. Reliability mean accuracy of the in
an organized manner.

4.2.1 DBMS Approach:


DBMS:
 Separation of data and metadata
 Meta data is the data about data
 Flexibility of changing metadata
 Program-data independence
Data access language:
 Standardized –SQL
 Ad-hoc query formulation –easy
 Web development php language.
System development:
 Less effort required
 Concentration on logical level design is enough
 Components to organize data storage
 Process queries, manage data access, recovery from failures, manage
access control are all available to provide accuracy.

4.3 Three-Level Architecture


User 1 User 2 User 3

External
Leve View 1 View 2 View n

Conceptual C on cept ual


Level Sch ema

Int ern al
Internal Level Seh ema

Physical Data
Organizati on Database

37
Project Report

4.4 Data:

Data is information that has been organized and categorized for a pre determined
purpose. Data is a collection of raw fact and figure date is a unprocessed form it is
processed to get required information to achieve the result that is needed.

4.5 Hardware:
Hardware is a machine which we use to store access manipulates and manages the
data it consist of following two things
1. The secondary storage volumes typically moving head magnetic tapes.
2. The processor and associated main memory that are used to support the
execution of the database system software.

4.6 Software:
All the request form users for access to the database are handled by DBMS software
manage the use of all hardware.

4.7 Users:
a) Application programmer:
An Application programmer is someone who works in many different programming
languages to create the source code, which is responsible for creating small or large
parts of a piece of software in concert with others.  Applications programming is the
meat and potatoes of programming, and requires a very creative mind, as well as
some of application software are as follows example games, music etc. the
requirements of their teammates and the code itself. An application is a program that
is use to manage and handle the hardware.
b) End user:
The second class of user is end user. End-users use the software to assist with some
task. This may be flying an aircraft managing insurance policies, writing a books etc.
The end user has no deep knowledge. The end user interact with the application to
enter data into database and keep the record.

38
Project Report

c) Database administrator:
A database administrator (DBA) is a person responsible for the design,
implementation, maintenance and repair of an organization's database. Database
administrator manages the database and performs the all necessary operations.

4.8 Advantages of database:


The advantages for database system rather than on the paper based record keeping.
Maintain the record and keep the data in the relation form each relation has its own
specific the data.
4.3.1. Data Security:
Security is the most important in the database and it provide the accuracy and
reliability of the data. In data base it avoid the redundancy and inconsistency.
Redundancy is the duplication of the data.
 Compactness
There should be compactness in the data.
 Speed
Machines can retrieve and update data very fast and efficiently.
 Accuracy
Accuracy of data is very important it full fill all the constraints of the
data..

4.9 Benefits of database approach:

The benefits of the database approach are as follows

 Data Independence
 Consistency of Data

 Control Over Redundancy

 Integrity of Data

 Greater Security of Data

39
Project Report

 Centralized Control of Data

 Increased Productivity

 Minimal Data Redundancy

 Data Sharing

 Ease of application development

 Enforcement of standards

 Data can be shared

 Physical data independence

 Logical data independence

4.10 Data independence:

Data independence is the type of data transparency that matters for a centralized DBMS.
The application should not be involved with these issues, since there is no difference in
the operation carried out against the data. The data independence and operation
independence together gives the feature of data abstraction. Data independent fulfill all
the rule of normalization that value of one attribute do not depend on the value of other
attribute.

4.11 Data integrity:

Data integrity is data that has a complete or whole structure. All characteristics of the
data including business rules, rules for how pieces of data relate dates, definitions and
lineage must be correct for data to be complete. Data integrity is the accuracy and the
reliability of the data. It provides all the necessary constraints on the data. It stop the
invalid data when user enter any wrong input in the required field.

40
Project Report

4.11.1 Entity integrity:

Entity integrity concerns the concept of a primary key. An entity is a person, place
or anything. Entity can obtain the value form the range 0 to 9. Entity integrity is
the constraint on the entity value that is entered to specify the value.

4.11.2 Referential integrity:

Referential integrity concerns the concept of a foreign key. It refer the primary
key of the other table in the database.

4.11.3 Domain integrity:

A domain is a set of all possible values that is entered in the database to provide
the integrity and accuracy and reliability of the data. The data in the domain remain the
consistent.

4.12 Identification of Entities:

Entity is a basic data object in database modeling. Entity can be person, a place, an event
or a thing about which we have to save data in the database. Database is a collection of
entities. The first step in database modeling is to identify entities of database. This is of
the major parts in conceptual database modeling. Each entity should be significant.

 Each entity should be generic.


 Each entity should be fundamental.

a) Significant:

List only user is the most important entities for the database to keep the rescored of
the different organization.

Generic:

List only types of things, not individual instances.

e) Weak entity:

41
Project Report

An entity that depends on the other entity is known is weak entity it depend on the
other entity. For example if class does not exist than student cannot get admission its
mean that student depends on the class.

4.13 Attribute:

Entity contains a set of attributes. We can call attributes as properties, features or quality
of the entity. Attributes are the characteristic of an entity. While defining attributes, we
should consider following points.

 Primary key should not be null.


 Primary key should be not updateable.

4.14 Normalization:

Normalization is a process to organize the data in an efficient manner. There are two
basic results which we expect from normalization. The process of purifying the data is
known as normalization. In normalization errors are removed from the relations.

Std_id Name Address Subject Credit

1 Muhammad AB colony D.B 3.0

2 Khan CD colony O.S 3.0

a) Redundant Data:
Redundancy mean duplication of the data in normalization redundancy of the data should
be removed the duplication of data should be removed from the relations.
b) Modification Anomaly:
Modification anomaly is the error during the update of data.
c) Deletion Anomaly:
The error during deletion of the data. This error during the deletion of the record from the
relation or database.
d) Insertion Anomaly:

42
Project Report

The error of insertion during insert of the data into the database. This error occur when
we insert the data into the database.

4.14.1 First Normal Form:


IN first normal form it remove the repeating groups from the relations.
Std_id Name Subject Credits Address

1 Ahmed D.B 3.0 2-C

2 Ali O.S 3.0 3-C

Table2: Maintenance detail Table

In This Maintenance Detail table Receipt _no will be a primary key.


Hence we can say, in first normalization form, we have to do following things:

 Eliminate Redundant Data.


 Declare Primary Key.

4.14.2 Second Normal Form:


First of all, to implement second normal form, we have to implement first normal
form. First normal form requires maintaining the atomicity of data and remove the
transitive dependency.
Understand the concept of second normal form, consider the following example.

Std_id Name Dept Session Status

1 Ali Ahmed C.S 90 Fresh

2 Rizwan Math 95 Fresh

43
Project Report

Std_id Course Date


Completed

1 C++ X/Y/Z

2 Java X/Y/Z

4.14.3 Third Normal Form:


Third normal form requires that all the non key attributes should complete depend on
primary key attribute which mean that there should be any transitive dependency in
table attributes.

Std_id Name Major Advisor

1 Rizwan Math ALI

2 Faheem English JAWAAD

Some time, it can make things too complex while implementing these normal form so
best way is to find a balance as when it gets too complex then many DBMS requires
more resource or it can decrease the performance.

4.15 Database design:

A carefully thought-out database design forms the foundation for future success. These
links will help you plan your database designs to maintain performance and integrity
through future growth. Ddatabase design is the process of producing a detailed data
model of a database. This logical data model contains all the needed logical and physical
design choices and physical storage parameters needed to generate a design in a Data

44
Project Report

Definition Language, which can then be used to create a database. A fully attributed data
model contains detailed attributes for each entity.

4.16 Data Modeling:

Data modeling in software engineering is the process of creating a data model by


applying formal data model descriptions using data modeling techniques. The data
requirements are recorded as a conceptual data model with associated data definitions.
Actual implementation of the conceptual model is called a logical data model.

a) Entity Relationship Diagram (ERD)

An entity-relationship diagram is a data modeling technique that creates a graphical


representation of the entities, and the relationships between entities, within an
information system.

 Identify Entities
 Define relationships

a) Basic Objects:

U se rectangl e to represent an enti ty

Use Di amand to draw reationalship betw een two enti tes

U se Ellipe to r epr esent attributes

Use to Show the linkage

U se to r epr esent for weak enti ty

Us e to show m ul ti valued attributes

- ---- --- --- ---- --- --- ---- --- - U se to represent for eign key attri butes

_______________
Us e to mention pr im ar y key attr ibute

45
Project Report

Attributes of User:

UserId Login Password User(Login)1


PK UserId

Login
User(Login) Password

Attributes of Product:

ProductId ProductName

Product
PK ProductId
Product
ProductName

Attributes of BankAccount:

AccountId AccountNo BankAccount


AccountHolder
PK AccountId

AccountNo
AcccountType AccountHolder
AccountType
BankAccount
Bank

Bank

46
Project Report

4.17 Product Table:


4.17.1 Product

47
Project Report

4.17.2 Shopping

4.17.3 User Login

48
Project Report

4.17.4 User Feedback

4.18 Data Model Showing Relationships:

49
Project Report

Chapter 5 TESTING

5.1. Testing
5.2. Testing Strategy

50
Project Report

5 TESTING
5.1 Testing:

It is the process used to help identify the correctness, completeness, security, and quality
of developed computer software. Testing is a process of investigation, performed on
behalf of performance, that is used to check the quality-related information about the
product.

5.2 Testing Strategy:

Software testing methods are traditionally divided into:

1. White box testing.


2. Black box testing.

System:

Sales and Purchase Management System of online shopping managements system.

Expected Result:

Message will appear that please enter correct user name and password.

Actual Result:

Error occur with the following message “Please enter correct username and password

1. Open the Main Form


2. Select Main Menu to enter in a Party Form.

51
Project Report

Chapter 6 USER INTERFACE AND DESIGN

6.1. Home Page


6.2. Customer Record Form
6.3. Reports
6.4. UC Enter Product
6.5. UC Register User
6.6. UC Update User
6.7. Use Login
6.8. UC View Reports
6.9. UC Reports View
6.10. UC Update

52
Project Report

6.1 Home page

53
Project Report

6.2 Customer Record form:

54
Project Report

6.3 UC_Enter_Product:

55
Project Report

6.4 UC_RegisterUser:

56
Project Report

6.5 UC_UpdateUser:

6.6 Use_login:

57
Project Report

6.7 UC_View_Reports:

6.8 UC_Reports_View:

58
Project Report

6.9 UC_Update:

59

You might also like