Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AI Schema Enrichment for your Oracle AI Database

AI Schema Enrichment for your Oracle AI Database

Natural Language to SQL democratizes access to your organization's data! Instead of relying on someone's knowledge of your data model and SQL, they can simply ask their AI Agents for what they want, in their own words, 'Natural Language.'

Agents can take this generated SQL and execute it on a database to make things even easier, via MCP Servers.

In fact if an MCP Server is available for your Oracle Database, the agent can interrogate the data dictionary directly, to find the relevant object names to build better queries.

But, what if your database is, hard to navigate or poorly documented?

Instead of asking everyone to build better prompts or front load their agents with tons of context engineering, you can instead annotate your database schemas IN the database, making it much easier to Agents to find what they're looking for.

Avatar for thatjeffsmith

thatjeffsmith

January 26, 2026
Tweet

More Decks by thatjeffsmith

Other Decks in Programming

Transcript

  1. Natural Language to SQL allows anyone to gain insight from

    their data and databases. Copyright © 2025, Oracle and/or its affiliates
  2. Copyright © 2025, Oracle and/or its affiliates NL2SQL – from

    Questions to Queries Ask AI Based on user input: • Answer questions • Complete tasks • Reactive, user prompt dependent Example: write a SQL statement to get total sales Agentic AI AI agents work autonomously to: • Achieve complex goals • Proactive, goal-oriented action Example: resolve complex problem by accessing and analyzing customer data An AI-powered interface that translates plain language questions into executable SQL queries. INPUT "What were our top 10 customers last quarter?" OUTPUT SELECT customer_name, SUM(amount)...
  3. Copyright © 2025, Oracle and/or its affiliates The Pipeline Ask

    AI Based on user input: • Answer questions • Complete tasks • Reactive, user prompt dependent Example: write a SQL statement to get total sales Agentic AI AI agents work autonomously to: • Achieve complex goals • Proactive, goal-oriented action Example: resolve complex problem by accessing and analyzing customer data Accept Question User submits natural language query 01 Discover Schema Explore via MCP 02 Generate SQL LLM translates intent to valid query. 03 Execute Run query, return results. Summarize. 04 Validation and self-correction loops occur between steps.
  4. Does this ring a bell? Coded names 'SALES' are stored

    in a table called XYZ123 Hardcoded relationships The application has keys, the database does not No documentation Unhelpful or missing comments Copyright © 2025, Oracle and/or its affiliates
  5. How this impacts the business Copyright © 2025, Oracle and/or

    its affiliates 1. The LLM has a hard time finding what it needs to generate the correct SQL 2. Multiple queries are issued to the dictionary to find tables or views 3. Agent burns through tokens, Database burns CPU, user burns patience 4. The agent gives up, and comes back to the user for more information 5. Excessive prompt & context engineering required, for interactions with DB How many products did we sell last quarter?
  6. Instead of stuffing your prompts with contexts and resources... Copyright

    © 2025, Oracle and/or its affiliates Annotate your schema, once!
  7. AI Schema Enrichment – how it works Copyright © 2025,

    Oracle and/or its affiliates Oracle SQL Developer extension for VS Code offers a complete User Interface: • Local schema objects are created for managing/storing annotations • Works for ANY supported version of Oracle AI Database (19c, 21c, 26ai) • User inputs additional metadata for: o The schema o Optionally defined groups of tables by category or business purpose o One or more tables o One or more columns Oracle SQLcl's MCP Server has a schema-information tool • Shares w/agent combo of existing catalog metadata & user supplied annotations
  8. Step 1: Connect with Oracle SQL Developer extension for VS

    Code Copyright © 2025, Oracle and/or its affiliates
  9. Annotate the most frequently accessed areas Start with the schema

    itself! Copyright © 2025, Oracle and/or its affiliates Start with things like, what types of business operations does this schema support? What would help the AI Agent, to know overall about this area of the database?
  10. Annotating tables Start with basic description of table and the

    important columns Copyright © 2025, Oracle and/or its affiliates
  11. Suggestions and Best Practices Copyright © 2025, Oracle and/or its

    affiliates Your schema could have hundreds or thousands of objects • Target the high value objects, first • Consider including business logic that drives how the data is utilized • Agents frequently want to sample data from a table to see what it 'looks' like – you can include this as an annotation! • If tables are related, say so – esp if there are no foreign key constraints
  12. Model Context Protocol • Launched Nov 2024 by Anthropic •

    Marketed as “USB-C for AI applications” • Singular interface to standard interactions with database, files, business apps, developer tools… • Simplification hides the complexity of the Server implementation. An Introduction: modelcontextprotocol.io/introduction MCP Client Oracle DB MCP Server MCP Server MCP Server MCP Server MCP Server LLM
  13. Model Context Protocol Server • Model Context Protocol Servers provide

    • Resources – Static items such as documents, images, files • Tools – Essentially a function call with input/output arguments • Prompts – Prompts to give to the LLM for use • Example MCP Servers: github.com/punkpeye/awesome-mcp-servers Resource Prompt Tool
  14. Copyright © 2025, Oracle and/or its affiliates SQLcl: Release 25.4

    Production on Tue Jan 22 10:35:35 2026 Copyright (c) 1982, 2025, Oracle. All rights reserved Connected to: Oracle Database 26ai Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free Version 23.26 SQL> cm list . ├── Cloud │ └── Autonomous Reporting └── Local ├── EMS └── ERP SQL> viins ¦ 1:0 ¦ OE¦ ERP Introducing Oracle Database’s MCP Server Database Availability • any edition, including FREE • any version (19c, 21c, 23ai, 26ai) • any deployment (on-premises, Cloud, containers, etc.) Technology stack • included with database • existing, proven product • runs locally, STDIO • JSON-RPC comms
  15. Oracle SQLcl: MCP Server for Oracle Database • Provides to

    any MCP Client: • list-connections • connect • run-sql • run-sqlcl • schema-information • disconnect • Secure Access • Agent doesn’t work with database directly • Credentials never shared with the agent • Passwords/Certificates encrypted in Oracle wallets Copyright © 2025, Oracle and/or its affiliates
  16. Agents can be told how to navigate your database! Copyright

    © 2025, Oracle and/or its affiliates • Our MCP Tool provides your Agent everything it needs to know about your application schema • Fewer queries to ‘figure stuff out’ • Faster, more efficient FEWER tokens!
  17. Example: tell me about my online retail sales Copyright ©

    2025, Oracle and/or its affiliates • My table and column names are NOT descriptive • I have no table or column level comments • The data is stored as JSON • I have added AI Schema Enrichment data!
  18. Our MCP Server delivers the enrichment data as CSV Copyright

    © 2025, Oracle and/or its affiliates
  19. So what happened? Copyright © 2025, Oracle and/or its affiliates

    • Agent knew immediately to find the data in table, BAD_NAME_142 • Agent knew to query the column, C • Knew was stored as JSON, used JSON_TABLE constructor function • Knew the JSON array "products" and nested attribute labels, "product_name", "quantity" • One request for information in our schema • First attempt to generate SQL, success • Fewer Tokens consumed • Fewer Database and Network resources burned • AI Enrichment data added 1 time, now available in a consistent manner to every single AI Agent that supports MCP
  20. Next Steps Explore and learn more about our MCP Server.

    Explore the MCP LiveLab Download SQLcl Get started with our local MCP Server for the Oracle Database. Alternatively download our SQL Developer Extension for VS Code, which includes SQLcl. Copyright © 2025, Oracle and/or its affiliates Try FreeSQL.com Oracle’s free online portal for learning SQL and data management. Run in your browser or connect from your favorite development and query IDEs – perfect for exploring with your local agent via our MCP Server! Step-by-Step tutorials for getting started, including prompts to guide you on your Agentic AI development experience with the Oracle AI Database.
  21. Copyright © 2025, Oracle and/or its affiliates Blog: Introducing Oracle

    MCP Server Docs: Oracle SQLcl MCP Server YouTube: General Overview Presentation YouTube: Demo, no slides! Additional Resources