> For the complete documentation index, see [llms.txt](https://seungyeon-kang.gitbook.io/yeons-frame/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://seungyeon-kang.gitbook.io/yeons-frame/project/misoweather/02.-databse.md).

# DB 설계 - JPA 활용 중심

## 구분

* 멤버 테이블
* 날씨
* 서베이
* 지역
* 매핑 테이블

## 특이사항

* JPA에서 연관관계를 맺을 경우 프록시와 테스트에 대한 고민
* Emoji, Adverb, Adjective에 대한 고민
* 단방향 연관관계 vs 양방향 연관관계에 대한 고민
* Batch Delete가 주기적으로 이루어져야 하는 문제
* 날씨 정보를 어떻게 전처리하여 저장할 것인가?
* 사용자가 서비스에 오랫동안 머무르면 언제 현재 날씨 정보 등을 가져와 어떻게 저장할 것인가?
* 회원 탈퇴시 삭제 범위
* 쿼리를 사용할 것인가 vs 가져와서 서버단에서 처리할 것인가?

## 결과

![dbtable](/files/Bp4u3J6icrVdkpLHM0Ng)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://seungyeon-kang.gitbook.io/yeons-frame/project/misoweather/02.-databse.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
