db 모델링

테이블 (4)

도서 (Book)

  • bookId — Integer — 기본 키 — NOT NULL
  • 도서명 (name) — string — NOT NULL
  • ISBN (isbn) — Integer — NOT NULL
  • 이미지 (image) — multipart file
  • 저자 (author) — string — NOT NULL
  • 출판사 (publisher) — string — NOT NULL
  • 대여 가능 수 (avaiable) — Integer — NOT NULL
  • userId — Integer — 외래 키 → 사용자.userId — NOT NULL

리뷰 (Review)

  • reviewId — Integer — 기본 키 — NOT NULL
  • bookId — Integer — 외래 키 → 도서.bookId — NOT NULL
  • title — string
  • 내용 (content) — string
  • 별점 (rating) — string — NOT NULL
  • userId — Integer — 외래 키 → 사용자.userId — NOT NULL

리뷰 댓글 (Comment)

  • commentId — Integer — 기본 키 — NOT NULL
  • reviewId — Integer — 외래 키 → 리뷰.reviewId — NOT NULL
  • 내용 (content) — string — NOT NULL
  • userId — Integer — 외래 키 → 사용자.userId — NOT NULL

사용자 (User)

  • userId — Integer — 기본 키 — NOT NULL
  • 이름 (name) — string — NOT NULL
  • 닉네임 (nickname) — string — NOT NULL
  • 이메일 (email) — string — NOT NULL
  • 비밀번호 (password) — string — NOT NULL
  • bookId — Integer — 외래 키 → 도서.bookId — NOT NULL