전자상거래

테이블 (5)

CART

  • cart_id — NOTNULL — 기본 키 — NOT NULL
  • user_id — NOTNULL — 외래 키 → USERS.user_id — NOT NULL
  • item_id — NOTNULL — 외래 키 → ITEM.item_id — NOT NULL
  • status — NOTNULL

ITEM

  • item_id — NOTNULL — 기본 키 — NOT NULL
  • name — NOTNULL
  • price — NOTNULL
  • quantity — NOTNULL
  • created_at — notnull
  • modified_at — notnull

ORDERITEM

  • orderitem_id — NOTNULL — 기본 키 — NOT NULL
  • order_id — NOTNULL — 외래 키 → ORDERS.order_id — NOT NULL
  • item_id — NOTNULL — 외래 키 → ITEM.item_id — NOT NULL

ORDERS

  • order_id — NOTNULL — 기본 키 — NOT NULL
  • user_id — NOTNULL — 외래 키 → USERS.user_id — NOT NULL
  • created_at — notnull
  • modified_at — notnull
  • orderstatus — notnull

USERS

  • user_id — NOTNULL — 기본 키 — NOT NULL
  • username — NOTNULL — NOT NULL
  • password — NOTNULL
  • email — NOTNULL
  • city — NOTNULL
  • street — NOTNULL
  • zipcode — NOTNULL
  • created_at — NOTNULL
  • modified_at — NOTNULL