1. 1 | P a g e
AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH
Inventory MANAGEMENT SYSTEM
Course Teacher: Md. Ezazul Islam
Course Name: Introduction to Database
Section: J
Submitted By
NAME ID
1. Azam ,Md Syful ........................................... 15-29625-2
2. 2 | P a g e
INDEX
Page No
1Abstract……………………………………………………………………….03
2. Overview …………………………………………………………………..03
3. Feature of this project ……………………………………….………04
4. De-normalized schema of the database ……………………..05
5. Normalization………………………………………………………07
6. ER Diagram………………………………………………………………….09
7.Table Creation And data insertion………………………………..10
8.Sql query questionneries……………………………………………..20
Relational Algebra …………………………………………………….……21
8. Summery …………………………………………………………………….23
9.The End…………………………………………………………………………24
3. 3 | P a g e
ABSTRACT
“Inventory Management System for Small and Medium Enterprise (SME). ” is a
database system to manage a for Small and Medium Enterprise (SME) stock. This
system wake to provide service facility to the Small and Medium Enterprise
(SME) and also to the customer. The services that are provided is ordering and
bill information of the customer through the database, customer information
management and salesman information management, product information
management and report. Main objective build the system is to provide ordering
and billing easily to the customer. With this system ordering and billing
management will become easier and systematic to replace traditional system
where some are still using paper. Furthermore, this system is applicable anytime
and anywhere. During the development software we used is Oracle 10g Express
Edition. Furthermore, this project will develop for inventory management and
enhance business system. Others, this project to facilitate customer for make
faster ordering and counting inventory.
Overview:
The purpose of this system is to keep track and report changes in product
inventory. This system tries to simulate product inventory and sales
management.
Available products quantity which is ready to sell tweaks in two ways. It surges
in number when some supplier supplies products and company accepts the supply.
On the other hand available products quantity drops when some salesman sell
products to some customers. These two are the entry point of the system. When
some suppliers supply products, Product table keeps it as a new entry and if the
product is of a new type or of a new category the Product table keeps track of
these. All these changes are related to increment of available products. On the
other hand, available quantity of product declines when some customers purchase
product from the company. Some salesman, who represent the company to the
customer,works under a Manager and sell the product to customer. Hence this
operation results in the system in two different ways. Decline in available product,
increase in sales by the salesman on behalf of the company. These changes are
kept in product and inventory table.
4. 4 | P a g e
Feature of this project:
• PRODUCT: Defines product’s unique identity. ORDER: Defines new orders for a
product.
• SUPPLIER: Defines unique identity of a supplier who supplies product to company.
• Salesman: Defines Company’s deployed employee.
• Inventory: How much product still in stock.
• CUSTOMER: Defines information about customers.
Target User:
The countrywide small and medium entrepreneur who has regular
transaction can use this application.
5. 5 | P a g e
●De-normalized schema of the database:
1.Customer & Phone :
Cus_id Cus_address Cus_name Ph_number
INSERTION ANAMOLIES:
If user insert a data of customer then he needs to insert the values of Ph_number
also.if the customer have no phone number yet we can not insert his/her
information.
DELETION ANAMOLIES:
If user or owner wants to delete A Customar document ,then he can delete his
name. But along with this some of the data like Cus_id, Cus_adress, Ph_number
will be deleted also. This is a deleteion anamolies.
MODIFICATION ANAMOLIES:
If user wants to update any data of cus_adress, then changing data in a row
forces changes to other rows where exactly this cus_id is exist because of
duplication
6. 6 | P a g e
2.Order & Salesman:
Sal_id Pro_id Mgr_id Sal_name Pro_Sell_Date
INSERTION ANAMOLIES:
If user insert any data of sales man then he needs to insert the values of Mrg_id
also.But if salesman still not a manager we can not insert this salesman data.
DELETION ANAMOLIES:
If user or owner wants to delete a salesman document ,then he can delete his
name. But along with this some of the data like sal_id, salesman Mgr_id will
be deleted also. This is a deletion anamolies.
MODIFICATION ANAMOLIES:
If user wants to update any data of sal_name, then changing data in a row forces
changes to other rows where exactly this sal_id is exist because of duplication.
7. 7 | P a g e
3.Supplier & Product:
Pro_id Pro_name Pro_price Supp_id Supp_name
INSERTION ANAMOLIES:
If user insert any data of product then he needs to insert the values of pro_id
also.But if one of the product prize still not fixed then we can not insert this
product data.
DELETION ANAMOLIES:
If user or owner wants to delete a products document ,then he can delete
pro_name. But along with this some of the data like pro_id, pro_price will be
deleted also. This is a deletion anamolies.
MODIFICATION ANAMOLIES:
If user wants to update any data of pro_price, then changing data in a row
forces changes to other rows where exactly this pro_id is exist because of
duplication.
8. 8 | P a g e
NORMALIZATION:
1.ZERO TO 1ST NORMAL FROM:
Cus_id Cus_name Cus_address Ph_number
Here is our zero Normal from, and here phone number are multivalued
attributes.After removing these problem it will convert into 1st
1NF :
TABLE: CUSTOMER
Cus_id Cus_name Cus_address
TABLE: PHONE
Cus_id Ph_number
After dividing this is in 1st
Normal form and there is no Multivalued problem
and there is no problem with insertation,delation,modification.
2.GETTINF INTO 2ND NORMAL FROM:
Here Sal_id and Pro_id are composite primary key which is called entire
key.We can see Pro_Sell_Date depends on full entire key,But Mgr_id and
Sal_name depends only Part of the key.Which is called Partial Dependency.For
2nd
NF .
For 2nd
NF I have to remove partial dependency by separating them into two
different table
Sal_id Pro_id Mgr_id Sal_name Pro_Sell_Date
9. 9 | P a g e
TABLE: ORDER
TABLE: SALESMAN
After dividing this is in 2nd
Normal form and there is no partial dependency
and there is no problem with insertation, delation , modification.
3. 3rd Normal from:
Here non key depend on another non key and both depend on same primary
key.when one attribute functionally determines a second which functionally
determines a third this is called Transitional Dependency.
For 3nd
NF I have to remove Transitional dependency by separating them into
two different table.
TABLE: PRODUCT
TABLE:SUPPLIER
After dividing this is in 3rd
Normal form and there is no Transitional dependency
and there is no problem with insertation, delation , modificati
Sal_id Pro_id Pro_Sell_Date
Sal_id Sal_name Mgr_id
Pro_id Pro_name Pro_price Supp_id Supp_name
Pro_id Pro_name Pro_price Supp_id
Supp_id Supp_name
11. 11 | P a g e
TABLE CREATION AND DATA INSERTION :
1) create table customar
(cus_id number(4) primary key,
Cus_name varchar2(40),
Cus_address varchar2(30));
Value insert:
insert into customar values(101,'Dehan', 'Bosundora');
insert into customar values(102,'Rimon', 'Baridara');
insert into customar values(103,'Ridon', 'Banani'); insert
into customar values(104,'Rafsan', 'Nikunju'); insert
into customar values(105,'Tarek', 'Khilkhet'); insert into
customar values(106,'Yasin', 'Badda');
12. 12 | P a g e
2) create table Bill
(Sal_id number(10),
Cus_id number(10));
Value Insert:
insert into Bill values(1,101); insert
into Bill values(2,103); insert into
Bill values(3,104); insert into Bill
values(4,102); insert into Bill
values(5,101); insert into Bill
values(6,102);
13. 13 | P a g e
3)create table Salesman
(Sal_id number(10) primary key,
Sal_name varchar2(30)
Mgr_id number(10));
Value insert :
insert into salesman values(1,'Rahim',1000);
insert into salesman values(2,'Karim',1000); insert
into salesman values(3,'Jamal',1000); insert into
salesman values(4,'Arafat',1000); insert into
salesman values(5,'Rafiul',1000); insert into
salesman values(6,'Himel',1000);
14. 14 | P a g e
4) create table Manager
(Mgr_id number(10) primary key,
Mgr_name varchar2(30));
Value insert:
Insert into Manager values(1000, 'Jamal')
5)create table Phone
(Cus_id number(10),
15. 15 | P a g e
Ph_number number(11));
Value insert:
insert into phone values(101,01681216686); insert
into phone values(101,01712345678); insert into
phone values(102,01814773866); insert into
phone values(103,01948466599); insert into
phone values(103,01682887185); insert into
phone values(104,01988455566); insert into
phone values(105,01715674598); insert into
phone values(106,01681223249);
16. 16 | P a g e
6)create table order1
(sal_id number(10)
Pro_id number(10)
Pro_Sell_Date date);
Value insert:
insert into order1 values(1,1001,'5-MAR-2016');
insert into order1 values(2,1041,'6-JAN-2016'); insert
into order1 values(9,1031,'5-APR-2016'); insert into
order1 values(7,1021,'29-MAR-2016'); insert into
order1 values(4,1078,'5-MAR-2016'); insert into
order1 values(8,1098,'10-FEB-2016'); insert into
order1 values(5,1089,'6-MAR-2016'); insert into
order1 values(3,1090,'5-JAN-2016');
17. 17 | P a g e
7)create table Product
(Pro_id number(10) primary key,
Pro_name varchar2(30)
Pro_price number(10)
Supp_id number(10));
Value insert:
insert into product values(1001, 'pepsi',60,100); insert
into product values(1041, 'Cocacola',80,100); insert into
product values(1031, 'Lays',65,300); insert into product
18. 18 | P a g e
values(1021, 'seven up',120,200); insert into product
values(1078, 'juice',150,900); insert into product
values(1098, 'potato chips',20,300); insert into product
values(1089, 'Minaral water',65,900); insert into product
values(1090, 'Horlicks',450,700);
8) create table inventory
(Pro_id number(30),
Quantity number(30));
Value insert:
19. 19 | P a g e
insert into inventory values(1001,1250);
insert into inventory values(1041,1000);
insert into inventory values(1031,500); insert
into inventory values(1021,678); insert into
inventory values(1078,10788); insert into
inventory values(1098,4538); insert into
inventory values(1089,7863); insert into
inventory values(1090,1567);
9) create table Supplier
(Supp_id number(10) primary key,
Supp_name varchar2(30));
20. 20 | P a g e
Value insert:
Insert into Supplier values(100, 'Pepsico');
Insert into Supplier values(200, 'Glaxo smith');
Insert into Supplier values(300, 'Pran');
Insert into Supplier values(400, 'olympic');
Insert into Supplier values(500, 'Nabisco');
Insert into Supplier values(600, 'Transcom');
Insert into Supplier values(700, 'Sajeeb');
SQL QUERY QUESTIONERIES:
1. Show all the information of product table?
21. 21 | P a g e
Ans: select * from product; 2. Find out the
Supplier whos name is ‘pran’?
Ans: select * from supplier where supp_name like '%Pran%' ;
3. Show pro_id,pro_name,pro_price sort the rows according to
pro_price(descending order)
Ans:Select pro_id,pro_name,pro_price from product order by pro_price desc;
4.Find the highest price product?
Ans: select max( pro_price) as Highest_price_product from product;
5.Delete sal_name ‘Himel’ from salesman table?
Ans: Delete from salesman where Sal_name='Himel';
6.Find out the name of the managers?
Ans: select Mgr_name from Manager;
7. Find the customers name those who lived in Banani?
Ans: select cus_name from customar where cus_address='Banani';
8. Show the salesman information as output is given below-“ Ridon
whos id 10 works for manager whos id is 100”?
Ans: Select sal_name||' whos id '||Sal_id||' works for manager whos id is
'||Mgr_id from salesman;
9.Find the amount of product remaining whos product id is 1089?
Ans: select quantity from inventory where pro_id=1089;
10.Find the supplier name who supplies cocacola?
Ans: select supp_name from product,supplier where
product.supp_id=supplier.supp_id and product.pro_name='Cocacola';
22. 22 | P a g e
11. Change the address to Gulsan of Customer whose Cus_id is 101?
Ans: update customar set Cus_Address='GULSAN' where cus_id=101;
12. Count the number of rows in product table?
Ans: select count(pro_id) from product;
13.In 06-JAN-16 which salesman collect the money from the customer?
Ans: select sal_name from order1,salesman where
order1.sal_id=salesman.sal_id and order1.pro_sal_date='06-JAN-16';
14.List all the product.
Ans:select * from product;
15.Who is the owner of “01712345678” this phone number?
Ans: Select cus_name from customar,phone where
customar.cus_id=phone.cus_id and ph_number=01712345678;
Relational algebra:
1.Find all the customer name?
Ans: cus_name (customer)
2.Find all the phone number of customar id 4?
Ans: ph_number ( cus_id=4 (customar))
3.Find the customer id whos name is ‘Dehan’ Ans:
cus_id ( cus_name = ‘Dehan’ (coustomar) )
4.Find the pro_name which price is greater than 200?
Ans: pro_name ( pro_price >200 (product))
23. 23 | P a g e
5.Find the supplier name of ‘cocacola’?
Ans: sup_name ( pro_name=’cocacola’
(product.sup_id=supplier.sup_id(product X supplier))
6.In 06-JAN-16 which product is sold?
Ans: : pro_name ( pro_sell_date=’06-jAN-16’
(product.pro_id=order1.pro_id(product X order1))
7.Find the customer who used ‘0161216686’ number?
Ans: cus_name( ph_number=’01681216686’(phone.cus_id=cutomar.cus_id)
(phone X customar)
SUMMERRY
24. 24 | P a g e
Why users should use the system that you have designed:
The main goal of the inventory management System is:
1)Order management;
2) customar information;
3) Bill management;
4)Product identification;
5) Inventory
optimization.
Inventory management system database is developed to
overcome all the current problems . As today people are
digitalizing day by day a complete inventory database system
is mandatory. For taking the business to the next level our
designed database system is very effective. However there
are a lots of scope to improve the performance of this
management system .Its user friendly and also saves time.
This database system hopefully will make a new era to the
inventory business.
THE END