๋ฐ˜์‘ํ˜•

๋ชฝ๊ณ ๋””๋น„ ๊ฒŒ์‹œ๊ธ€ ์ฝ์Œ์ƒํƒœ ํ‘œ์‹œํ•˜๋Š” ๋ฒ• 1

[MongoDB] ๊ฒŒ์‹œ๊ธ€ ์ฝ์Œ(read)/์•ˆ์ฝ์Œ(unread) ํ‘œ์‹œ ์ƒํƒœ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ๋ฒ•

Intro ์•ˆ๋…•ํ•˜์„ธ์š”. ์ด๋ฒˆ์‹œ๊ฐ„์—๋Š” MongoDB ๋ชฝ๊ณ ๋””๋น„์—์„œ ๊ฒŒ์‹œ๊ธ€ ์ฝ์Œ(read)/์•ˆ์ฝ์Œ(unread) ํ‘œ์‹œ์ƒํƒœ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. How to do ์šฐ์„  ์ œ ์ƒํ™ฉ์˜ ๊ฒฝ์šฐ ๊ณต์ง€์‚ฌํ•ญ Collection(๊ฒŒ์‹œ๊ธ€ Collection๋ผ๊ณ  ๋ด๋„ ๋ฌด๋ฐฉ), ๊ทธ๋ฆฌ๊ณ  ์‚ฌ์šฉ์ž Collection์ด ์กด์žฌํ•ฉ๋‹ˆ๋‹ค. User user collection์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. _id, userId, userName ํ•„๋“œ๋ฅผ ๊ฐ–๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. { _id: user_uniqueId, userId: senderId, userName: userName } Notice notice collection์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. _id, noticeId, title, contents ํ•„๋“œ๋ฅผ ๊ฐ–๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. { _id: us..

Database/monogodb 2023.02.11
๋ฐ˜์‘ํ˜•