편의점

테이블 (4)

Customer (customer)

  • customer_id — int — 기본 키 — NOT NULL
  • login_id — varchar(50) — NOT NULL
  • name — varchar(255) — NOT NULL
  • password_hash — char(60) — NOT NULL

Product (product)

  • product_id — int — 기본 키 — NOT NULL
  • name — varchar(255) — NOT NULL
  • price — decimal(10, 2) — NOT NULL
  • quantity — int — NOT NULL
  • store_id — int — 외래 키 → Store.store_id — NOT NULL

Reservation (reservation)

  • reservation_id — int — 기본 키 — NOT NULL
  • product_id — int — 외래 키 → Product.product_id — NOT NULL
  • customer_id — int — 외래 키 → Customer.customer_id — NOT NULL
  • store_id — int — 외래 키 → Store.store_id — NOT NULL
  • quantity — int — NOT NULL
  • reservation_time — datetime(6) — NOT NULL

Store (store)

  • store_id — int — 기본 키 — NOT NULL
  • name — varchar(255) — NOT NULL