Skip to content
Patty edited this page Jan 30, 2025 · 6 revisions

Welcome to the DocumentDB Wiki!

Introduction

DocumentDB offers a native implementation of document-oriented NoSQL database, enabling seamless CRUD operations on BSON data types within a PostgreSQL framework. Beyond basic operations, DocumentDB empowers you to execute complex workloads, including full-text searches, geospatial queries, and vector embeddings on your dataset, delivering robust functionality and flexibility for diverse data management needs.

Components

The project comprises two primary components, which work together to support document operations:

  • pg_documentdb_core: PostgreSQL extension introducing BSON datatype support and operations for native Postgres.
  • pg_documentdb: The public API surface for DocumentDB providing CRUD functionality on documents in the store.

Get Started

Pre-requisites

  • Ensure Docker is installed on your system.
  • For contributing to either of the extensions:
    • VSCode with extensions:
      • C/C++ (From Microsoft)
      • Remote Development

Building DocumentDB with Docker

  1. Clone the DocumentDB repo:
    git clone https://github.com/microsoft/documentdb.git
  2. Create the docker image:
    docker build . -f .devcontainer/Dockerfile -t documentdb 
  3. Run the Image as a container:
    docker run -v $(pwd):/home/documentdb/code -it documentdb /bin/bash 
    cd code
  4. Build & Deploy the binaries:
    make 
    sudo make install
  5. Run start_oss_server.sh to initialize the DocumentDB server and manage dependencies:
    ./scripts/start_oss_server.sh
  6. Connect to psql shell:
    psql -p 9712 -h localhost -d postgres

Functions

For detailed information on the available functions, please refer to the Functions page.