eatthefrog

몽고DB) DOCUMEMNT DATABASE 본문

백엔드 노트

몽고DB) DOCUMEMNT DATABASE

eater_forg 2025. 11. 18. 12:07

 

개요

MongoDB는 NoSQL 데이터베이스로, 유연한 JSON 형식의 문서(BSON)로 데이터를 저장하는 오픈소스 데이터베이스입니다. 관계형 데이터베이스의 테이블과 행 대신 컬렉션과 문서를 사용하여 데이터를 관리합니다. 확장성과 성능이 뛰어나 현대적인 애플리케이션 개발에 널리 사용됩니다.

 

스키마가 유연하여 애플리케이션 요구사항 변화에 빠르게 대응할 수 있고, 개발 속도가 향상됩니다. 수평적 확장(샤딩)이 용이하여 대용량 데이터와 높은 트래픽을 효과적으로 처리할 수 있습니다. 강력한 쿼리 언어와 집계 파이프라인을 제공하여 복잡한 데이터 분석 및 처리가 가능합니다.

 

1. A document database stores data in JSON-like documents(not in tables) which can represent complex data structures.

2. A document databse supports both structured and unstructured data through its fliexible schema.

3. A document databse can store various type of data. In the context of MongoDB, documnets are the fundamental unit of data. They have a JSON-like structure, consiting of filed-value pairs.

 

 

장점

문서 데이터베이스는 데이터를 JSON과 유사한 문서 형태로 저장하며, 각 문서는 키-값 쌍의 집합입니다. 관계형 데이터베이스처럼 고정된 스키마가 필요 없어, 같은 컬렉션 내에서도 서로 다른 구조의 문서를 저장할 수 있습니다. 이러한 유연성은 객체 지향 프로그래밍과 자연스럽게 연결되어 개발자 경험을 크게 향상시킵니다.

 

1. It allows each doucment to have a unique sturcture, accommodating various data type and feilds within a single collection.

2. It enables handling unstructured or semi-struture data that soesn't it neatly into a table.

3. It permits changes and additions to the scema without requiring predefined structures, madking it adaptable to evloving data requirements.

 

핵심 아키테쳐

1. A colloection is a group of documents, and a databse is a group of collections.

'백엔드 노트' 카테고리의 다른 글

몽고 DB 자격증 따기 여정  (0) 2025.11.18
몽고DB - English Keyword  (0) 2025.11.18
GraphQL 타입 불일치 문제를 사전에 방지하는 방법  (0) 2025.11.16
MongoDB Compass indexes  (0) 2025.11.11
CI/CD 개발 프로세스  (0) 2025.06.24