SynapCores

SynapCores Vector Database: The Next Generation of AI-Native Data Infrastructure

A Technical White Paper Comparing SynapCores with Milvus, Pinecone, Weaviate, and Traditional Vector Databases

Version 1.1 | November 23, 2026 | SynapCores 2.5.1-ce (Community Edition) | By SynapCores Engineering Team

Executive Summary

The explosion of AI applications has created unprecedented demand for vector databases capable of storing, indexing, and searching high-dimensional embeddings. While specialized vector databases like Milvus, Pinecone, and Weaviate have emerged to address this need, they add architectural complexity when paired with a relational database: vectors live in one system and relational data in another, and applications join the two in code.

SynapCores represents a paradigm shift: a unified AI-native database that combines:

  • Native Vector Operations - HNSW indexing, cosine similarity, and semantic search
  • SQL Integration - Standard SQL syntax with AI function extensions
  • Embedded ML - AutoML, classification, and prediction within the database
  • Built-in RAG - Retrieval in SQL and generation with GENERATE() on the configured LLM, without external orchestration
  • Multi-Modal Storage - Text, documents and media records with their embeddings in a single system: EMBED() for text, VECTOR(n) columns for image or audio vectors from your own model
  • Rust Performance - A native Rust engine with built-in admission control: 32 SQL statements run at once with the shipped configuration, and further requests wait in a queue

Key Findings:

MetricTraditional Approach (Milvus + PostgreSQL + ML Pipeline)SynapCores Unified Platform
System Components3+ separate systems1 unified database
Development ComplexityOrchestration code that calls each system and merges the resultsSingle SQL query
Query PathRound trips across 3+ systems per queryOne SQL query with HNSW top-k similarity search inside SQL
Infrastructure3+ systems to provision and pay forOne engine; Community Edition is free
OperationsMonitoring, scaling and backing up each systemOne engine to deploy and monitor

Query latency depends on your hardware, data size, vector dimensions, index settings and configuration; measure it on your own instance with EXPLAIN ANALYZE.

This white paper provides detailed technical analysis, architectural comparisons, runnable SQL examples, and real-world use cases demonstrating SynapCores's advantages over existing vector database solutions.

1. Introduction

1.1 The Vector Database Imperative

The rise of transformer models and large language models (LLMs) has fundamentally changed how applications handle data. Modern AI applications require:

  • Semantic Search - Finding content by meaning, not keywords
  • Recommendation Systems - Similarity-based product/content discovery
  • RAG Applications - Combining retrieval with generative AI
  • Multi-Modal Understanding - Processing text, images, audio together
  • Real-Time Inference - Predictions and AI functions called inside SQL queries, next to the data

Traditional relational databases excel at structured data but struggle with high-dimensional vectors. Specialized vector databases emerged to fill this gap, but create new architectural challenges.

1.2 The Problem with Current Solutions

Architecture Fragmentation:

Traditional AI Stack:
┌─────────────────┐
│  Application    │
└────────┬────────┘
         │
    ┌────┴─────┬──────────┬─────────────┐
    │          │          │             │
┌───▼────┐ ┌───▼────┐ ┌───▼───────┐ ┌───▼──────┐
│Postgres│ │ Milvus │ │  OpenAI   │ │  Redis   │
│  (SQL) │ │(Vector)│ │ (Embed)   │ │ (Cache)  │
└────────┘ └────────┘ └───────────┘ └──────────┘

Problems:

  • Data Duplication - Same data copied across systems
  • Consistency Challenges - Keeping vectors and metadata in sync
  • Complex Orchestration - Application code manages multiple systems
  • Network Latency - Multiple round trips for simple queries
  • Operational Burden - Monitoring, scaling, backing up 3+ systems

1.3 SynapCores's Unified Approach

SynapCores Unified Stack:
┌─────────────────┐
│  Application    │
└────────┬────────┘
         │
    ┌────▼──────────────────────────┐
    │          SynapCores           │
    │  ┌──────────────────────────┐ │
    │  │ SQL Engine + Vector Ops  │ │
    │  ├──────────────────────────┤ │
    │  │ Embedded ML + AutoML     │ │
    │  ├──────────────────────────┤ │
    │  │ RAG + Semantic Search    │ │
    │  ├──────────────────────────┤ │
    │  │ Columnar + Document Store│ │
    │  └──────────────────────────┘ │
    └───────────────────────────────┘

