How to convert Images, PDF, Excel sheets, or JSON to a relational database with AI



This content originally appeared on DEV Community and was authored by Bobur Umurzokov

Creating a database usually means defining a database schema, setting up a database server, and writing SQL commands/queries. But what if you could skip all that?

Recently, I needed to recreate a new database from an old ER diagram in PNG format. Instead of writing everything manually in SQL, I tried something faster — using GitHub Copilot inside VS Code, along with GibsonAI to validate and deploy it. It worked surprisingly well. So, AI is not only hyping topic but it helps in certain tasks. Let me show you how to achieve this.

Here’s a short demo showing the process:


This video shows how you can go from a simple diagram or screenshot to a working, deployed database using just prompts and AI tools.

Why Databases Still Slow Us Down

Many developers want to launch new apps, build MVPs, or add features to an existing product. But they hit friction when it comes to databases.

It doesn’t matter which language or framework you’re using — eventually, you’ll need a working data backend. And that’s where time gets lost:

  • Setting up the database and designing a schema
  • Adjusting the schema as your app changes
  • Manually building APIs and ORMs
  • No clean way to spin up test environments with real data
  • Worrying about migrations and breaking changes

A New Workflow Using AI Tools

In 2025, AI Agents can create and modify databases on their own. Now let’s see how AI tools solve the following developer challenges, and we can build apps faster:

Challenge Solution with AI
“I don’t want to spend hours setting up DB & APIs” One prompt → working backend & API
“My data model keeps changing as I test ideas” Schema evolution handled automatically and generate mapping data models
“I want to connect my app quickly to my data” Apps can use live APIs with no extra infra.
“I need a testable environment with live data” Hosted database with built-in seed and test data options
“I don’t want to manage migrations or versioning” AI handles that under the hood

AI still is NOT replacing us or software developers, but it is removing friction. You still make the decisions about your schema and relationships. You still write the logic. But you don’t waste time repeating boilerplate steps.

Next, I will show you how I converted an existing ER diagram image to a really working database. I believe you can use the same approach with other data formats.

Convert an ER Diagram Image into a Working Database Using GibsonAI, GitHub Copilot in VS Code

Step 1: Get an ER Diagram

If you already have an ER diagram as a .png, you’re good to go.

If not, you can use tools like drawdb.app to find templates for common use cases (like eCommerce, HR systems, or SaaS apps). You can quickly edit the schema, then export it as a PNG, JSON, or raw SQL. For example, let’s use this music streaming app database diagram template in the demo.

That way, you don’t even need to design the schema from scratch — just adapt an existing one.

Step 2: Enable MCP Server in VS Code

What You Need

  • VS Code (with GitHub Copilot enabled)
  • UV is installed.
  • GibsonAI -Sign up for a free account

    This tool turns your prompt into a complete schema, deploys serverless database and gives you a live REST API for managing data.

Step 3: Set Up GibsonAI CLI and Log In

Before using the GibsonAI MCP server, install GibsonAI’s CLI and log in:

uvx --from gibson-cli@latest gibson auth login

This logs you into your GibsonAI account so you can start using all CLI features.

Step 4: Enable MCP Server in VS Code

To use the GibsonAI MCP server inside your VS Code project, you’ll need to add a configuration script. Create a file called mcp.json inside an empty .vscode/folder. This file defines which GibsonAI MCP server to use for this project.

Copy and paste the following content into the .vscode/mcp.json file:

{
  "inputs": [],
  "servers": {
    "gibson": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "gibson-cli@latest", "gibson", "mcp", "run"]
    }
  }
}

You can also use GibsonAI MCP server with such as Cursor, Claude Desktop, Cline, and Windsurf. See the the instructions for other tools.

Step 5: Describe the diagram in a GitHub Copilot chat prompt

Open your ER diagram (or PNG file) in VS Code in the same VS Code project. Open GitHub Copilot Chat in VS Code, switch to Agent mode, and select the LLM model, such as GPT-4.1 or GPT-4o. You should see the available tools from GibsonAI.

See the available tools from GibsonAI

Write a prompt like:

Create a new GibsonAI database from this ER diagram

GitHub Copilot reads the comment and starts calling the relevant GibsonAI MCP server tools.

Create a new GibsonAI database from this ER diagram

Step 6: Inspect Your Database Schema in the GibsonAI Dashboard

After the prompt runs successfully, go and inspect your new schema in the GibsonAI dashboard. You’ll see everything laid out — tables, columns, relationships — just like in your diagram, with additional improvement, but now fully working and hosted.

Inspect Your Database Schema in the GibsonAI Dashboard

From there, you can continue evolving your schema:

  • Prompt more to customize the schema using natural language. Or switch to writing real SQL queries if you prefer — Studio let you write and run queries directly in your browser. You’ll also see a live ERD diagram update with every change you make.

Wrap-up

In this workflow, I went from an ER diagram image to a live serverless MySQL database — all in just a few minutes.

What surprised me is that the AI tool didn’t just create the schema — it also generated fully working CRUD APIs for each model. These APIs include things like request validation and response schemas, so you can start using them immediately.

This is really helpful if you want to interact with your database directly from your app, without having to build and manage all the data models yourself.


This content originally appeared on DEV Community and was authored by Bobur Umurzokov