도서ERD

테이블 (13)

AI Recommeded Book (AI 추천 책들)

  • recommendation_book_id (AI 추천 책 ID) — int — 기본 키 — NOT NULL
  • recommendation_id (AI 추천 ID) — int — 외래 키 → AI Recommendation.recommendation_id
  • book_id (북 ID) — int — 외래 키 → Book.book_id — NOT NULL

AI Recommendation (AI 추천)

  • recommendation_id (AI 추천 ID) — int — 기본 키
  • book_report_id (독후감 ID) — int — 외래 키 → BookReport.book_report_id — NOT NULL
  • user_id (유저 ID) — int — 외래 키 → BookReport.user_id — NOT NULL
  • created_at (생성 일자) — DateTime
  • Field

Author (저자)

  • author_id (저자 ID) — int — 기본 키 — NOT NULL
  • authorDistId (저자 구별 ID) — int
  • authorName (저자 성함) — varchar(100)
  • authorInfo (저자 설명) — text
  • authorPhoto (저자 사진) — url

Book (책)

  • book_id (북 ID) — int — 기본 키 — NOT NULL
  • category_id (카테고리 ID) — int — 외래 키 → Category.category_id — NOT NULL
  • author_id (저자 ID) — int — 외래 키 → Author.author_id — NOT NULL
  • title (제목) — String
  • description (줄거리) — textarea
  • cover (책 이미지) — image
  • pub_date (출간일) — DateTime
  • customer_review_rank (평점) — int

BookLike (도서 좋아요)

  • book_like_id (좋아요 ID) — int — 기본 키 — NOT NULL
  • user_id (유저 ID) — int — 외래 키 → User.user_id — NOT NULL
  • book_id (북 ID) — int — 외래 키 → Book.book_id — NOT NULL
  • created_at (생성 일자) — DateTime

BookReport (독후감)

  • book_report_id (독후감 ID) — int — 기본 키 — NOT NULL
  • user_id (유저 ID) — int — 외래 키 → User.user_id — NOT NULL
  • book_id (북 ID) — int — 외래 키 → Book.book_id — NOT NULL
  • title (제목) — varchar(100)
  • commentary (감상문) — textarea
  • thumbnail (썸네일) — image
  • created_at (생성 일자) — DateTime
  • updated_at (수정 일자) — DateTime

BookReportLike (독후감 좋아요)

  • book_report_like_id (독후감 좋아요 ID) — int — 기본 키 — NOT NULL
  • user_id (유저 ID) — int — 외래 키 → User.user_id — NOT NULL
  • book_report_id (독후감 ID) — int — 외래 키 → BookReport.book_report_id — NOT NULL

Category (카테고리)

  • category_id (카테고리 ID) — int — 기본 키 — NOT NULL
  • name (카테고리 이름) — varchar(50)

Comment (댓글)

  • comment_id (댓글 ID) — int — 기본 키 — NOT NULL
  • book_report_id (독후감 ID) — int — 외래 키 → BookReport.book_report_id — NOT NULL
  • user_id (유저 ID) — int — 외래 키 → User.user_id — NOT NULL
  • content (내용) — varchar(200)
  • created_at (생성 일자) — DateTime
  • updated_at (수정 일자) — DateTime

Follow (팔로우)

  • follow_id (팔로우 ID) — int — 기본 키 — NOT NULL
  • follower (팔로워) — int — 외래 키 → User.user_id — NOT NULL
  • followee (필로잉) — int — 외래 키 → User.user_id — NOT NULL

ReadBook (유저가 읽은 책)

  • read_book_id (읽은 책 ID) — int — 기본 키 — NOT NULL
  • book_id (북 ID) — int — 외래 키 → Book.book_id — NOT NULL
  • user_id (유저 ID) — int — 외래 키 → User.user_id — NOT NULL
  • author_id (저자 ID) — int — 외래 키 → Book.author_id — NOT NULL

User (유저)

  • user_id (유저 ID) — int — 기본 키 — NOT NULL
  • nickname (닉네임) — varchar(10)
  • username (아이디) — varchar(100)
  • password (비밀번호) — varchar(100)
  • profile_image (프로필 이미지) — image
  • created_at (생성 일자) — DateTime
  • updated_at (수정 일자) — DateTime

WishList (읽고 싶은 책)

  • wish_list_id (위시리스트 ID) — int — 기본 키 — NOT NULL
  • user_id (유저 ID) — int — 외래 키 → User.user_id — NOT NULL
  • book_id (북 ID) — int — 외래 키 → Book.book_id — NOT NULL
  • author_id (저자 ID) — int — 외래 키 → Book.author_id — NOT NULL