practice

Tables (4)

orders

  • id — BIGINT — Primary key — NOT NULL
  • order_date — TIMESTAMP
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL

products

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(255) — NOT NULL
  • price — DECIMAL(10, 2) — NOT NULL
  • quantity — INT — NOT NULL

reviews

  • id — BIGINT — Primary key — NOT NULL
  • content — TEXT — NOT NULL
  • created_at — TIMESTAMP
  • parent_review_id — BIGINT — Foreign key → reviews.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL

users

  • id — BIGINT — Primary key — NOT NULL
  • nickname — VARCHAR(50)
  • password — VARCHAR(255)
  • created_at — TIMESTAMP