subway

Tables (3)

Line

  • id — BIGINT — Primary key — NOT NULL
  • name (노선이름) — VARCHAR
  • color (색상) — VARCHAR

Section

  • id — BIGINT — Primary key — NOT NULL
  • station_id (출발역_id) — BIGINT — Foreign key → Station.id — NOT NULL
  • station_id (도착역_id) — BIGINT — Foreign key → Station.id — NOT NULL
  • line_id (노선_id) — BIGINT — Foreign key → Line.id — NOT NULL

Station

  • id — BIGINT — Primary key — NOT NULL
  • name (역이름) — VARCHAR
  • line_id (노선_id) — BIGINT — Foreign key → Line.id — NOT NULL