practice_db

테이블 (4)

user_follows

  • follower_id — Long — 외래 키 — NOT NULL
  • following_id — Long — 외래 키 — NOT NULL

게시글 (article)

  • Key (article_id) — Long — 기본 키 — NOT NULL
  • 제목 (title) — String — NOT NULL
  • 내용 (content) — String — NOT NULL
  • Key (user_id) — Long — 외래 키 → 사용자.Key — NOT NULL

댓글 (comment)

  • Key (comment_id) — Long — 기본 키 — NOT NULL
  • 내용 (content) — String — NOT NULL
  • Key (user_id) — Long — 외래 키 → 사용자.Key — NOT NULL
  • Key (aritlce_id) — Long — 외래 키 → 게시글.Key — NOT NULL

사용자 (user)

  • Key (user_id) — Long — 기본 키 — NOT NULL
  • 이름 (name) — String — NOT NULL
  • 팔로잉 (following) — Long
  • 팔로워 (follower) — Long
  • Key (user_id2) — Long — 외래 키 → 사용자.Key — NOT NULL