You are on page 1of 26

Inventory management System Hossain Gazi Jubair(许飞)

Id No: 178801209

Yangzhou university
Course Title:
Principle of Database System.
Project Name :
Inventory management System.

Submitted By:
HOSSAIN GAZI JUBAIR (许飞) Submitted To:
Id no: 178801209 Professor Dr Caikou Chen
Major: Software Engineering Collage Of Information Technology
Department Of Software Engineering
YZU
Email: yzcck@126.com
Phone: 13952780010
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

Contents:

1. Background.
2. Goal.
2.1: Conceptual.
3. Database Design.
3.3.1: E - R Diagram:
3.3.2: Logical Data Model Design.
3.3.3: Relational schema.
3.3.4: Functional Dependencies.
3.3.5: primary key, foreign key, candidate key, Others key.
3.3.6: Normalization 3NF and B CNF.
4: Function Design / System Design.
5: Front - End Design.
5.1: programming Language.
6: Data Server Design.
7: What is DBMS.
8: Implementation.
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

1. Background:
Most of the contemporary Information systems are based on the
Database technology as a collection of logically related data, and DBMS
as a software system allowing the users to define, create, maintain and
control access to the database.
The process of constructing such kind of systems is not so simple. It
involves a mutual development of application program and database.
The application program is actually the bridge between the users and
the database, where the data is stored. Thus, the well-developed
application program and database are very important for the
reliability, flexibility and functionality of the system.
The so defined systems differentiate to each other and their
development comprises a great variety of tasks to be resolved and
implemented.
The basic idea can be depicted on Figure 1.1 below:
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

2. GOALS OF THE PROJECT:


The aim of database design is to produce an integrated database which
is accurate and secure. The objective is to achieve the business goal of
the company in a more efficient way than in the current system. The
process aims to design and develop an integrated database system
which will support the application system effectively and efficiently.

Insert, update, Delete, Clear, View, Stock.

We decided to implement the core functionality first and later to


attach additional functions. The Core functionality is:
 Add, delete and update Customer information.
 Add, delete, and update information about the stock , products and
employees.
 Insert new and change a customer order. A customer order exists out
of the customer information and the product informations.

Inventory management is essential for a business to succeed. Good


management of your company’s stock decreases excess inventory and
ensures that you have enough product on hand to meet customer
demand. Develop an inventory management plan to streamline ordering
and reduce wasted time on inventory control.

This decision is made because the short time schedule of four weeks and
the not experienced java abilities of the team. The teams minimum
target is to show these core functionalities in a user friendly Graphic
User Interface (GUI). This consideration is taken into the architecture of
the database, which tries to ensure a built on architecture. Additional
functionality has to be integrated in an easy way.
Examples of these additional features can be:
 Overviews of the entities Employee, Customer, Product, and Order.
 Error checking of the application.
 Possibility to arrange the customer information for the manager of the
Company. This enables the manager to get a greater knowledge about
the customers.
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209
3. Database Design:
Database is a file composed of records, each containing fields together
with a set of operations it helps in organizing data in a logical order for
references.
Database contains related data which are organized together in a group
of object, table, and file. It can be in form of node. In this project a
relational database concept will be used in this appraisal, related data
will be store or organize in different table.

The Database design of this system is showed in diagram 3.1 – 3.3

Diagram 3.1: Preview for Database Design for Employee Information


Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

Diagram 3.2: Preview for Database Design for Employee Salary .

Diagram 3.3: Preview for Database Design for Product.


Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

2.1: Conceptual:
The Inventory Management System is a real-time inventory
database capable of connecting multiple stores. This can be used to
track the inventory of a single store, or to manage the distribution of
stock between several branches of a larger franchise. However, the
system merely records sales and restocking data and provides
notification of low stock at any location through email at a specified
interval. The goal is to reduce the strain of tracking rather than to
handle all store maintenance. Further features may include the ability
to generate reports of sales, but again the interpretation is left to the
management. In addition, since theft does occasionally occur, the
system provides solutions for confirming the store inventory and for
correcting stock quantities.

3.3.1: E - R Diagram:

ER Diagram :
This diagram was developed to tell how the different entities in the
system are linked to each other entity with their attributes also listed.
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

Figure 3.1.1: Entity Relationship Diagram


Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

Figure 3.1.2: Entity Relationship Diagram


Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

3.3.2: Logical Data Model Design Of inventory


