4  Database models

Wikipedia 2016 Database Models

Wikipedia (2016)

4.1 Document databases

Most well known example is mongodb. Document databases mostly store json documents. They are schema-free organization of data. That is unlike the relational databases, you do not upfront have to design database schema.

This has advantages and disadvantages.

Examples include

  • MongoDB
  • Databricks
  • Amazon DynamoDB
  • Microsoft Azure Cosmos DB
  • Couchbase
  • Firebase (google)
  • Oracle NoSQL

4.2 Graph Database

Wikipedia2016DatabaseModelsFigure

4.3 Vector databases

graph TD
    A[User Query] --> B[RAG System]
    B --> C[Query Embedding]
    C --> D[Vector Database]
    D --> E[Retrieve Similar Vectors]
    E --> F[Fetch Corresponding Documents]
    F --> G[Augment Original Query]
    G --> H[LLM]
    H --> I[Generate Response]
    I --> J[Return Answer to User]

    subgraph "Document Ingestion"
        K[Source Documents] --> L[Text Chunking]
        L --> M[Embedding Generation]
        M --> N[Store in Vector Database]
    end

    D -.-> N