DataBase Final Project Report Sem2

In this project, we make the program with MYSQL and Visual Basic.

 

The project itself is about making a shop, Shop specialize it selling nut product. In the program, it is mostly used by the shop and used to manage the shop. it could get data statistic, make more cashier account, help in managing the stock of the item sold, help in managing the employee.

 

For the ERD (Entity Relationship Diagram) :

This diagram show the relationship between the table and how it is connected.

 

Relational Schema

Type(type_id, type_name)

Source(code, name, address, phone_number)

Item(item_id, name, price, quantity, type, source)
Foreign Key type References Type(type_id)
Foreign Key source References Source(code)

Employee(id, first_name, last_name, salary, position)

User(username, password, employee_id)
Foreign Key employee_id References Employee(id)

Transaction(id, item_id, qty, date, employee_id)
Foreign Key item_id References Item(item_id)
Foreign Key employee_id References Employee(id)

Normalization

UNF:

Transaction(transaction_id, item_id, item_name, item, item_quantity, item_price, item_type_id, item_type_name, item_source_code, source_name, source_address, source_phone, transaction_qty, date, employee_id, first_name, last_name, salary, position, username, password)

1NF:

Transaction(id, item_id, qty, employee_id)

Item(item_id, name, price, quantity, type_id, type_name, source_code, source_name, source_address, source_phone)

Employee(id, first_name, last_name, salary, position, username, password)

2NF:

Transaction(id, item_id, qty, employee_id)

Item(item_id, name, price, quantity, type, source)

Type(type_id, type_name)

Source(code, name, address, phone_number)

Employee(id, first_name, last_name, salary, position)

User(username, password, employee_id) <– because username cannot be redundant

 

 

User Guild:

Login:

This is the login windows where the program start. In here we can make sure whether we login as the employee, or as the admin.

For example if we insert the right input, we can have,

but if we don’t enter the right input, we will have,

The only person who can add new account is the admin only.

After login we can have 3 type of user, the cashier and the admin and the stock update.

 

Admin form:

This is how the admin view is.

The admin can add, delete, and update. But it is still according the the current table view.

The admin have 5 table view :

  • Items
  • Employee
  • Item Type
  • Source Company
  • Transaction

We can change each table view by selecting it at the radio button.

Then we have the search engine bellow the table shown and a button to show the transaction report on the other side

If we click the “Show Report” button, this will show:

We have to type of format to shown the report.

 

Then when adding item, there will also shown another windows like this:

All of this is what admin is capable of, but admin cannot sell item or do transaction as admin will not do the transaction but the cashier will.

 

For cashier form:

The cashier will only can show the item table then choose it. The item later will be chosen by the cashier. if the item if selected and the cashier user click “Confirm”, the transaction is finished.

In this form, the cashier can only do transaction and not adding or anything else. This is to make sure that it is only a specialize program so that the cashier cannot do anything else. Because of this, if there is wrong transaction, admin is needed to fixed it

The Disadvantage in this is the cashier can only do 1 transaction each time and the transaction only consist of 1 item type.

 

Stock Update form:

Form is use to add stock from the source.

If u see the form correctly, u can actually see that all admin, cashier and stock update have  these 2 button “Setting” and “Log out”.

Log Out : just to log out back to the login windows

Setting :

Actually just to change the username and password.

 

 

Contribution :

In this project, the team is consist of Cindy and me, Frendy.

My contribution to this project is in making the initial database table and how it is connected. What table are needed the most and the initial functionality but some of them are cut off because of the difficulty. Then i also help in making the initial form in the visual basic. I make the modify part, and other for the initial phase of the visual basic.

 

Later on, I help in the debugging and testing part of the program to see other thing needed to be add or change.