오튜

테이블 (5)

글 (topic)

  • 아이디 (id) — int — 기본 키 — NOT NULL — Auto Increment
  • 제목 (title) — varchar(30) — NOT NULL
  • 본문 (description) — text — NOT NULL
  • 작성일 (created) — datetime — NOT NULL

댓글 (comment)

  • 아이디 (id) — int — 기본 키 — NOT NULL — Auto Increment
  • 본문 (description) — text — NOT NULL
  • 작성일 (created) — datetime — NOT NULL
  • 아이디 (author_id) — int — 외래 키 → 저자.아이디 — NOT NULL — 저자 외래 키
  • 아이디 (topic_id) — int — 외래 키 → 글.아이디 — NOT NULL — 글 외래 키

작성 (write)

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

저자 (author)

  • 아이디 (id) — int — 기본 키 — NOT NULL — Auto Increment
  • 이름 (name) — varchar(15) — NOT NULL
  • 자기소개 (profile) — varchar(100) — NOT NULL
  • 가입일 (created) — datetime — NOT NULL

휴면자 (dormant)

  • 아이디 (id2) — int — 외래 키 → 저자.아이디 — NOT NULL — Auto Increment
  • 휴면일 (created) — datetime — NOT NULL