UberEats

Tables (7)

City

  • Zip code (zip_code) — CHAR(5) — Primary key — NOT NULL
  • National Code (nat_code) — CHAR(2) — Foreign key → Country.National Code — NOT NULL
  • City Name (city_name) — VARCHAR(127)

Country

  • National Code (nat_code) — CHAR(2) — Primary key — NOT NULL
  • Country_name (nat_name) — VARCHAR(127)

Delivery

  • Key (user_id) — VARCHAR(255) — Primary key — NOT NULL
  • Key (phone_number) — CHAR(10) — Primary key — NOT NULL
  • National Code (nat_code) — CHAR(2) — Foreign key → Country.National Code — NOT NULL

Menu_article

  • Key (menu_id) — CHAR(6) — Primary key — NOT NULL
  • Field (menu_name) — VARCHAR(127)
  • Field (price) — DECIMAL(7,2)
  • Field (quantity) — VARCHAR(2)

Order

  • Orerder Id (order_id) — CHAR(5) — Primary key — NOT NULL
  • User Id (user_id) — VARCHAR(255) — Foreign key → User.User Id — NOT NULL
  • Key (phone_number) — CHAR(10) — Foreign key → Delivery.Key — NOT NULL
  • Key (restaurant_id) — VARCHAR(255) — Foreign key → Restaurant.Key — NOT NULL
  • Menu (menu_id) — CHAR(6) — Foreign key → Menu_article.Key — NOT NULL
  • Zip code (zip_code2) — CHAR(5) — Foreign key → Restaurant.Zip code — NOT NULL
  • Field (status) — VARCHAR(127)

Restaurant

  • Key (restaurant_id) — VARCHAR(255) — Primary key — NOT NULL
  • Zip code (zip_code) — CHAR(5) — Foreign key → City.Zip code — NOT NULL
  • Field (adress) — VARCHAR(127)
  • Field

User (Untitled)

  • User Id (user_id) — VARCHAR(255) — Primary key — NOT NULL
  • National Code (nat_code) — CHAR(2) — Foreign key → Country.National Code — NOT NULL
  • Password (password) — VARCHAR(20) — NOT NULL
  • First Name (first_name) — VARCHAR(127) — NOT NULL
  • Last Name (last_name) — VARCHAR(127) — NOT NULL
  • Phone Number (phone_number) — CHAR(10)