JSON to a relational database

Entity Enricher vs Supabase MCP

A database can accept every insert and still give you the wrong purchasing budget. See how a misplaced price corrupts a product catalog, and how Entity Enricher turns reviewed identity and relationship decisions into repeatable tables and updates.

Explore the exampleHow Database Sync works

Who decides what goes in each table?

An agent using Supabase MCP

The agent interprets your JSON and writes SQL. Supabase MCP executes that SQL through apply_migration and execute_sql. Your agent or application must supply the modeling, identity and repeated-import rules.

Entity Enricher

You review a reusable schema, including keys and shared or parent-owned relationships. The engine derives tables, constraints and structural indexes, then delivers subsequent data changes through the same model. AI helps propose the model; code applies its rules.

This comparison covers an agent building from JSON through Supabase MCP. A well-designed Supabase application can implement these safeguards too. The faulty model below is an illustration of a modeling risk, not a Supabase default or a measured failure rate.

Two products. One supplier. Two different prices.

This fictional catalog contains two product samples. Supplier SUP-7 sells a lamp for €12 and a desk for €85. The supplier is shared; the price and lead time belong to each offer.

The input JSON — two samples of the same entity type
[
  {
    "sku": "LAMP-01",
    "name": "Reading lamp",
    "offers": [
      {
        "supplier": {
          "supplier_id": "SUP-7",
          "name": "Northstar Supply"
        },
        "unit_cost_eur": 12,
        "lead_time_days": 3
      }
    ]
  },
  {
    "sku": "DESK-02",
    "name": "Writing desk",
    "offers": [
      {
        "supplier": {
          "supplier_id": "SUP-7",
          "name": "Northstar Supply"
        },
        "unit_cost_eur": 85,
        "lead_time_days": 14
      }
    ]
  }
]

In Entity Enricher, these are schema examples, not an automatic data import. Review the generated schema, mark the supplier as shared and the offers as parent-owned, then publish and enrich or inject matching records. Stable SKU and supplier IDs provide identity for this example.

A foreign key cannot tell you who owns the price

Illustrative faulty mapping

The price lives on the supplier

product
Column and keySQL type
skuPKtext
nametext
supplier_idFKtext

product.supplier_id → supplier.supplier_id

supplier
Column and keySQL type
supplier_idPKtext
nametext
unit_cost_eurnumeric
lead_time_daysinteger

Updating SUP-7 with the desk's offer overwrites the lamp's price and delivery time. The foreign key is valid. The data is wrong. This layout also limits each product to one supplier.

Entity Enricher with the reviewed model

Each offer keeps its own facts

product
Column and keySQL type
skuPKtext
nametext
supplier
Column and keySQL type
supplier_idPKtext
nametext

product 1 → N offer N ← 1 supplier

offer
Column and keySQL type
product_skuPK / FKtext
supplier_idPK / FKtext
unit_cost_eurnumeric
lead_time_daysinteger

One supplier row is reused. Each product–supplier pair has its own price and lead time. Adding the desk's offer leaves the lamp's offer intact.

Simplified table names and natural keys; sync metadata is omitted. PK = primary key, FK = foreign key. The two offer keys form one composite key. This example assumes one current offer per pair; price histories, currencies or quantity tiers need additional modeling.

Watch the purchasing budget change

A buyer needs 100 lamps. Switch between the first and second import to see what each model returns.

Faulty model: budget for 100 lamps

€8,500

Overstated by €7,300. Your margin report and purchase forecast now use the desk's price.

Reviewed EE model: budget for 100 lamps

€1,200

The lamp's offer remains €12 with a 3-day lead time. The desk's offer is a separate row.

Illustrative arithmetic from the sample data; no database calls or measured financial losses.

The costs you encounter after the tables exist

Fragmented supplier records

Mint a new supplier ID on each import and purchases split across duplicate profiles. Spend totals and supplier comparisons become misleading.

Entity Enricher

Declared stable keys make repeated entities converge. Optional semantic IDs can help when labels vary, with matches that still need review.

Slow supplier lookups and unnecessary writes

A junction key starting with product_sku does not replace an index starting with supplier_id. Reverse lookups can become costly as your catalog grows.

Entity Enricher

EE generates structural indexes for its relationships, including reverse junction lookups, and avoids redundant leading-prefix indexes. Tune other indexes to your actual queries.

A new field breaks downstream imports

Your JSON gains an offer field but the target table or import SQL does not. New data fails to load or never reaches the reports that need it.

Entity Enricher

The published schema drives both table shape and data projection. Preview supported migrations before publishing; unsupported transformations are blocked.

A retry repeats work or overwrites newer data

A connection drops after an import. Without replay rules, retrying can create duplicates; an older update can replace a more recent offer.

Entity Enricher

EE supplies ordered delivery, identity-based upserts and revision guards. The PostgreSQL client applies a batch in a transaction and acknowledges after commit.

Successful enrichment, incomplete catalog

The model returns JSON, but an offer lacks a required key or the target refuses the write. A success message alone can hide missing products and offers.

Entity Enricher

Admission policies can reject an entity or omit incomplete children. EE reports partial results and tracks replica delivery separately, so you can identify what needs repair.

Every refresh rewrites the whole catalog

Rewriting unchanged offers consumes database work, maintains indexes unnecessarily and makes downstream change processing noisier.

Entity Enricher

EE detects unchanged entity state and guards row updates against unchanged values. Consumers can follow the delta feed for changes, including deletions.

What still needs your judgment

Review identity, ownership and the meaning of each field before publishing. EE makes those decisions executable; it cannot prove your business model is correct. Semantic matching can make mistakes, and query performance still depends on workload and database size.

The latest enrichment replaces current state: missing values can erase earlier values, and a shorter owned-offer list removes omitted offers. Keep separate history when needed. Partial or rejected data requires correction and resubmission; a delivery status is not automatic repair.

Already using Supabase?

Supabase MCP is useful when you want an agent to inspect a database and write custom SQL. EE is useful when the same data contract must keep producing consistent relational updates. You can use Supabase PostgreSQL as the destination for EE's sync client, subject to connection and database permissions. Application access policies remain yours to configure.

Sources and comparison scope

Reviewed September 10, 2026. Supabase provides migrations and Advisors that flag missing indexes; EE's distinction is generating and applying rules from the reviewed enrichment schema.