[Database] MongoDB

2024. 2. 27. 18:21·database, sql
 

Install MongoDB Community Edition on macOS — MongoDB Manual

Docs Home → MongoDB Manual MongoDB AtlasMongoDB Atlas is a hosted MongoDB service option in the cloud which requires no installation overhead and offers a free tier to get started.Use this tutorial to install MongoDB 7.0 Community Edition on macOS using

www.mongodb.com

 

Getting Started :: Spring Data MongoDB

First, you need to set up a running MongoDB server. Refer to the MongoDB Quick Start guide for an explanation on how to startup a MongoDB instance. Once installed, starting MongoDB is typically a matter of running the following command: /bin/mongod Then yo

docs.spring.io

 

MongoDB 실행


//install
$ brew tap mongodb/brew
$ brew update
$ brew install mongodb-community@7.0

//run using homebrew
$ brew services start mongodb-community@7.0
$ brew services stop mongodb-community@7.0

//run as background process (Apple Silicon)
$ mongod --config /opt/homebrew/etc/mongod.conf --fork
$ mongod --dbpath /path/to/dbdir --logpath /path/to/mongodb.log --fork

 

 

MongoDB SH 접속


$ mongosh

 

 

MongoDB Database 생성 및 확인


//create database
$ use {db_name}

//show databases, collections
$ show dbs
$ show collections

 

 

Spring-Data-MongoDB


 

Spring Data MongoDB - Reference Documentation

As of version 3.6, MongoDB supports the concept of sessions. The use of sessions enables MongoDB’s Causal Consistency model, which guarantees running operations in an order that respects their causal relationships. Those are split into ServerSession inst

docs.spring.io

 

 

MongoDB 특징


- mongodb는 document(JSON) 형태(schema-less)로 데이터를 저장

 

저작자표시 (새창열림)
'database, sql' 카테고리의 다른 글
  • [Database] Index
  • [Database] RDBMS 정규화
  • [Database] RDBMS과 NoSQL
  • [SQL] UNION과 UNION ALL
Jisung Jung
Jisung Jung
Jisung Jung의 기술블로그
  • Jisung Jung
    Jisung Jung의 기술블로그
    Jisung Jung
  • 전체
    오늘
    어제
    • 분류 전체보기 (65)
      • spring, jpa (14)
      • java (7)
      • go (3)
      • kafka (3)
      • network (1)
      • algorithm (11)
      • data structure (3)
      • database, sql (7)
      • infra (7)
      • bootcamp (6)
      • git (3)
  • 블로그 메뉴

    • 홈
    • 방명록
    • 글쓰기
  • 링크

  • 공지사항

  • 인기 글

  • 태그

  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.4
Jisung Jung
[Database] MongoDB
상단으로

티스토리툴바