데이터 모델링 실습

테이블 (3)

User (User)

  • user_id — Integer — 기본 키 — NOT NULL
  • user_id (user_id2) — Integer — 외래 키 → User.user_id — NOT NULL
  • userid (사용자 아이디) — String
  • password — String
  • username (닉네임) — String

Comment

  • comment_id — Integer — 기본 키 — NOT NULL
  • post_id — Integer — 외래 키 → Post.post_id — NOT NULL
  • user_id — Integer — 외래 키 → Post.user_id — NOT NULL
  • content (댓글 내용) — String

Post

  • post_id — Integer — 기본 키 — NOT NULL
  • user_id — Integer — 외래 키 → User.user_id — NOT NULL
  • title (게시글 제목) — String
  • content (게시글 내용) — String