1. 아래 사이트에 접속하여 오른쪽 아래에 있는 [Download] 버튼을 클릭한다.
www.mongodb.com/try/download/community
The most popular database for modern apps
We're the creators of MongoDB, the most popular database for modern apps, and MongoDB Atlas, the global cloud database on AWS, Azure, and GCP. Easily organize, use, and enrich data — in real time, anywhere.
www.mongodb.com

2. 시스템 환경변수 중 PATH 환경변수를 추가한다.
보통 C:\Program Files\MongoDB\Server\4.4 이곳에 몽고디비 설치되어 있음!

3. 윈도우 사용자 폴더 밑에 [database] 폴더를 만들고 그 안에 [local]폴더를 만든다.
C:\Users\hyerii\database\local
4. cmd 창을 연 후
cd C:\Users\hyerii\database\local
mongod --dbpath /Users/hyerii/database/local
5. 몽고디비 실행됨!
몽고디비 데이터베이스를 사용하려면 이 cmd창이 항상 실행되어 있어야 한다.
6. 방금 명령한 cmd창이 열려있는 상태로 새로운 cmd창을 연다.
7. 새로운 cmd창에서
mongo
use local
db.users.insert({name : '고양이발', age : 50})
db.users.find().pretty()
를 실행해본다.


몽고디비는 관계형 데이터베이스의 테이블 대신 컬렉션(Collection)으로 대체되고 데이터는 객체 형태로 만들어지게 된다. 장점은 하나의 컬렉션 안에 복잡한 자료형의 데이터가 들어갈 수 있다.(JSON 객체랑 비슷) 단점은 복잡한 데이터가 들어가서 데이터 처리 방식이 복잡해 질 수 있다.
(맥은 어떻게 하는지 알아보기)