NoSQL Document Database

MongoDB — lưu trữ dữ liệu linh hoạt, mở rộng dễ

MongoDB là cơ sở dữ liệu dạng document (JSON/BSON), phù hợp cho ứng dụng web, mobile, analytics, realtime… nơi cấu trúc dữ liệu thay đổi nhanh.

Document Model

Lưu dữ liệu theo document giúp map tự nhiên với object trong code, giảm join, linh hoạt schema.

BSONSchema linh hoạtNested data

Hiệu năng & Index

Hỗ trợ index đa dạng (compound, text, TTL…) giúp truy vấn nhanh và kiểm soát chi phí.

Compound indexText searchTTL

Mở rộng dễ dàng

Replica set tăng tính sẵn sàng, sharding hỗ trợ scale-out khi dữ liệu lớn và traffic cao.

Replica setShardingFailover

Dev-friendly

Phù hợp microservices, event-driven, prototyping nhanh. Có driver mạnh cho nhiều ngôn ngữ.

Node.jsPythonJava GoC#

Quick snippet

Ví dụ kết nối nhanh (Node.js):

mongodb://localhost:27017  →  db.collection("users").find({ active: true })