Ahsanullah University of Science Technology
PROJECT REPORT
“Computer Store Management System”
Submitted by
Nafis Islam Hafizul Islam Himel Alauddin Al Azad
ID: [Link] ID: [Link] ID: [Link]
Section: A1 Section: A1 Section: A1
1
1 Introduction
A Computer store needs a management system to manage it’s inventory. So, we are proposing a computer store
management system using pl/sql.
2 Overview of the project
We’ve try to develop a ”Computer Store Management System”. Employees can perform some operations through
this system. Employees are the administrator of the system.
Employees can-
• Log in & log out from the system.
• Add products.
• Sell products.
• Request products from other branches.
• Transfer products to other branches.
• Buy second hand products from customers.
• Search products based on different attributes.
• See old receipts.
• Add new employees & customers.
• View the current state of the cart.
3 Sites & Tables
3.1 Sites
In our project there are two sites or two branches of the computer store.
• Kalabagan (Main) Branch.
• Dhanmondi Branch.
3.2 Tables
• Product: product(pid, name, catagory, branch).
• Supplier: supplier(sid, name, numbers).
• Customer: customer(cid, name, numbers).
• Employee: employee(eid, name, numbers, passwords).
• Log in History: log in history(eid, log time).
• Product Information: product info(prduct code, pid, sid, cid, buyprice, sellprice, branch, condition, status).
• Purchase: purchase(purchase id, pid, product code).
• Purchase History: purchase history(purchase id, eid, cid, buyprice, soldprice, capitalprice, purchase type).
• Cart: temp(pid, product code, buyprice, sellprice).
• Request: request(rid,product code,eid req,send to branch,at branch,status,eid done).
2
4 Database Links
In order to create the database links we’ve used the following code:
Figure 1: Database Links
Some examples are shown below:
1. Select all data of product table from site link:
Figure 2: Select operation
3
2. Delete pid=12 from site link:
Figure 3: Delete operation
3. Update product name=Litepower where pid=11 from site link:
Figure 4: Update operation
4
4. Insert product into product table from site link:
Figure 5: Insert operation
5 Packages, Functions & Procedures
• Package log in package
∗ Procedure show login log
· Parameter: No parameter.
· Description: Shows the login log table.
∗ Procedure login log()
· Parameter: emp id.
· Description: Inserts the employee into the log with log in time.
∗ Function login()
· Parameter: user name, password.
· Description: Logs in the user.
· Exceptions: If user id not found throws no data found exception.
· Return: Boolean flag.
∗ Function logout()
· Parameter: emp id.
· Description: Logs out the user.
· Exceptions: If user id not found throws no data found exception.
· Return: Boolean flag.
5
• Package product package
∗ Function insert product()
· Parameter: name,brand,category.
· Description: Insert product in to product tables.
· Exceptions: Throws exception when not successfully inserted.
· Return: 0 error,1 successfully inserted,2 already exist.
∗ Function insert product new()
· Parameter: name,brand,category,product code,supplier id,buy price,sell price,branch.
· Description: Insert product in to product tables.
· Exceptions: Throws exception when not successfully inserted.
· Return: 0 error,1 successfully inserted,2 already exist.
∗ Function insert product old()
· Parameter: name,brand,category,product code,customer id,buy price,sell price,branch.
· Description: Insert product in to product tables.
· Exceptions: Throws exception when not successfully inserted.
· Return: 0 error,1 successfully inserted,2 already exist.
∗ Procedure search all pro()
· Parameter: product name.
· Description: Search products and show.
∗ Procedure search con pro()
· Parameter: product name,product info.
· Description: Search products and show.
∗ Procedure search bran pro()
· Parameter: product name,product brand.
· Description: Search products and show.
∗ Procedure get all pro branch()
· Parameter: product info.
· Description: Get all products.
6
• Package customer employee package
∗ Procedure add employee
· Parameter: name,number,password.
· Description: Add employee.
∗ Procedure add customer
· Parameter: name,number.
· Description: Add customer.
• Package cart sell package
∗ Procedure show cart
· Parameter: No parameter.
· Description: Shows the cart.
∗ Procedure empty cart
· Parameter: No parameter.
· Description: Removes the products from the cart.
∗ Function add to cart()
· Parameter: product code.
· Description: Add product to the cart.
∗ Function delete from cart()
· Parameter: product code.
· Description: Delete product from the cart.
∗ Procedure show receipt()
· Parameter: purchase id.
· Description: Show the receipt.
∗ Function sell()
· Parameter: employee id, customer id.
· Description: Sell the product to the customer.
7
• Package transfer package
∗ Procedure show request
· Parameter: no parameter.
· Description: Shows the request table.
∗ Function add request()
· Parameter: product code, send to branch,employee id.
· Description: Request products from other branches.
∗ Function transfer()
· Parameter: request id, employee id.
· Description: Transfer products from the requested branch.
6 Triggers
• product id
– Description: Sets the product id of the product table when a new data is inserted.
• supplier id
– Description: Sets the supplier id of the product table when a new data is inserted.
• customer id
– Description: Sets the customer id of the product table when a new data is inserted.
• employee id
– Description: Sets the employee id of the product table when a new data is inserted.
• purchase id
– Description: Sets the purchase id of the product table when a new data is inserted.
• request id
– Description: Sets the request id of the product table when a new data is inserted.