Restaurant DB

Current Restaurant Database Structure ERD

Tables (8)

ExtraVars

  • last_num — int(11)

admins

  • ID — int
  • name — text — NOT NULL
  • password — text — NOT NULL

menus

  • ID — int
  • menu_name — text — NOT NULL

orders

  • ID — int
  • table_id — int(11) — Foreign key → tables.ID
  • product_id — int(11) — Foreign key → products.ID
  • quantity — int(11) — NOT NULL
  • order_code — text — NOT NULL

products

  • ID — int
  • menu_id — int(11) — Foreign key → menus.ID
  • product_name — text — NOT NULL
  • product_price — float — NOT NULL
  • product_quantity — int(11) — NOT NULL
  • product_image — blob — NOT NULL
  • available_size — text — NOT NULL
  • available_spicy — text — NOT NULL
  • is_visible — int(11) — NOT NULL
  • adding_date — datetime — NOT NULL
  • serial_code — text — NOT NULL

refunds

  • ID — int
  • order_code — varchar(20) — NOT NULL
  • refund_date — datetime — NOT NULL

sales

  • ID — int
  • product_id — int(11) — Foreign key → products.ID
  • sold_amount — int(11) — NOT NULL
  • order_code — text — NOT NULL
  • selling_date — datetime — NOT NULL

tables

  • ID — int
  • menus — text — NOT NULL
  • status — text — NOT NULL