Benefits:

  • Single source of truth
  • ACID transactions on row tables, vectors included
  • No data synchronization overhead
  • Single query for complex operations
  • Unified observability: GET /health, EXPLAIN ANALYZE and GET /v1/query/admission

2. The Vector Database Landscape

2.1 Current Architecture Patterns

Common Pattern: Vector DB + Relational DB

Application Logic:
1. Insert data into PostgreSQL
2. Generate embeddings (OpenAI API call)
3. Insert vectors into Milvus
4. Keep metadata in sync
5. Query both systems for results
6. Join results in application layer

Pain Points:

  • A network round trip to each system per operation
  • Eventual consistency between systems
  • Complex error handling
  • Data duplication costs

3. SynapCores Vector Architecture

3.1 Vector Storage Layer

SynapCores's vector storage is built on three core principles:

A. Vectors in the Same Row as Their Data

CREATE TABLE products (
    product_id   INTEGER PRIMARY KEY,
    product_name TEXT,
    category     TEXT,
    price        DOUBLE,
    description  TEXT,
    embedding    VECTOR(384)    -- EMBED() returns 384 dimensions
);

-- One INSERT writes the row and its embedding
INSERT INTO products (product_id, product_name, category, price, description, embedding)
VALUES (
    1, 'Wireless Noise-Cancelling Headphones', 'electronics', 89.99,
    'Over-ear Bluetooth headphones with active noise cancelling',
    EMBED('Wireless Noise-Cancelling Headphones. Over-ear Bluetooth headphones with active noise cancelling')
);

A vector is a VECTOR(n) column of an ordinary table, so each embedding is stored in the same row as the data it describes:

  • One Write: a single INSERT stores the row and its embedding, computed in place by EMBED()
  • One Read: a query filters on relational columns and ranks by similarity in the same statement
  • Any Dimension: VECTOR(n) holds EMBED() vectors (384 dimensions) or vectors from your own model, such as VECTOR(512) or VECTOR(768)

B. Space Management

POST /v1/vectors/collections
{"name": "documents", "dimensions": 384, "distance_metric": "cosine", "index_type": "hnsw"}

GET /v1/vectors/collections/documents
{"data": {"name": "documents", "dimensions": 384, "vector_count": 0,
          "distance_metric": "cosine", "index_type": "hnsw"}}

