Page 286 - IT-802_class_12
P. 286
Payment_date DATE Date of payment
Mode of payment such as debit card, credit card on
Payment_mode VARCHAR(20)
delivery, e-gift voucher
Now, let us understand how these entities are linked with each other in an informal manner.
Belongs to Category
Commodity
Offered by Contains Contains
Order
Placed By
Vendor
Contains Buyer
Courier is made for Belongs to
Payment Wish List
4.2.2 Functionality
Let us understand how shopping applications may use and manage databases. Given below are some important
functions that are performed by the MINI-MART shopping website:
1. First, all the categories whose products are to be made available for shopping are decided by MINI-MART Company.
For storing the finalised categories in the CATEGORY table, function insert_category of class Category may be used.
At later point of time, if the company wishes to come up with some more categories, it can do so with the help of
same function.
2. Also, the company may decide to either delete or modify the categories using functions delete_category and
modify_category respectively.
3. If the buyer selects any category on the website, function display_category is invoked to display all the products in
that category.
package shopping_appllcation;
public class Category
{
public void insert_category (String categ_tuple[])
//Add functionality to insert a row of category
//named categ_tuple
//SQL command to be used: insert
public void delete_category (int categ_id)
/ ‘Add functionality to delete a category with id categ_ld.
//SQL conmand to be used: delete public void
284 Touchpad Information Technology-XII

