mcpdata Request an invite

Answers / Explainers

What is the difference between giving AI a file and giving it a database?

Recipe verified on Ran on the public demo (read-only)
Short answer

A file is read: the assistant takes in as much as fits and reasons over that. A database is queried: the assistant asks questions and the database computes the answers over every row. Files suit small documents; data you count, sum or compare belongs in a database.

Steps

  1. Connect your assistant to the public demo. It's a read-only instance with 10 million synthetic orders, so you can try this before you have your own. In Claude Code:
    claude mcp add --transport http mcpdata-demo https://demo.mcpdata.org/mcp --header "Authorization: Bearer cdb_live_PkVoldus8qcE-hqffjajNZzQwiA7rTHMoR4RLSAxsCE"

    The key is public on purpose: it can only read the demo's sample data. For Claude Desktop, Cursor and other apps, see Connect your AI.

  2. Ask your question. Give your AI this prompt:
    Using mcpdata, how many orders in Demo.Orders were refunded, by region?
What your AI does: the tool call it makes for this prompt, and what came back
query(table_name="Demo.Orders", filters=[{"column": "status", "op": "eq", "value": "refunded"}], group_by=["region"], agg=[{"func": "count", "column": "order_id", "alias": "refunded_orders"}], sort=[{"column": "refunded_orders", "desc": true}]) → 3 rows
What you should get · the recipe's real result from its last run
regionrefunded_orders
Americas167,779
EMEA152,341
APAC80,113

Synthetic data: the demo's orders are generated, not real customers.

The assistant needs mcpdata connected (step 1) to run the query.

Why this works

With a file, the answer depends on how much of it the assistant read and how well it added up. With a database, it depends only on the query, which you can see and run again. A database also remembers: the data is there in the next conversation, for other people and for your other tools.

Related questions