관계형 데이터 모델링 Test

테이블 (5)

글 (topic)

  • Key (id) — int — 기본 키 — NOT NULL
  • Field (title) — varchar(15)
  • Field (description) — text
  • Field (created) — datetime

댓글 (comment)

  • Key (id) — int — 기본 키 — NOT NULL
  • Key (topic_id) — int — 외래 키 → 글.Key — NOT NULL
  • Key (author_id) — int — 외래 키 → 저자.Key — NOT NULL
  • Field (description) — text
  • Field (created) — datetime

작성 (write)

  • Key (author_id) — int — 외래 키 → 저자.Key — NOT NULL
  • Key (topic_id) — int — 외래 키 → 글.Key — NOT NULL
  • 작성일 (created) — datetime

저자 (author)

  • Key (id) — int — 기본 키 — NOT NULL
  • Field (name) — varchar(15) — NOT NULL
  • Field (profile) — varchar(100)
  • Field (created) — datetime — NOT NULL

휴면자 (domant)

  • Key (domant_id) — int — 기본 키 — NOT NULL
  • Key (author_id) — int — 외래 키 → 저자.Key — NOT NULL
  • Field (created) — datetime