Convenience Store

Tables (5)

convenience store (Store)

  • store_id (storeid) — Primary key — NOT NULL — 편의점 번호
  • store_name (name) — NOT NULL — 편의점 이름
  • store_area (area) — NOT NULL — 편의점 지역
  • item_id (itemid) — Foreign key → item.item_id — NOT NULL — 물품 번호

item (Item)

  • item_id (itemid) — Primary key — NOT NULL — 물품 번호
  • item_name (name) — NOT NULL — 물품 이름
  • item_price (price) — NOT NULL — 물품 가격
  • item_category (category) — NOT NULL — 물품 범주
  • item_expiration_date (expiration) — NOT NULL — 유통기한
  • store_id (storeid) — Foreign key → convenience store.store_id — NOT NULL — 편의점 번호

order (Order)

  • order_id (orderid) — Primary key — NOT NULL — 주문 번호
  • store_id (storeid) — Foreign key → convenience store.store_id — NOT NULL — 편의점 번호
  • order_item_quantity (quantity) — NOT NULL — 주문 수량
  • order_item_price (price) — NOT NULL — 주문 가격
  • order_item_date (date) — NOT NULL — 주문 날짜
  • item_id (itemid) — Foreign key → item.item_id — NOT NULL — 물품 번호

sale (Sale)

  • sale_id (saleid) — Primary key — NOT NULL — 판매 번호
  • stock_id (stockid) — Foreign key → stock.stock_id — NOT NULL — 재고 번호
  • order_id (orderid) — Foreign key → stock.order_id — NOT NULL — 주문 번호
  • store_id (storeid) — Foreign key → stock.store_id — NOT NULL — 편의점 번호
  • sale_quantity (quantity) — NOT NULL — 판매 수량
  • sale_price (price) — NOT NULL — 판매 가격
  • sale_date (date) — NOT NULL — 판매 날짜
  • item_id (itemid2) — Foreign key → item.item_id — NOT NULL — 물품 번호

stock (Stock)

  • stock_id (stockid) — Primary key — NOT NULL — 재고 번호
  • order_id (orderid) — Foreign key → order.order_id — NOT NULL — 주문 번호
  • store_id (storeid) — Foreign key → order.store_id — NOT NULL — 편의점 번호
  • stock_item_quantity (quantity) — NOT NULL — 재고 수량
  • stock_item_expiration_date (expiration) — NOT NULL — 재고 유통기한
  • item_id (itemid2) — Foreign key → item.item_id — NOT NULL — 물품 번호