FACEBOOK_ERD

Tables (15)

#tag (해시 태그)

  • 해시 태그 아이디 (hash_tag_id) — NOT NULL — Primary key — NOT NULL
  • 게시물 아이디 (post_id) — NOT NULL — Foreign key → Post.게시물 아이디 — NOT NULL
  • Field

@tag (유저 태그)

  • 유저 태그 아이디 (user_tag_id) — NOT NULL — Primary key — NOT NULL
  • 게시물 아이디 (post_id) — NOT NULL — Foreign key → Post.게시물 아이디 — NOT NULL
  • 댓글 아이디 (comment_id) — NOT NULL — Foreign key → Comment.댓글 아이디 — NOT NULL

Comment (댓글)

  • 댓글 아이디 (comment_id) — NOT NULL — Primary key — NOT NULL
  • 댓글 제목 (comment_title) — NOT NULL
  • 댓글 내용 (comment_content) — NOT NULL

Post (게시물)

  • 게시물 아이디 (post_id) — NOT NULL — Primary key — NOT NULL
  • 제목 (title) — NOT NULL
  • 본문 (conten) — NOT NULL

Re-comment (대댓글)

  • 대댓글 아이디 (recommen_id) — NOT NULL — Primary key — NOT NULL
  • 댓글 아이디 (comment_id) — NOT NULL — Foreign key → Comment.댓글 아이디 — NOT NULL

User (유저)

  • 유저 아이디 (user_id) — NOT NULL — Primary key — NOT NULL
  • 이름 (name) — NOT NULL
  • 이메일 (email) — NOT NULL
  • 전화번호 (phone_number) — NOT NULL
  • 성별 (gender) — NOT NULL
  • 학력 (degree)
  • 거주지 (address)
  • 출신지 (origin)
  • 생년월일 (birthday) — NOT NULL

add (댓글 추가)

  • 유저 아이디 (user_id) — NOT NULL — Foreign key → User.유저 아이디 — NOT NULL
  • 댓글 아이디 (comment_id) — NOT NULL — Foreign key → Comment.댓글 아이디 — NOT NULL

follow (팔로우)

  • 팔로우 등록 번호 (follow_id) — NOT NULL — Primary key — NOT NULL
  • 유저 아이디 (user_id) — NOT NULL — Foreign key → User.유저 아이디 — NOT NULL
  • 팔로워 번호 (follower_id) — NOT NULL — Foreign key → followers.팔로워 번호 — NOT NULL
  • 팔로우 등록 일자 (followed_at) — NOT NULL

followers (팔로워(친구))

  • 팔로워 번호 (follower_id) — NOT NULL — Primary key — NOT NULL
  • Field

keep (게시물 따로 저장)

  • 유저 아이디 (user_id) — NOT NULL — Foreign key → User.유저 아이디 — NOT NULL
  • 게시물 아이디 (post_id) — NOT NULL — Foreign key → Post.게시물 아이디 — NOT NULL
  • 저장 일자 (kept_at) — NOT NULL

like (좋아요(리액션))

  • 게시물 아이디 (post_id) — NOT NULL — Foreign key → Post.게시물 아이디 — NOT NULL
  • 댓글 아이디 (comment_id) — NOT NULL — Foreign key → Comment.댓글 아이디 — NOT NULL

notice (알림)

  • 알림 아이디 (notice_id) — NOT NULL — Primary key — NOT NULL
  • 게시물 아이디 (post_id) — NOT NULL — Foreign key → Post.게시물 아이디 — NOT NULL
  • 유저 아이디 (user_id) — NOT NULL — Foreign key → User.유저 아이디 — NOT NULL
  • 알림 내용 (notice_content) — NOT NULL

revise (게시물 수정)

  • 게시물 아이디 (post_id) — NOT NULL — Foreign key → Post.게시물 아이디 — NOT NULL
  • 유저 아이디 (user_id) — NOT NULL — Foreign key → User.유저 아이디 — NOT NULL
  • 수정일자 (revised_at) — NOT NULL

share (게시물 공유)

  • 게시물 아이디 (post_id) — NOT NULL — Foreign key → Post.게시물 아이디 — NOT NULL
  • 팔로워 번호 (follower_id) — NOT NULL — Foreign key → followers.팔로워 번호 — NOT NULL

upload (게시물 업로드)

  • 유저 아이디 (user_id) — NOT NULL — Foreign key → User.유저 아이디 — NOT NULL
  • 게시물 아이디 (post_id) — NOT NULL — Foreign key → Post.게시물 아이디 — NOT NULL
  • 업로드 일자 (uploaded_at) — NOT NULL