DBMS Project Report 1
DBMS Project Report 1
for
Submitted by
Thandalam, Chennai
Nov-Dec 2022
1|Page
BONAFIDE CERTIFICATE
Certified that this project report titled “Inventory Management System “the
bonafide work of "Adhithyan Aravind" who carried out the project work
under my supervision.
SIGNATURE SIGNATURE
Dr.K.Devaki Ms.K.Poornimathi
HEAD OF THE DEPARTMENT SUPERVISOR
Computer Science and Business Systems
Rajalakshmi Engineering College, Rajalakshmi Engineering College
Rajalakshmi Nagar, Thandalam, Rajalakshmi Nagar, Thandalam,
Chennai- 602 105 Chennai - 602 105.
2|Page
ACKNOWLEDGEMENT
I thank the Almighty God for the successful completion of the project. Sincere
thanks to our Chairman Mr. S.MEGANATHAN B.E, F.I.E., for his sincere
I would like to express our deep gratitude to our beloved chairperson Dr.
I would like to thank our Head of the Department of Computer Science and
Science and Business Systems for her invaluable guidance, ideas, and encouragement
3|Page
CONTENTS
4|Page
CHAPTER 1
INTRODUCTION
1.1 Overview
5|Page
1.2 INTRODUCTION-:
6|Page
1.3 SCOPE:
This will help us in maintain the exact count of any product.
Can help us to set minimum quantity of any product below which we can
order the product from manufacturer.
Can reduce duplicate entries
1.4 WORKING:
This application will have different front ends for different kinds of users. The
person who is sitting on the billing counter will have access to only modify the
quantity of any product i.e., he/she can either generate an invoice for any sold
product or can generate a return note for any returns from any customer. The
manager will have
the access to modify the rates if there exist any dynamic price inventory. The
owner of the firm will have the access to generate the final report which will be
consisting of sales done on any particular day, the total sales on any particular
counter or by any salesperson.
7|Page
1.5 Purpose:
8|Page
1.6 Goals of proposed system
9|Page
1.7 Background:
10 | P a g e
1.9 Technical Feasibility: Back End
In this project we’ve only implemented the back end of the system which is designed
on “SQL Plus”
On this sequence query language, we created 10 tables named:
1. Brands
2. invoice user
3. Categories
4. Products
5. Stores
6. Providers
7. Customer cart
8. Select product
9. Transactio
n 10. Invoice
11 | P a g e
1.10 ADVANTAGES
12 | P a g e
7. Inventory Orders. If you’ve done a good job keeping track of how
much inventory you have on hand, you can make smarter decisions
about when and what to order. Inventory management software lets you
speed up the ordering process. You can simply scan a product barcode
and type in some information to place an order and generate an invoice.
13 | P a g e
CHAPTER 2
ER DIAGRAM
14 | P a g e
2.2 Relationships according to the requirements
15 | P a g e
CHAPTER 3
RELATIONAL SCHEMA
16 | P a g e
CHAPTER 4
Normalization of schema
#1NF
OrderHistory.
#2NF
PurchaseOrder.
#3NF
17 | P a g e
CHAPTER 5
QUERIES
CREATE TABLE :
SQL> create table
brands( 2 bid
number(5),
3 bname varchar(20)
4 );
Table created.
inv_user(
2 user_id varchar(20),
3 name varchar(20),
4 password varchar(20),
5 last_login timestamp,
6 user_type
varchar(10) 7 );
Table created.
Table created.
18 | P a g e
key(cid); Table altered.
inv_user
2 add primary key(user_id);
19 | P a g e
Table altered.
Table created.
Table altered.
Table created.
Table created.
Table created.
INSERTION:
INSERT INTO BRANDS:
SQL> insert into brands
values( 2 '&bid'
3,
4 '&bname');
Enter value for bid:
1 old 2: '&bid'
new 2: '1'
Enter value for bname:
Apple old 4: '&bname')
21 | P a g e
new 4: 'Apple')
1 row created.
1 row created.
1 row created.
22 | P a g e
1 row created.
1 row created.
1 row created.
1 row created.
1 row created.
24 | P a g e
new 9: '31-oct-18')
1 row created.
1 row created.
SQL> insert into provides
25 | P a g e
SQL> insert into customer_cart
values( 2 '&cust_id',
3 '&name',
4 '&mobno');
Enter value for cust_id:
1 old 2: '&cust_id',
new 2: '1',
Enter value for name:
Ram old 3: '&name',
new 3: 'Ram',
Enter value for mobno:
9876543210 old 4: '&mobno')
new 4: '9876543210')
1 row created.
1 row created.
1 row created.
26 | P a g e
SQL> insert into select_product
1 row created.
27 | P a g e
insert into transaction values(2,57000,57000,0,570,570,'cash',2);
1 row created.
PL/SQL
Functions:
SQL> declare
2 due1 number(7);
3 cart_id1 number(7);
4 function get_cart(c_id number)return number
is 5 begin
6 return (c_id);
7 end;
8 begin
9 cart_id1:=get_cart('&c_id');
10 select due into due1 from transaction where cart_id=cart_id1;
11 dbms_output.put_line(due1);
12 en
d; 13
/
Enter value for c_id: 1
old 9: cart_id1:=get_cart('&c_id');
new 9: cart_id1:=get_cart('1');
5000
Cursors:
SQL> DECLARE
2 p_id product.pid%type;
3 p_name product.pname%type;
28 | P a g e
4 p_stock product.p_stock
%type; 5 cursor p_product is
6 select pid,pname ,p_stock from product;
7 begin
8 open p_product;
9 loop
10 fetch p_product into p_id,p_name,p_stock;
11 exit when p_product%notfound;
12 dbms_output.put_line(p_id||' '||p_name||' '||p_stock);
13 end loop;
14 close p_product;
15 en
d; 16 /
1 IPHONE 4
2 Airpods 3
3 Smart Watch 3
4 Air Max 6
5 REFINED OIL 6
Procedure:
SQL> DECLARE
2 a number;
3 b number;
4 PROCEDURE check_stock(x IN number)
IS 5 BEGIN
6 IF x < 2 THEN
7 dbms_output.put_line('Stock is Less');
8 ELSE
9 dbms_output.put_line('Enoug
h Stock'); 10 END IF;
11 END;
12 BEGIN
13 b:='&b';
14 select p_stock into a from product where pid=b;
15 check_stock(a);
16 END;
29 | P a g e
17 /
Enter
value for
b: 2 old
13:
b:='&b';
new 13:
OUTPUT SNAPSHOTS
30 | P a g e
CONCLUSION
31 | P a g e
32 | P a g e