dbd-prac

Tables (7)

comment (댓글)

  • comment_id (댓글 아이디) — Primary key — NOT NULL
  • user_id (댓글 작성자 아이디) — Foreign key → user.user_id — NOT NULL
  • post_id (댓글 달린 게시글 아이디) — Foreign key → post.post_id — NOT NULL

follow (팔로우)

  • follow_id (팔로우 아이디) — Primary key — NOT NULL
  • followee_id (팔로우 당하는 유저 아이디) — Foreign key → user.user_id — NOT NULL
  • following_id (팔로우하는 유저 아이디) — Foreign key → user.user_id — NOT NULL

hashtag (해시태그)

  • hashtag_id (해시태그 아이디) — Primary key — NOT NULL

like (좋아요)

  • user_id (좋아요 누른 사용자 아이디) — Foreign key → user.user_id — NOT NULL
  • post_id (좋아요 누른 게시글 아이디) — Foreign key → post.post_id — NOT NULL

post (게시글)

  • post_id (게시글 아이디) — Primary key — NOT NULL
  • user_id (게시글 작성자 아이디) — Foreign key → user.user_id — NOT NULL

post_hashtag (게시글에 달린 해시태그)

  • post_id (게시글 아이디) — Foreign key → post.post_id — NOT NULL
  • hashtag_id (해시태그 아이디) — Foreign key → hashtag.hashtag_id — NOT NULL

user (사용자)

  • user_id (사용자 아이디) — Primary key — NOT NULL