management system:
Login Roles Permission

Pk Roles_id Pk Per_id
Pk Login_id
Key Role_name Key Per_role_id
Key Login_role_id
Key Role_desc CK Per_mobile
CK Login_username
key Per_name
Key User_password
fk Roles_id
fk Per_id

User
Pk User_id
Key User_name
Customer CK User_mobile
Pk cus_id CK User_email
Key cus_name Key User_address
Key cus_add Fk Login_id
Key cus_pass Fk cus_id
CK cus_mobile Fk Inv_id
Ck cus_email Fk pay_id
Payment
Inventory
Pk pay_id
Stock
Pk Inv_id Key pay_cus_id
Pk Stk_id
Key Inv_type Key pay_desc
Key Stk_type
Key Inv_items Key Pay_data
Key Stk_desc
Key Inv_num key Pay_amt
Key Inv_desc
Fk Stk_id
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

3.3.2: Logical Data Model Design Of employee


management system :
Login Roles Permission

Pk Roles_id Pk Per_id
Pk Login_id
Key Role_name Key Per_role_id
Key Login_role_id
Key Role_desc CK Per_mobile
CK Login_username
key Per_name
Key User_password
Fk Roles_id
Fk Per_id

User
Pk User_id
Key User_name
Employee CK User_mobile
CK User_email
Pk Em_id Key User_address
Key Em_dep_id Fk Login_id
Key Em_name Fk Em_id
Key Em_code Fk Leave_id
CK Em_mobile Fk Salary_id
Ck Em_email
Salary
Leave
Pk Salary_id
Department Pk Leave_id Key Salary_em_id
Pk Dep_id Key Leave_em_id Key Salary_month
Key Dep_title Key Leave_type_id Key Salary_date
Key Dep_desc Key Leave_from key Salary_desc
Key Leave_status
Fk Dep_id
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209
3.3.3: Relational schema:

Login(Login_id, Login_role_id, Login_username, User_password)


User(User_id, User_name, User_mobile, User_email, User_address)
Roles(Roles_id, Role_name, Role_desc)
Permission(Per_id, Per_role_id, Per_mobile, Per_name )
Employee(Em_id, Em_dep_id, Em_name, Em_code, Em_mobile,
Em_email)
Department(Dep_id, Dep_title, Dep_desc )
Leave(Leave_id, Leave_em_id, Leave_type_id, Leave_from,
Leave_status)
Salary(Salary_id, Salary_em_id, Salary_month, Salary_date, Salary_desc )

Login(Login_id, Login_role_id, Login_username, User_password)


User(User_id, User_name, User_mobile, User_email, User_address)
Roles(Roles_id, Role_name, Role_desc)
Permission(Per_id, Per_role_id, Per_mobile, Per_name )
Customer(cus_id, cus_name, cus_add, cus_pass, cus_mobile, cus_email)
Stock(Stk_id, Stk_type, Stk_desc)
Inventory(Inv_id, Inv_type, Inv_items, Inv_num, Inv_desc)
Payment(pay_id, pay_cus_id, pay_desc, Pay_data, Pay_amt)

3.3.4: Functional Dependencies:


Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

Login(Login_id -> Login_role_id, Login_username, User_password)


User(User_id -> User_name, User_mobile, User_email, User_address)
Roles(Roles_id -> Role_name, Role_desc)
Permission(Per_id -> Per_role_id, Per_mobile, Per_name )
Employee(Em_id -> Em_dep_id, Em_name, Em_code, Em_mobile,
Em_email)
Department(Dep_id -> Dep_title, Dep_desc )
Leave(Leave_id -> Leave_em_id, Leave_type_id, Leave_from,
Leave_status)
Salary(Salary_id ->Salary_em_id, Salary_month, Salary_date, Salary_desc
)

Login(Login_id -> Login_role_id, Login_username, User_password)


User(User_id -> User_name, User_mobile, User_email, User_address)
Roles(Roles_id -> Role_name, Role_desc)
Permission(Per_id -> Per_role_id, Per_mobile, Per_name )
Customer(cus_id -> cus_name, cus_add, cus_pass, cus_mobile,
cus_email)
Stock(Stk_id -> Stk_type, Stk_desc)
Inventory(Inv_id -> Inv_type, Inv_items, Inv_num, Inv_desc)
Payment(pay_id -> pay_cus_id, pay_desc, Pay_data, Pay_amt)

