Facebook_ERD
테이블 (23)
게시물 (Post)
- 게시물 id (post_id) — int — 기본 키 — NOT NULL
- 태그된 유저 id (tagged_id) — int — NOT NULL
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 게시물 사진 (post_img) — img
- 게시 시간 (post_upload_time) — timestamp
- 게시물 수정 시간 (post_mod_time) — timestamp
- 게시물 내용 (post_content) — varchar(100)
- 리액션 수 (post_reaction_number) — int
- 댓글 수 (post_comment_number) — int
게시물 공유 (Post Share)
- 게시물 공유 id (post_share_id) — int — 기본 키 — NOT NULL
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 게시물 id (post_id) — int — 외래 키 → 게시물.게시물 id — NOT NULL
- 공유 시간 (share_time) — timestamp
- 공유 텍스트 (share_text) — varchar(100)
- 공유 유저 id (shared_user_id) — int
게시물 반응 (Post Reaction)
- 게시물 반응 id (post_reaction_id) — int — 기본 키 — NOT NULL
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 게시물 id (post_id) — int — 외래 키 → 게시물.게시물 id — NOT NULL
- 리액션 id (post_reaction) — int
- 게시물 리액션 시간 (post_reaction_time) — timestamp
게시물 수정 (Post Modify)
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 게시물 id (post_id) — int — 외래 키 → 게시물.게시물 id — NOT NULL
게시물 업로드 (Post Upload)
- 게시물 업로드 id (post_upload_id) — int — 기본 키 — NOT NULL
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 게시물 id (post_id) — int — 외래 키 → 게시물.게시물 id — NOT NULL
게시물 유저 태그 (Post User Tag)
- 게시물 유저 태그 id (user_tag_id) — int — 기본 키 — NOT NULL
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 게시물 id (post_id) — int — 외래 키 → 게시물.게시물 id — NOT NULL
- 태그된 유저 id (tagged_id) — int
- 유저 태그 시간 (tagged_time) — timestamp
게시물 저장 (Post Scrap)
- 게시물 id (post_id) — int — 외래 키 → 게시물.게시물 id — NOT NULL
- 저장소 id (storage_id) — int — 외래 키 → 게시물 저장소.저장소 id — NOT NULL
- 유저 아이디 (user_id) — int — 외래 키 → 게시물 저장소.유저 아이디 — NOT NULL
- 게시물 저장 시간 (post_save_time) — timestamp
게시물 저장소 (Scrap Storage)
- 저장소 id (storage_id) — int — 기본 키 — NOT NULL
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 게시물 저장 시간 (post_save_time) — timestamp
게시물 해시태그 (Post Hash Tag)
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 게시물 id (post_id) — int — 외래 키 → 게시물.게시물 id — NOT NULL
- 해시태그 id (hashtag_id2) — int — 외래 키 → 해시태그.해시태그 id — NOT NULL
- 해시태그명 (hashtag_name) — varchat(25)
그룹 채팅방 (Group Chatroom)
- 단체채팅방 id (grouproom_id) — int — 기본 키 — NOT NULL
- 단체채팅방 이름 (grouproom_name) — varchar(25)
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 채팅 상대 아이디 (chatuser_id) — int
- 메시지 (message) — text
- 메시지 작성 시간 (message_time) — timestamp
- 메시지 첨부 이미지 (message_img) — img
댓글 (Comment)
- 댓글 id (comment_id) — int — 기본 키 — NOT NULL
- 게시물 id (post_id) — int — 외래 키 → 게시물.게시물 id — NOT NULL
- 댓글 작성 시간 (comment_time) — timestamp
- 댓글 작성자_id (comment_writer_id) — int
- 댓글 내용 (comment_content) — varchar(50)
- 부모 댓글 id (parentcomment_id) — int — 외래 키 → 댓글.댓글 id — NOT NULL
- 댓글 리액션 수 (comment_reaction_number) — int
댓글 리액션 (Comment Reaction)
- 댓글 리액션 id (comment_reaction_id) — int — 기본 키
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 댓글 id (comment_id) — int — 외래 키 → 댓글.댓글 id — NOT NULL
댓글 유저 태그 (Comment User Tag)
- 댓글 유저 태그 id (comment_usertag_id) — int — 기본 키 — NOT NULL
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 댓글 id (comment_id) — int — 외래 키 → 댓글.댓글 id — NOT NULL
- 태그된 유저 id (tagged_id) — int
- 유저 태그 시간 (tagged_time) — timestamp
댓글 작성 (Comment Write)
- 댓글 작성 id (comment_write_id) — int — 기본 키 — NOT NULL
- 댓글 작성자 id (comment_writer_id) — int
메시지 알림 (Message Notice)
- 메시지 알림 id (message_notice_id) — int — 기본 키 — NOT NULL
- 유저 아이디 (user_id2) — int — 외래 키 → 채팅방 리액션.유저 아이디 — NOT NULL
- 채팅방 id (chatroom_id) — int — 외래 키 → 채팅방 리액션.채팅방 id — NOT NULL
- 단체채팅방 id (grouproom_id) — int — 외래 키 → 채팅방 리액션.단체채팅방 id — NOT NULL
- 유저 아이디 (user_id3) — int — 외래 키 → 메시지 작성.유저 아이디 — NOT NULL
- 단체채팅방 id (grouproom_id2) — int — 외래 키 → 메시지 작성.단체채팅방 id — NOT NULL
- 채팅방 id (chatroom_id2) — int — 외래 키 → 메시지 작성.채팅방 id — NOT NULL
- 채팅방 리액션 id (chat_reaction_id) — int — 외래 키 → 채팅방 리액션.채팅방 리액션 id
- 채팅 상대 아이디 (chatuser_id) — int
- 채팅 알림 요약 (chat_notice_content) — int
- 유저 아이디 (user_id4) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
메시지 작성 (Chat Message)
- 메시지 작성 id (message_id) — int — 기본 키
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 단체채팅방 id (grouproom_id) — int — 외래 키 → 그룹 채팅방.단체채팅방 id — NOT NULL
- 채팅방 id (chatroom_id) — int — 외래 키 → 채팅방.채팅방 id — NOT NULL
알림 (notice)
- 알림 id (notice id) — int — 기본 키 — NOT NULL
- 게시물 업로드 id (post_upload_id) — int — 외래 키 → 게시물 업로드.게시물 업로드 id — NOT NULL
- 유저 아이디 (user_id2) — int — 외래 키 → 게시물 업로드.유저 아이디 — NOT NULL
- 게시물 id (post_id) — int — 외래 키 → 게시물 업로드.게시물 id — NOT NULL
- 게시물 반응 id (post_reaction_id) — int — 외래 키 → 게시물 반응.게시물 반응 id — NOT NULL
- 유저 아이디 (user_id3) — int — 외래 키 → 게시물 반응.유저 아이디 — NOT NULL
- 게시물 id (post_id2) — int — 외래 키 → 게시물 반응.게시물 id — NOT NULL
- 게시물 유저 태그 id (user_tag_id) — int — 외래 키 → 게시물 유저 태그.게시물 유저 태그 id — NOT NULL
- 유저 아이디 (user_id4) — int — 외래 키 → 게시물 유저 태그.유저 아이디 — NOT NULL
- 게시물 id (post_id3) — int — 외래 키 → 게시물 유저 태그.게시물 id — NOT NULL
- 게시물 공유 id (post_share_id) — int — 외래 키 → 게시물 공유.게시물 공유 id — NOT NULL
- 유저 아이디 (user_id5) — int — 외래 키 → 게시물 공유.유저 아이디 — NOT NULL
- 게시물 id (post_id4) — int — 외래 키 → 게시물 공유.게시물 id — NOT NULL
- 댓글 리액션 id (comment_reaction_id) — int — 외래 키 → 댓글 리액션.댓글 리액션 id
- 유저 아이디 (user_id6) — int — 외래 키 → 댓글 리액션.유저 아이디 — NOT NULL
- 댓글 id (comment_id) — int — 외래 키 → 댓글 리액션.댓글 id — NOT NULL
- 댓글 작성 id (comment_write_id) — int — 외래 키 → 댓글 작성.댓글 작성 id — NOT NULL
- 댓글 유저 태그 id (comment_usertag_id) — int — 외래 키 → 댓글 유저 태그.댓글 유저 태그 id — NOT NULL
- 유저 아이디 (user_id7) — int — 외래 키 → 댓글 유저 태그.유저 아이디 — NOT NULL
- 댓글 id (comment_id2) — int — 외래 키 → 댓글 유저 태그.댓글 id — NOT NULL
- 유저 아이디 (user_id) — int
- 유저 아이디 (user_id8) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
유저 (User)
- 유저 아이디 (user_id) — int — 기본 키 — NOT NULL
- 이름 (user_name) — varchar(25)
- 학력 (user_education) — list
- 출신지 (user_origin) — varchar(25)
- 프로필사진 (user_profile_img) — img
- 배경사진 (user_backgrd_img) — img
- 생일 (user_birthday) — timestamp
- 전화번호 (user_phone) — varchar(10)
채팅방 (Chat Room)
- 채팅방 id (chatroom_id) — int — 기본 키 — NOT NULL
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 채팅 상대 아이디 (charuser_id) — int
- 메시지 (message) — text
- 메시지 작성 시간 (message_time) — timestamp
- 메시지 첨부 이미지 (message_img) — img
채팅방 리액션 (Chat Room Reaction)
- 채팅방 리액션 id (chat_reaction_id) — int — 기본 키
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 채팅방 id (chatroom_id) — int — 외래 키 → 채팅방.채팅방 id — NOT NULL
- 단체채팅방 id (grouproom_id) — int — 외래 키 → 그룹 채팅방.단체채팅방 id — NOT NULL
채팅방 만들기 (Make Chatroom)
- 채팅 상대 아이디 (chatuser_id) — int — 기본 키 — NOT NULL
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 단체채팅방 id (grouproom_id) — int — 외래 키 → 그룹 채팅방.단체채팅방 id — NOT NULL
- 채팅방 id (chatroom_id) — int — 외래 키 → 채팅방.채팅방 id — NOT NULL
팔로우 (Follow)
- 유저 아이디 (user_id) — int — 외래 키 → 유저.유저 아이디 — NOT NULL
- 팔로워 아이디 (follower_id) — int
- 팔로잉 아이디 (following_id) — int
해시태그 (Hash Tag)
- 해시태그 id (hashtag_id) — int — 기본 키 — NOT NULL
- 해시태그명 (hashtag_name) — varchar(25)