Each vector space, a table with a VECTOR(n) column or a REST collection, carries its own settings:

  • Dimension Flexibility: Different embedding dimensions per space
  • Metric Selection: Choose the distance metric per use case: a REST collection, flat or hnsw, takes cosine (the default), euclidean or dotproduct, and an HNSW index on a table takes cosine (the default), euclidean, dot or manhattan
  • Index Choice: Exact search (flat, a collection's default) or an HNSW index

C. ACID Transactions on Row Tables

POST /v1/transactions
{"isolation_level": "serializable"}

POST /v1/transactions/{id}/execute
{"sql": "INSERT INTO documents (title, content, embedding) VALUES ($1, $2, $3)",
 "parameters": ["Q4 pricing memo", "Final Q4 pricing", "[0.021, -0.043, ...]"]}

POST /v1/transactions/{id}/commit

SynapCores runs ACID transactions on row tables, with read committed, repeatable read or serializable isolation, and a successful commit is already in the write-ahead log. Rows with VECTOR(n) columns commit and roll back with the rest of their table: compute embeddings with EMBED() before the transaction, then write the vectors inside it.

3.2 Indexing Algorithms

HNSW (Hierarchical Navigable Small World) Implementation

Key Features:

  • Concurrent Access: Searches run alongside other statements under admission control, 32 at once with the shipped configuration (GET /v1/query/admission reports capacity and queue)
  • Maintained: Inserts, updates and deletes keep the index current, and REINDEX rebuilds it with the same options
  • Configurable: Tune m, ef_construction and ef_search for recall vs speed

Index and Top-k Search:

CREATE INDEX idx_products_embedding ON products USING HNSW (embedding)
WITH (metric = 'cosine', m = 16, ef_construction = 200, ef_search = 100);

-- Top-k: ORDER BY the function that matches the index metric, then LIMIT k
SELECT product_name,
       COSINE_SIMILARITY(embedding, EMBED('wireless headphones')) AS similarity
FROM products
ORDER BY similarity DESC
LIMIT 5;
-- EXPLAIN shows: HNSW IndexScan ... index: idx_products_embedding

Validate recall and latency on your own corpus: for recall, compare the HNSW top-k with the exact top-k of the same query with a column filter that every row passes, such as WHERE product_id > 0 (filtered searches rank the matching rows exactly, see 3.5); for latency, EXPLAIN ANALYZE runs the query and reports the plan with its actual time and rows.

3.3 Distance Metrics

SELECT product_name,
       COSINE_SIMILARITY(embedding, EMBED('wireless headphones'))  AS cosine,     -- higher is closer
       EUCLIDEAN_DISTANCE(embedding, EMBED('wireless headphones')) AS euclidean,  -- L2, lower is closer
       DOT_PRODUCT(embedding, EMBED('wireless headphones'))        AS dot,        -- higher is closer
       MANHATTAN_DISTANCE(embedding, EMBED('wireless headphones')) AS manhattan   -- L1, lower is closer
FROM products
ORDER BY cosine DESC
LIMIT 5;

Index Metrics:

An HNSW index takes the matching metric, WITH (metric = 'cosine') (the default), 'euclidean', 'dot' or 'manhattan', and a top-k query uses the index when it orders by the function of the same metric.

Cosine Distance (Most Common for Embeddings):

-- Cosine distance = 1 - cosine similarity (0 means the same direction)
SELECT a.product_name AS product, b.product_name AS compared_with,
       COSINE_SIMILARITY(a.embedding, b.embedding) AS similarity,
       COSINE_DISTANCE(a.embedding, b.embedding)   AS distance
FROM products a
JOIN products b ON b.product_id = 2
WHERE a.product_id IN (1, 3, 9);

Measure on Your Data:

  • EXPLAIN shows whether a query reads the HNSW index, a B-tree index or the table
  • EXPLAIN ANALYZE runs the query and reports the plan with its actual time and rows
  • Vectors from EMBED() have unit length, so cosine similarity and dot product rank them the same way

3.4 Query Engine Integration

SynapCores exposes vector operations as standard SQL functions:

SELECT product_name,
       COSINE_SIMILARITY(embedding, EMBED('wireless headphones')) as similarity
FROM products
WHERE category = 'electronics'
  AND price < 100
ORDER BY similarity DESC
LIMIT 10;

Hybrid Queries (vectors and relational data in one statement):

SELECT
    p.product_id,
    p.product_name,
    p.price,
    o.order_count,
    COSINE_SIMILARITY(p.embedding, $1) as similarity
FROM products p
JOIN (
    SELECT product_id, COUNT(*) as order_count
    FROM orders
    WHERE order_date > '2024-01-01'
    GROUP BY product_id
) o ON p.product_id = o.product_id
WHERE COSINE_SIMILARITY(p.embedding, $1) > 0.5
  AND o.order_count > 100
ORDER BY similarity DESC, o.order_count DESC;

Pass the query vector as $1 in the parameters array of POST /v1/query/execute, as a string such as "[0.12, -0.03, ...]", or write it as a literal such as '[0.12, -0.03, ...]'. In WHERE, write the similarity expression itself; ORDER BY can use its alias.

Architectural Advantage:

  • Milvus: Vector search in a separate service; joins with relational data happen in application code
  • Pinecone: Metadata filters inside the index; joins happen in application code
  • Weaviate: Vector, keyword and hybrid search with filters, model integrations and cross-references between collections; joins with relational data in another database happen in application code
  • pgvector: Vector search and joins inside PostgreSQL
  • SynapCores: JOINs, subqueries, CTEs and GROUP BY in the same statement as the vector functions, with embeddings (EMBED()) and AutoML in the same engine

3.5 Search Engine

Advanced Filtering:

SELECT id, title,
       COSINE_SIMILARITY(embedding, EMBED('legal contract templates')) AS similarity_score
FROM documents
WHERE document_type = 'contract'
  AND published_year >= 2020
ORDER BY similarity_score DESC
LIMIT 20;

A REST collection takes the same kind of filter as JSON on each vector's metadata, with $eq, $ne, $in, $nin, $gt, $gte, $lt or $lte operators, and returns the closest matches first:

POST /v1/vectors/collections/documents/search
{
  "vector": [0.021, -0.043, ...],
  "k": 20,
  "include_metadata": true,
  "filter": {"document_type": "contract", "year": {"$gte": 2020}}
}

A flat collection (the default) applies the filter before the top-k cut and returns the k closest matching vectors. An hnsw collection applies it to the closest candidates its index finds, so for a filter that matches only a few vectors, search a flat collection or raise k.

Performance Optimization:

  • Top-k search: an unfiltered query that orders by the similarity function matching the index metric and LIMITs to k reads the HNSW index
  • Filtered search: WHERE conditions are applied in the scan, through a B-tree index when the filtered column has one, and the matching rows are ranked exactly
  • Query plans: EXPLAIN shows which index each query uses

Index the columns you filter on, for example CREATE INDEX idx_documents_type ON documents (document_type), so a filtered search reads the matching rows through a B-tree IndexScan.

4. Key Differentiators

4.1 Native SQL Integration

Vector Search, Joins and Aggregates in One SQL Query

SynapCores:

SELECT
    c.customer_name,
    p.product_name,
    o.order_date,
    MAX(COSINE_SIMILARITY(p.embedding, EMBED('premium headphones'))) as relevance,
    SUM(oi.quantity * oi.unit_price) as total_spent
FROM customers c
JOIN orders o ON c.customer_id = o.customer_id
JOIN order_items oi ON o.order_id = oi.order_id
JOIN products p ON oi.product_id = p.product_id
WHERE o.order_date > DATE_SUB(CURRENT_DATE, 90, 'DAY')
  AND COSINE_SIMILARITY(p.embedding, EMBED('premium headphones')) > 0.5
GROUP BY c.customer_id, c.customer_name, p.product_id, p.product_name, o.order_date
ORDER BY relevance DESC, total_spent DESC
LIMIT 50;

Milvus Equivalent:

# Step 1: Generate embedding
query_vector = OpenAI().embeddings.create(
    model="text-embedding-3-small", input="premium headphones"
).data[0].embedding

# Step 2: Search Milvus
results = milvus.search(
    collection_name="products",
    data=[query_vector],
    limit=1000,  # Over-fetch: the order filters run later, in PostgreSQL
    filter="",   # Customer and order data live in PostgreSQL
)[0]  # hits for the one query vector

# Step 3: Extract product IDs
product_ids = [hit["id"] for hit in results]

# Step 4: Query PostgreSQL for relational data
conn = psycopg2.connect(...)
cursor = conn.cursor(cursor_factory=RealDictCursor)
cursor.execute("""
    SELECT c.customer_name, p.product_id, p.product_name, o.order_date,
           SUM(oi.quantity * oi.unit_price) as total_spent
    FROM customers c
    JOIN orders o ON c.customer_id = o.customer_id
    JOIN order_items oi ON o.order_id = oi.order_id
    JOIN products p ON oi.product_id = p.product_id
    WHERE o.order_date > CURRENT_DATE - INTERVAL '90 days'
      AND p.product_id IN %s
    GROUP BY c.customer_id, p.product_id, o.order_date
    ORDER BY total_spent DESC
""", (tuple(product_ids),))

# Step 5: Merge results in application code
app_results = []
for row in cursor.fetchall():
    product_id = row['product_id']
    similarity = next(hit["distance"] for hit in results if hit["id"] == product_id)
    if similarity > 0.5:
        app_results.append({**row, 'relevance': similarity})

# Step 6: Re-sort by combined criteria
app_results.sort(key=lambda x: (x['relevance'], x['total_spent']), reverse=True)
final_results = app_results[:50]

4.2 Built-in RAG Capabilities

SynapCores runs retrieval-augmented generation inside the database: retrieval is one SQL query, and GENERATE() sends the grounded prompt to the configured LLM.

-- Retrieve the passages closest to the question and build a grounded prompt
WITH top_passages AS (
    SELECT title, content,
           COSINE_SIMILARITY(embedding, EMBED('Can I return opened headphones?')) AS score
    FROM documents
    ORDER BY score DESC
    LIMIT 3
)
SELECT 'Answer using only these passages. Question: Can I return opened headphones? Passages: '
       || STRING_AGG(title || ': ' || content, ' | ') AS prompt
FROM top_passages;

Pass the prompt to GENERATE(), which calls the configured LLM (Ollama, OpenAI, Anthropic, Gemini or a native GGUF model) and returns the answer as TEXT.

Natural-Language Questions: ASK 'question' converts a question into SQL over your tables (NL2SQL)

Workflow:

User Question: "Can I return opened headphones?"
         ↓
    EMBED(question) → 384-dimension query vector
         ↓
    Top-k search → ORDER BY COSINE_SIMILARITY(embedding, EMBED(question)) DESC LIMIT 3
         ↓
    Grounded prompt → question + the retrieved passages (STRING_AGG)
         ↓
    GENERATE(prompt) → answer from the configured LLM, grounded in your rows

4.3 AutoML Integration

SynapCores embeds an AutoML engine that trains models directly on database tables: CREATE EXPERIMENT tries several algorithms, DEPLOY MODEL publishes the best one, and PREDICT scores rows in SQL.

Customer Churn Prediction Example:

-- Train: try three algorithms with 5-fold cross-validation and keep the best model
CREATE EXPERIMENT churn_prediction AS
SELECT age, tenure, monthly_charges, contract_type, payment_method, num_services, churned
FROM customer_data
WITH (
    task_type = 'binary_classification',
    target_column = 'churned',
    algorithms = ['logistic_regression', 'random_forest', 'gradient_boosting'],
    optimization_metric = 'roc_auc',
    validation_strategy = 'k_fold',
    n_folds = 5,
    max_trials = 20
);

-- Deploy best model
DEPLOY MODEL churn_predictor FROM EXPERIMENT churn_prediction;

PREDICT churn_risk USING churn_predictor  -- make predictions directly in SQL
AS SELECT customer_id, customer_name, age, tenure, monthly_charges, contract_type, payment_method, num_services
FROM customers
WHERE last_activity_date < DATE_SUB(CURRENT_DATE, 30, 'DAY');

PREDICT returns the selected columns plus churn_risk, the predicted probability of churn.

Architecture:

┌────────────────────────────────────────┐
│       SynapCores AutoML Pipeline       │
├────────────────────────────────────────┤
│  1. Data Loader                        │
│     ↓ Read from table                  │
│  2. Feature Preprocessing              │
│     ↓ Fitted scaling, text encoding    │
│  3. Algorithm Selection                │
│     ↓ Try multiple algorithms          │
│  4. Hyperparameter Tuning              │
│     ↓ Grid/random/Bayesian search      │
│  5. Cross-Validation                   │
│     ↓ K-fold validation                │
│  6. Model Deployment                   │
│     ↓ DEPLOY MODEL                     │
│  7. Inline Predictions                 │
│     ↓ PREDICT and AUTOML.PREDICT()     │
└────────────────────────────────────────┘

4.4 Multi-Modal Support

SynapCores keeps media, its metadata and its embeddings in one table: text embeddings come from EMBED(), and image or audio embeddings from your own model go in a VECTOR(n) column of that size.

Example Use Case: Media Asset Management

-- Store a video's location, metadata and an embedding of its description
INSERT INTO media_assets (asset_id, title, asset_type, media_uri, description, embedding)
VALUES (
    'video_007',
    'Initech customer story',
    'video',
    's3://media/video_007.mp4',
    'Customer testimonial video: Initech shares how they cut support costs',
    EMBED('Customer testimonial video: Initech shares how they cut support costs')
);

-- Search similar videos by content
SELECT asset_id, title,
       COSINE_SIMILARITY(embedding, EMBED('customer testimonial videos')) AS similarity
FROM media_assets
WHERE asset_type = 'video'
  AND COSINE_SIMILARITY(embedding, EMBED('customer testimonial videos')) > 0.5
ORDER BY similarity DESC
LIMIT 10;

-- Search images with a vector from your own image model
-- (image_embedding is a VECTOR(512) column; pass the query image's vector as $1)
SELECT asset_id, title,
       COSINE_SIMILARITY(image_embedding, $1) AS similarity
FROM media_assets
WHERE asset_type = 'image'
ORDER BY similarity DESC
LIMIT 10;

4.5 Embedded Inference

SynapCores provides native AI functions callable directly in SQL:

-- Generate embeddings inline
INSERT INTO documents (title, content, embedding)
VALUES (
    'Product Manual',
    'Instructions for Widget X...',
    EMBED('Instructions for Widget X...')  -- Native embedding
);

-- Classify text inline with the local NLI model (entailment probability, 0 to 1)
SELECT
    ticket_id,
    content,
    NLI_CLASSIFY('nli-default', content, 'Something is broken.')->'scores'->>'entailment' AS outage,
    NLI_CLASSIFY('nli-default', content, 'The writer is satisfied.')->'scores'->>'entailment' AS satisfied
FROM support_tickets
WHERE created_at > CURRENT_DATE - INTERVAL '7 days';

NLI_CLASSIFY runs on a local NLI model: enable it with AIDB_NLI_ENABLED=1 and install it with synapcores pull nli-default. For summaries and other generated text, GENERATE(prompt) calls the configured LLM inside the same SELECT.

5. Conclusion

5.1 Key Findings

SynapCores represents a fundamental shift in database architecture:

  1. Unified Platform - SQL, vectors, AutoML and retrieval-augmented generation in one engine
  2. Performance - HNSW top-k similarity search inside SQL, with no network hops between systems
  3. Cost Efficiency - One engine to run instead of several, and Community Edition is free
  4. Developer Productivity - One SQL statement replaces the embed, search, join and merge steps of a multi-system pipeline
  5. Operational Simplicity - A single system to manage instead of several separate systems

5.2 Call to Action

For Developers and Decision Makers:

  • Try or Join the SynapCores community here: https://synapcores.com/sqlv2

Appendices

Appendix A: Architecture Diagrams

SynapCores Internal Architecture:

┌──────────────────────────────────────────────────────┐
│                    SQL Interface                     │
│                   SynapCores SQLv2                   │
└────────────────────┬─────────────────────────────────┘
                     │
┌────────────────────▼─────────────────────────────────┐
│                Query Planner & Optimizer             │
│  • Index selection (B-tree, hash, FULLTEXT, HNSW)    │
│  • Vector-aware planning                             │
│  • Predicate pushdown into index scans               │
└────────────────────┬─────────────────────────────────┘
                     │
         ┌───────────┴───────────┬───────────────┐
         │                       │               │
┌────────▼──────┐    ┌───────────▼─────┐    ┌────▼──────┐
│ Columnar      │    │ Vector          │    │ Document  │
│ Storage       │    │ Storage         │    │ Storage   │
│               │    │                 │    │           │
│ • Parquet     │    │ • HNSW Index    │    │ • JSON    │
│ • Row-group   │    │ • Flat Index    │    │ • Search  │
│   skipping    │    │ • Dist Metrics  │    │ • REST API│
└────────┬──────┘    └───────────┬─────┘    └────┬──────┘
         │                       │               │
         └───────────┬───────────┴───────────────┘
                     │
┌────────────────────▼─────────────────────────────────┐
│              Storage Layer (RocksDB)                 │
│  • ACID transactions on row tables                   │
│  • Write-ahead logging                               │
│  • Crash recovery                                    │
└──────────────────────────────────────────────────────┘

Query Execution Flow:

SQL Query: "SELECT ... WHERE COSINE_SIMILARITY(...) > 0.8"
    │
    ▼
┌─────────────────┐
│ Parse SQL       │
│ (sqlparser-rs)  │
└────────┬────────┘
         ▼
┌─────────────────┐
│ Build AST       │
│ (Abstract       │
│  Syntax Tree)   │
└────────┬────────┘
         ▼
┌─────────────────┐
│ Plan Query      │
│ • Table scans   │
│ • Vector ops    │
│ • Joins         │
└────────┬────────┘
         ▼
┌─────────────────┐
│ Optimize        │
│ • Pushdown      │
│ • Index select  │
│ • Top-k to HNSW │
└────────┬────────┘
         ▼
┌─────────────────┐
│ Execute         │
│ • Vector search │
│ • SQL ops       │
│ • AI functions  │
└────────┬────────┘
         ▼
┌─────────────────┐
│ Return Results  │
└─────────────────┘

Copyright © 2025-2026 SynapCores. All rights reserved.

This white paper is provided for informational purposes only. SynapCores makes no warranties, express or implied, with respect to the information provided herein. Query performance depends on hardware, data and configuration and varies between environments.