惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
博客园 - 三生石上(FineUI控件)
S
Securelist
U
Unit 42
The Cloudflare Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Simon Willison's Weblog
Simon Willison's Weblog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog
T
Tenable Blog
The Hacker News
The Hacker News
The Register - Security
The Register - Security
IT之家
IT之家
博客园 - 【当耐特】
Spread Privacy
Spread Privacy
P
Privacy & Cybersecurity Law Blog
博客园_首页
T
Tailwind CSS Blog
人人都是产品经理
人人都是产品经理
C
Cybersecurity and Infrastructure Security Agency CISA
Know Your Adversary
Know Your Adversary
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
T
Tor Project blog
C
CERT Recently Published Vulnerability Notes
Apple Machine Learning Research
Apple Machine Learning Research
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
V
Vulnerabilities – Threatpost
A
Arctic Wolf
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
V
V2EX
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Cyberwarzone
Cyberwarzone
V
Visual Studio Blog
月光博客
月光博客
爱范儿
爱范儿
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
G
GRAHAM CLULEY
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Heimdal Security Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Why AI Should Not Write SQL Against ERP Databases
JiangGuangFe · 2026-05-22 · via DEV Community

Most AI + ERP demos start with the same pattern:

  1. Connect an LLM to a database.
  2. Show it the schema.
  3. Ask it to generate SQL.
  4. Execute the SQL.
  5. Summarize the rows.

For a toy database, this is fine.

For an ERP system, it is a weak default.

ERP data is not just tables and columns. It is protected by business semantics, user permissions, record rules, company boundaries, field visibility, implementation-specific conventions, and audit requirements.

The question should not be:

Can the model generate SQL?

Enter fullscreen mode Exit fullscreen mode

The better question is:

Can the system answer business questions while preserving the governance rules that already protect the ERP?

Enter fullscreen mode Exit fullscreen mode

That difference matters.

The demo path is not the production path

The fastest demo is often the most dangerous production design.

If the model sees a database schema, it can produce impressive results quickly:

SELECT ...
FROM sale_order
JOIN res_partner ...

Enter fullscreen mode Exit fullscreen mode

But an ERP database schema is not the real product boundary.

The real boundary lives higher up:

  • which user is asking;
  • which business object the user is allowed to access;
  • which record rules apply;
  • which companies the user can see;
  • which fields are sensitive;
  • which workflow states have business meaning;
  • which metric definition is correct;
  • which query should be rejected instead of guessed.

A generated SQL string does not naturally carry that context.

This is why "LLM writes SQL against the ERP database" is a useful demo technique, but a poor default architecture.

Raw SQL skips too many boundaries

When an AI client generates raw SQL against an ERP database, several boundaries become fragile.

First, user permissions are usually not encoded in the schema. A table name does not tell the model which user can see which records, which company boundary applies, or which fields are hidden by business policy.

Second, business semantics are not obvious from column names. A field called state might mean a sales lifecycle state, an invoice state, a delivery state, an approval state, or a local customization.

Third, audit becomes weak. If the main artifact is a generated SQL query, the system still has to explain why that query was allowed, what business model it mapped to, which permission rules were applied, and whether the returned result was within the user's access boundary.

Fourth, the interface tends to expand in the wrong direction. Once arbitrary SQL is accepted, users will ask for joins, subqueries, CTEs, window functions, unsupported tables, and "just one more column." The capability looks stronger on paper, while the safety boundary becomes less clear.

For ERP AI, "supports arbitrary SQL" is not the strongest promise.

A better promise is:

The system can answer useful business questions through governed query paths, and it can clarify or reject requests when the boundary is not safe.

Enter fullscreen mode Exit fullscreen mode

ERP AI needs semantic models

A governed semantic layer changes the shape of the problem.

Instead of exposing physical tables, the system exposes query models:

  • business fields with human-readable meaning;
  • dimensions and measures;
  • supported filters and aggregations;
  • known relationships;
  • metric definitions;
  • permission and field boundaries;
  • safe execution routes.

The model no longer needs to discover the ERP from raw schema. It receives a controlled business interface.

For example, in an Odoo context, a user should ask:

Show me the top 5 customers by total sales revenue in the last 30 days.

Enter fullscreen mode Exit fullscreen mode

