쇼핑몰

테이블 (6)

t_buy (구매)

  • ibuy (구매id) — int — 기본 키 — NOT NULL
  • iproduct (상품id) — int — 외래 키 → t_product.iproduct — NOT NULL
  • icustomer (고객id) — int — 외래 키 → t_customer.icustomer — NOT NULL
  • quantity (수량) — int
  • buy_at (구매일시) — datetime

t_customer (고객)

  • icustomer (고객id) — int — 기본 키 — NOT NULL
  • nm (이름) — varchar(15)
  • addr (주소) — varchar(50)
  • ph (휴대폰번호) — char(13)

t_product (상품)

  • iproduct (상품id) — int — 기본 키 — NOT NULL
  • price (가격) — int
  • ctnt (내용) — text
  • created_at (등록일시) — datetime
  • nm (상품명) — varchar(30)
  • main_pic (메인사진) — varchar(100)
  • brand (브랜드) — varchar(20)

t_product_pic (상품사진)

  • iproduct_pic (상품사진id) — int — 기본 키 — NOT NULL
  • iproduct (상품id) — int — 외래 키 → t_product.iproduct — NOT NULL
  • pic (사진) — varchar(100)

t_review (상품평)

  • ireview (상품평id) — int — 기본 키 — NOT NULL
  • ibuy (구매id) — int — 외래 키 → t_buy.ibuy — NOT NULL
  • ctnt (내용) — text
  • created_at (작성일시) — datetime
  • star (별점) — tinyint

t_review_pic (상품평 사진)

  • ireview_pic (상품명사진id) — int — 기본 키 — NOT NULL
  • ireview (상품평id) — int — 외래 키 → t_review.ireview — NOT NULL
  • pic (사진) — varchar(100)