쇼핑몰 ER1

테이블 (4)

customers (Untitled)

  • customer_code (Key) — INT — 기본 키 — NOT NULL
  • customer_id — VARCHAR(45)
  • customer_pw — VARCHAR(45)
  • customer_name — VARCHAR(45)
  • customer_email — VARCHAR(45)

order (Untitled2)

  • order_id — INT — 기본 키 — NOT NULL
  • customer_code (Key) — INT — 외래 키 → customers.customer_code — NOT NULL
  • order_date — DATE
  • order_total_price — INT
  • order_state — INT

order_detail (Untitled3)

  • order_detail_id — INT — 기본 키 — NOT NULL
  • order_id — INT — 외래 키 → order.order_id — NOT NULL
  • product_name — VARCHAR(50)
  • product_price — INT
  • order_quantity — INT

product (Untitled4)

  • product_id — INT — 기본 키 — NOT NULL
  • product_img — VARCHAR(45)
  • product_state — BLOB
  • product_price — INT
  • product_name — VARCHAR(45)
  • order_id — INT — 외래 키 → order.order_id — NOT NULL
  • customer_code (Key) — INT — 외래 키 → order.customer_code — NOT NULL