๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
STORAGE/๋‹จ์–ด์žฅ๐Ÿ” 

์Šคํ‚ค๋งˆ(schema)

by _wavy 2024. 4. 5.

์Šคํ‚ค๋งˆ

๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์˜ ๊ตฌ์กฐ์™€ ๊ทœ์น™(์ œ์•ฝ ์กฐ๊ฑด)์— ๊ด€ํ•œ ์„ค๊ณ„๋„. ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๊ฐ€ ์–ด๋–ป๊ฒŒ ๊ตฌ์„ฑ๋˜์–ด ์žˆ๋Š”์ง€, ์–ด๋–ค ๋ฐ์ดํ„ฐ๊ฐ€ ์–ด๋–ค ํ˜•ํƒœ์™€ ๊ด€๊ณ„๋กœ ์ €์žฅ๋˜๋Š”์ง€๋ฅผ ์ •์˜ํ•œ๋‹ค. ์ด๋Š” ํ…Œ์ด๋ธ”/ํ•„๋“œ/๊ด€๊ณ„/์ธ๋ฑ์Šค ๋“ฑ์„ ์ •์˜ํ•˜๋Š” ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ์˜ ์ง‘ํ•ฉ์ด๋‹ค. 

์˜ˆ๋ฌธ

  1. Everything in Mongoose starts with a Schema. Each schema maps to a MongoDB collection and defines the shape of the documents within that collection.
    โžœ Mongoose์—์„œ ๋ชจ๋“  ๊ฒƒ์€ ์„ค๊ณ„๋„๋กœ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ ์„ค๊ณ„๋„๋Š” MongoDB ์ปฌ๋ ‰์…˜์— ๋งคํ•‘๋˜๋ฉฐ ํ•ด๋‹น ์ปฌ๋ ‰์…˜ ๋‚ด์˜ ๋ฌธ์„œ์˜ ํ˜•ํƒœ๋ฅผ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ๋ฌธ ์ถœ์ฒ˜: mongoosejs.com/docs/guide.html#definition

'STORAGE > ๋‹จ์–ด์žฅ๐Ÿ” ' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

ํ˜ธ์ŠคํŒ…(hosting)  (0) 2024.04.05
์Šค์บํด๋”ฉ(scaffolding)  (0) 2024.04.04
๋ถ€ํŠธ์ŠคํŠธ๋žฉ  (0) 2024.04.03

๋Œ“๊ธ€