뭉키ERD

테이블 (7)

가게 (store)

  • 가게아이디 (store_id) — not null — 기본 키 — NOT NULL
  • 점주아이디 (producer_id) — not null — 외래 키 → 점주.점주아이디 — NOT NULL
  • 주소 (address) — not null

메뉴 (menu)

  • 메뉴번호 (menu_number) — not null — 기본 키 — NOT NULL
  • 가게아이디 (store_id) — not null — 외래 키 → 가게.가게아이디 — NOT NULL
  • 점주아이디 (producer_id) — not null — 외래 키 → 가게.점주아이디 — NOT NULL
  • 가격 (price) — not null
  • 메뉴이름 (menu_name) — not null
  • 옵션 (option) — null

사용자 (account)

  • 아이디 (id) — not null — 기본 키 — NOT NULL
  • 고유아이디 (user_id) — not null — 기본 키 — NOT NULL
  • 비밀번호 (pw) — not null
  • 휴대전화 (phone) — not null
  • flag — not null

소비자 (customer)

  • 아이디 (customer_id) — not null — 외래 키 → 사용자.아이디 — NOT NULL
  • 고유아이디 (user_id) — not null — 외래 키 → 사용자.고유아이디 — NOT NULL
  • 주소 (address) — not null
  • 닉네임 (nickname) — not null

점주 (producer)

  • 점주아이디 (producer_id) — not null — 기본 키 — NOT NULL

주문 (order)

  • 주문번호 (order_number) — not null — 기본 키 — NOT NULL
  • 주문자 (owenr_number) — not null — 외래 키 → 소비자.고유아이디 — NOT NULL
  • 메뉴번호 (menu_number) — not null — 외래 키 → 메뉴.메뉴번호 — NOT NULL
  • 가게아이디 (store_id) — not null — 외래 키 → 메뉴.가게아이디 — NOT NULL
  • 점주아이디 (producer_id) — not null — 외래 키 → 메뉴.점주아이디 — NOT NULL
  • 총금액 (total_price) — not null

주문내역 (order_history)

  • 고유아이디 (user_id) — not null — 외래 키 → 소비자.고유아이디 — NOT NULL
  • 주문번호 (oreder_number) — not null — 외래 키 → 주문.주문번호 — NOT NULL
  • 메뉴번호 (menu_number) — not null — 외래 키 → 주문.메뉴번호 — NOT NULL
  • 가게아이디 (store_id) — not null — 외래 키 → 주문.가게아이디 — NOT NULL
  • 고유아이디 (user_id2) — not null — 외래 키 → 주문.주문자 — NOT NULL