쇼핑몰

테이블 (7)

Category (category)

  • 카테고리아이디 (category_id) — int — 기본 키 — NOT NULL
  • 카테고리명 (name) — varchar(20)

order (orders)

  • 주문번호 (id) — int — 기본 키 — NOT NULL
  • 사용자아이디 (user_id) — int — 외래 키 → user.사용자아이디 — NOT NULL

order_detail

  • 상품번호 (product_id) — int — 외래 키 → product.상품번호 — NOT NULL
  • 주문번호 (order_id) — int — 외래 키 → order.주문번호 — NOT NULL
  • 상품수량 (product_count) — int

product

  • 상품번호 (id) — int — 기본 키 — NOT NULL
  • 상품이름 (name) — varchar(20)
  • 상품가격 (price) — int
  • 상품이미지 (image) — image
  • 상품설명 (description) — text
  • 카테고리아이디 (category_id) — int — 외래 키 → Category.카테고리아이디 — NOT NULL

review

  • Key (id) — int — 기본 키 — NOT NULL
  • 상품번호 (product_no) — int — 외래 키 → product.상품번호 — NOT NULL
  • 사용자아이디 (user_id) — int — 외래 키 → user.사용자아이디 — NOT NULL
  • 별점 (rating) — int
  • 내용 (content) — varchar(100)

shopping_cart

  • 사용자아이디 (user_id) — int — 외래 키 → user.사용자아이디 — NOT NULL
  • 상품번호 (product_id) — int — 외래 키 → product.상품번호 — NOT NULL
  • 수량 (product_count) — int

user (customer)

  • 사용자아이디 (id) — int — 기본 키 — NOT NULL
  • 사용자이름 (name) — varchar(20)
  • 이메일 (email) — varchar(40)
  • 비밀번호 (password) — varchar(50)