3.3.5: primary key, foreign key, candidate key,


key:

Determining Candidate, Primary, Foreign, and others Keys

Those attributes which can uniquely identify entity are the candidate
keys, One of these attributes will be primary key, Foreign key and the
other keys.

Table 1. Associating entities with candidate keys, primary key and others
keys.
Entity Candidate Primary Foreign key others Keys
key key
Inventory management System Hossain Gazi Jubair(许飞)
Login Login_userna Login_id Roles_id, Login_role_id,
Id No: 178801209
me Per_id User_password

Roles Roles_id Role_name


Role_desc
Permission Per_mobile Per_id Per_role_id
Per_name
U User_mobile User_id Login_id User_name
User User_email Em_id User_address
Leave_id
Salary_id
Employee Em_mobile Em_id Em_dep_id
Em_email Em_name
Em_code

Leave Leave_id Dep_id Leave_em_id


Leave_type_id
Leave_from
Leave_status

Department Dep_id Dep_title


Dep_desc
S Salary_id Salary_em_id
Salary Salary_month
Salary_date
Salary_desc
U User_mobile User_id Login_id User_name
User User_email cus_id User_address
Inv_id
pay_id
Customer cus_mobile cus_id cus_name
cus_email cus_add
cus_pass

Inventory Inv_id Stk_id nv_type


Inv_items
Inv_num
Inv_desc

Stock Stk_id Stk_type


Stk_desc
Payment pay_id pay_cus_id
pay_desc
Pay_data
Pay_amt
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

3.3.6: Normalization 3NF and B CNF:


Employee Information:
Attribute

Primary key

Employee Salary Information:


Attribute

Primary key

Employee Salary Information:


Attribute
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209
Primary key

4: Function Design / System Design:


System Design is one of the tasking sections of the Programming. In this
section of the project many previews are going to be seen and we are
gradually getting close to the new system. System design is a transition
from a user-oriented document to a document oriented to programmers
or database personnel. The system design is structured into the
following parts:
*Output design
*Input design
*Database design
*System Flowchart

I Used Some Function Insert, Delete, update, view, clear, stock.

Also I Used Some Function Add, update, view, Delete.


Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

5: Front - End Design:


Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

5.1: programming Language:


Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209
Choice of Programming Language:
I uesed Java Programming Language in my Software Coding.
To ensure a standardized object oriented program in its entire
ramification, I used NetBeans IDE 8.2, and SQLite DBMS. These entire
programs were used to ensure effective program.
It also provides efficient back-up of data and provides adequate
security.

6: Data Server Design:

7: What is DBMS?
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

SQLite:

8: Implementation:
Inventory management System database:
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209
The database has JDBC (Java database connectivity) support. The
creation of the tables is made by using the query language SQL. Two
examples of the code are included below:

CREATE TABLE inventoryj (


id PRIMARY KEY,
name VARCHAR (30),
sellingprice DOUBLE,
category VARCHAR (30),
buyingprice DOUBLE,
quantity DOUBLE
);

CREATE TABLE balance (


serial INT PRIMARY KEY,
type DOUBLE,
details VARCHAR (50)
);

CREATE TABLE employeeinfo (


Employeeid INTEGER PRIMARY KEY,
Employeename VARCHAR (30),
Designation VARCHAR (30),
Employeesalary DOUBLE
);

CREATE TABLE salaryinfo (


EmployeeId INTEGER PRIMARY KEY,
EmployeeName VARCHAR (30),
EmployeeSalary DOUBLE,
PayingMonth VARCHAR (30)
);
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

Interface:
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209
Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

I used some Interface Insert, update, Delete, Clear, View, Stock.


Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

I used some Interface Add, update, Delete, View.


Inventory management System Hossain Gazi Jubair(许飞)
Id No: 178801209

Inventory management System application:


The application is implemented in Java. JDBC is used to connect to the
database and to obtain the associated information. As an example the
code to connect to the database is given below. JDBC is also used to call
SQL queries into the java code. This makes possible to access the
database and create, update or view the data stored.

Inventory management System graphic user interface (GUI):


The GUI is generated in Java. Therefore the Java package Java.swing was
most used. The Java enables to create the window design as shown as
shown in the User Manual. A further explanation of the GUI is illustrated
in the User Manual and the Test Scenarios.

You might also like