Skip to content

an online-shopping platform database, course project for COMP421@McGill

Notifications You must be signed in to change notification settings

aaronzguan/Online-Shopping-Cart-Database-Project

Repository files navigation

Online-Shopping-Cart-Database-Project

You may find more details about this project at my personal blog

ER Diagram

image

Entities

  • User (userId, name, phoneNum)
  • Buyer (userId)
  • Seller (userId)
  • Bank Card (cardNumber, userId, bank, expiryDate)
  • Credit Card (cardNumber, organization)
  • Debit Card (cardNumber)
  • Store (sid, name, startTime, customerGrade, streetAddr, city, province)
  • Product (pid, sid, name, brand, type, amount, price, colour, customerReview, modelNumber)
  • Order Item (itemid, pid, price, creationTime)
  • Order (orderNumber, creationTime, paymentStatus, totalAmount)
  • Address (addrid, userid, name, city, postalCode, streetAddr, province, contactPhoneNumber)

Relationships

  • Manage (userid, sid, SetupTime) (userid ref Seller, sid ref Store)
  • Save to Shopping Cart (userid, pid, quantity, addtime) (userid ref Buyer, pid ref Product)
  • Contain (orderNumber, itemid, quantity) (orderNumber ref Order, itemid ref Order Item)
  • Deliver To (addrid, orderNumber, TimeDelivered) (addrid ref Address, orderNumber ref Order)
  • Payment (C.cardNumber, orderNumber, payTime) (C.cardNumber ref Credit Card, orderNumber ref Order)

Create Database

Java GUI

simpleJDBCPostgres.java is only a sample Java to link the Postgresql JDBC driver and connect to the database for your reference.

SQL.java is the acutal program that we wrote to submit the sql execution to the database based on the sample above.

Java_GUI contains the Java programs for creating the GUI.

  1. MainFrame.java: Provide main menu for user to choose different function.

image

  1. Register.java: User registration interface.

image

  1. Login.java: User log-in interface.

image

  1. AddAddress.java: Add address for delivery.

image

  1. SearchFrame.java:Search products in database.

image

  1. SaveToCartFrame.java: Add products into shopping cart.

image

  1. SetUpOrderFrame.java: View the shopping cart and create the order.

image

  1. addressFrame.java: Select a delivery address and finish the shopping.

image

About

an online-shopping platform database, course project for COMP421@McGill

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published