The system should route that through a governed sales query model, apply the effective Odoo user's permissions, execute within the supported query capability, and return structured results with evidence.

The model should not be invited to use raw tables as its primary interface.

MCP is useful, but protocol is not enough

MCP gives AI clients a standard way to call tools. That is valuable.

But MCP alone does not make a tool safe.

An MCP tool can expose raw SQL. It can ignore permissions. It can leak internal errors. It can return data the user should never see.

For enterprise data, governance has to live inside the tool boundary:

  • authentication and tenant context;
  • user or service-principal binding;
  • permission projection from the host system;
  • semantic model selection;
  • query validation;
  • result sanitization;
  • audit evidence;
  • fail-closed behavior when scope is unclear.

In other words, the tool should not simply be a protocol wrapper around database access.

It should be a governed execution boundary.

Odoo is a good case study

Odoo makes the problem concrete.

An Odoo user is not just a PostgreSQL user. Odoo controls access through model permissions, record rules, company access, and field boundaries.

If an AI tool bypasses Odoo and directly queries PostgreSQL, it risks bypassing the system that administrators actually use to govern data access.

The safer route is:

  • MCP clients connect through Odoo-issued access.
  • Query model visibility follows Odoo-side access boundaries.
  • Odoo rules are applied before query execution.
  • Multi-company boundaries are preserved.
  • Field boundaries are handled before results reach the AI client.
  • Raw database access is kept out of the model's hands.

The important point is not that Odoo is the only target.

The important point is that the host system should remain the authority for permissions and business context.

That same principle applies to other business systems as well.

Capability should be layered, not unlimited

Another mistake is to measure progress by asking:

How much SQL can the AI generate?

Enter fullscreen mode Exit fullscreen mode

For governed business data, a more useful question is:

Which classes of business questions can the system answer safely, and where does it clarify or reject?

Enter fullscreen mode Exit fullscreen mode

In Foggy, the query capability is intentionally layered:

  • standard DSL-style queries for detail rows, filters, aggregations, TopN, and trends;
  • controlled expression-style queries for comparisons, validations, and audit checks;
  • staged query patterns for ratios, cumulative contribution, SLA-style checks, and funnel-like calculations;
  • governed small-result secondary analysis;
  • clarification when time range, metric definition, grain, or business rule is missing;
  • rejection when the request asks for prediction, causal claims, physical table access, permission bypass, or write-back actions.

This is a more honest contract than "the model can write any SQL."

It allows useful business analysis while keeping unsupported requests visible.

What this means for Odoo

I am applying this design through Foggy Odoo Bridge.

The current Odoo direction is:

  • Odoo 17 Community and Enterprise;
  • Odoo.sh or On Premise as the practical deployment targets;
  • Community edition for lightweight MCP / semantic-query evaluation;
  • Pro edition for the in-Odoo AI Chat experience, curated query models, audit/export workflows, and supported production adoption;
  • standalone MCP access without requiring OpenAI or Anthropic SDKs in the Odoo environment;
  • optional built-in AI Chat when an administrator chooses to configure an LLM provider.

The intended message is not:

AI directly queries the Odoo database.

Enter fullscreen mode Exit fullscreen mode

The intended message is:

AI clients query Odoo business data through governed semantic tools while Odoo permissions remain in control.

Enter fullscreen mode Exit fullscreen mode

That distinction is the product.

The safe default

For ERP AI, I think the safe default should be:

  1. Do not expose unrestricted database schema to the model.
  2. Do not make model-generated SQL the primary interface.
  3. Expose governed semantic tools instead.
  4. Preserve host-system permissions before query execution.
  5. Return structured results with evidence.
  6. Clarify or reject when the governance boundary is not clear.

The goal is not to make AI look powerful in a demo.

The goal is to make AI data access usable inside real enterprise boundaries.

Links

Foggy Odoo Bridge Community:

https://apps.odoo.com/apps/modules/17.0/foggy_mcp

Foggy Odoo Bridge Pro:

https://apps.odoo.com/apps/modules/17.0/foggy_mcp_pro

Community repo:

https://github.com/foggy-projects/foggy-odoo-bridge

Product page:

https://odoo.foggysource.com

Docs:

https://foggy-projects.github.io/foggy-data-mcp-docs/

I am especially interested in feedback from Odoo implementers, ERP engineers, and developers building MCP tools for business data.