{"id":111266,"date":"2026-10-02T12:00:00","date_gmt":"2026-10-02T12:00:00","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/?p=111266"},"modified":"2026-09-29T15:09:20","modified_gmt":"2026-09-29T15:09:20","slug":"what-really-happens-when-you-let-ai-design-your-database-schema-everything-you-should-know","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/ai\/what-really-happens-when-you-let-ai-design-your-database-schema-everything-you-should-know\/","title":{"rendered":"What really happens when you let AI design your database schema (everything you should know)"},"content":{"rendered":"\n<p><strong>AI coding assistants have become a fixture in most developers&#8217; workflows, but when it comes to databases, the picture gets complicated fast. Over 60% of developers don&#8217;t use AI for database tasks at all \u2014 and for good reason. From confusing MariaDB with MySQL to generating over-engineered schemas that solve the wrong problem entirely, AI chatbots make enough database mistakes that MariaDB has had to create eight dedicated SKILL.md files just to correct them. <\/strong><\/p>\n\n\n\n<p><strong>This article breaks down why AI struggles with database schemas specifically, how vague prompts lead to schemas that are technically valid but practically useless, and what you actually need to do to get reliable results when you do use it.<\/strong><\/p>\n\n\n\n<p>Nowadays, are there still any developers who actively code <em>without <\/em>AI assistance? Some may argue that <a href=\"https:\/\/chatgpt.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">ChatGPT<\/a> has already alleviated most of the hassle, and many developers use other <a href=\"https:\/\/uk.pcmag.com\/ai\/148205\/the-best-ai-chatbots\" target=\"_blank\" rel=\"noreferrer noopener\">AI chatbots<\/a> like Claude to assist them with numerous tasks, from the mundane to the most challenging. <\/p>\n\n\n\n<p>This is despite it being well known that AI is not always the best tool to turn to when your database suffers a disaster. It&#8217;s certainly not a &#8216;one-size-fits-all&#8217; solution. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-ai-and-what-can-it-do-for-you\">What is AI (and what can it do for you)?<\/h2>\n\n\n\n<p><strong>At the most basic level, chatbots are just intelligence derived from computers, with their task being to simply acquire, consolidate, and provide information from publicly available sources to accomplish a specified goal. <\/strong><\/p>\n\n\n\n<p>Think about it \u2013 all ChatGPT provides when you first visit the website is a chatbox and a bunch of space on top of it. That white space is filled with text that answers your question <em>once you ask something<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"765\" height=\"595\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/image-3.png\" alt=\"A basic representation of how AI chatbots work\" class=\"wp-image-111321\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/image-3.png 765w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/image-3-300x233.png 300w\" sizes=\"auto, (max-width: 765px) 100vw, 765px\" \/><figcaption class=\"wp-element-caption\"><em>A basic representation of how AI chatbots work<\/em><\/figcaption><\/figure>\n\n\n\n<p>The second to last point is especially important: information derived by any AI chatbot may not be applicable to your use case to begin with. Pay attention to any disclaimer text of the chatbot you&#8217;re using, for example in the case of ChatGPT, it explicitly says: <em>\u201cChatGPT is an AI and can make mistakes\u201d<\/em>, <em>\u201cdouble-check suggestions and sources before implementing\u201d<\/em>, and so on. <\/p>\n\n\n\n<p>The reason for this is simple: <strong>AI is not human<\/strong>. It doesn\u2019t <em>think<\/em> &#8211; it just completes tasks based on your command, using its vast training set and machine learning capabilities.<\/p>\n\n\n\n<p>For some tasks, it\u2019s great &#8211; it can quickly search for recipes, explain basic topics, <a href=\"https:\/\/www.digitaleducationcouncil.com\/dec-insights\/how-students-are-using-and-misusing-ai-in-higher-education\" target=\"_blank\" rel=\"noreferrer noopener\">assist in learning<\/a>, and provide general knowledge around world events. <a href=\"https:\/\/www.youtube.com\/watch?v=1ha65hF7NS4\" target=\"_blank\" rel=\"noreferrer noopener\">In others, not so much<\/a> &#8211; and when it comes to your database, it may be more hassle than it\u2019s worth.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-ai-and-databases-what-s-the-deal\">AI and databases &#8211; what&#8217;s the deal?<\/h2>\n\n\n\n<p>When it comes to your database, AI might not even be applicable. While, back in the day, <a href=\"https:\/\/dba.stackexchange.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">the database part of Stack Exchange<\/a> was booming, if we look at <a href=\"https:\/\/mariadb.org\/survey\/#7-4-how-is-mariadb-supported-in-the-chatbots-you-use\" target=\"_blank\" rel=\"noreferrer noopener\">the yearly survey of MariaDB regarding AI chatbots<\/a>, we can see that:<\/p>\n\n\n<div class=\"block-core-list\">\n<ol class=\"wp-block-list\">\n<li>Most users (over 60%) don\u2019t even use AI for database-related tasks<br><br><\/li>\n\n\n\n<li>AI chatbots lack knowledge about modern versions of MariaDB<br><br><\/li>\n\n\n\n<li>AI mixes up knowledge in regards to MySQL and MariaDB, provides generic database advice, doesn\u2019t know enough about database engines, and \u201chas absolutely no idea about any characteristic of MariaDB that is not part of <a href=\"https:\/\/www.red-gate.com\/simple-talk\/databases\/mysql\/\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a>. Except for a few MariaDB features that are incorrectly believed to be MySQL features.\u201d<\/li>\n<\/ol>\n<\/div>\n\n\n<p>In MariaDB&#8217;s instance, all of this led to them to conclude that AI chatbots like <a href=\"https:\/\/claude.ai\/\" target=\"_blank\" rel=\"noreferrer noopener\">Claude<\/a>, ChatGPT, and others, make enough mistakes to warrant the creation of specific <a href=\"http:\/\/skill.md\" target=\"_blank\" rel=\"noreferrer noopener\">SKILL.md<\/a> files for them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-a-skill-md-file\">What is a SKILL.md file?<\/h2>\n\n\n\n<p>A SKILL.md file is a short, curated document that you give to an AI agent to correct its assumptions and fill any gaps in knowledge it has for a specific technology. The agent reads the skill file at the start of a session and applies what it learns when applicable. At the time of writing, MariaDB has created eight SKILL.md files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-are-the-eight-skill-md-files-mariadb-has-created\">What are the eight SKILL.md files MariaDB has created?<\/h3>\n\n\n<div class=\"block-core-list\">\n<ol class=\"wp-block-list\">\n<li><strong>MariaDB features<\/strong> \u2013 a skill file informing AI about MariaDB-specific features and capabilities that go beyond standard MySQL.<br><br><\/li>\n\n\n\n<li><strong>MariaDB MCP<\/strong> \u2013 a skill file including multiple ways to connect AI agents to MariaDB using the Model Context Protocol (MCP.)<br><br><\/li>\n\n\n\n<li><strong>MariaDB query optimization<\/strong> \u2013 a skill file outlining the best practices for query optimization within MariaDB encompassing indexing strategies, <code>EXPLAIN<\/code> plans, and MariaDB-specific settings (more information in the table below.)<br><br><\/li>\n\n\n\n<li><strong>MariaDB high availability and replication<\/strong> \u2013 a skill file fixing possible mistakes that may be made by AI in terms of high availability and replication within MariaDB environments.<br><br><\/li>\n\n\n\n<li><strong>MariaDB system versioned tables<\/strong> \u2013 a skill file outlining the best practices regarding MariaDB system versioned (temporal) tables to help AI make better suggestions in terms of such tables when tracking data changes over time, meeting <a href=\"https:\/\/www.red-gate.com\/simple-talk\/blogs\/gdpr-need-know\/\" target=\"_blank\" rel=\"noreferrer noopener\">GDPR<\/a> or <a href=\"https:\/\/www.red-gate.com\/products\/redgate-monitor\/entrypage\/security-and-compliance\/\" target=\"_blank\" rel=\"noreferrer noopener\">compliance requirements<\/a>, etc.<br><br><\/li>\n\n\n\n<li><strong>MariaDB vector capabilities<\/strong> \u2013 a skill file outlining the best practices related to MariaDB vector search capabilities.<br><br><\/li>\n\n\n\n<li><strong>Differences between MySQL and MariaDB<\/strong> \u2013 a skill file outlining the key differences between MySQL (primarily MySQL &gt;=8.0) and recent versions of MariaDB.<br><br><\/li>\n\n\n\n<li><strong>Differences between Oracle and MariaDB<\/strong> \u2013 a skill file outlining the key differences between Oracle database management systems and newer versions of MariaDB.<\/li>\n<\/ol>\n<\/div>\n\n\n<p>More skill files may be coming soon. These files outline a couple of key factors.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Factor affecting your database<\/strong><\/td><td><strong>What LLMs get wrong<\/strong><\/td><\/tr><tr><td>Query optimization<\/td><td>Indexing and cardinality, <code>SELECT<\/code>s in queries with joins, <code>LIMIT<\/code> and <code>OFFSET<\/code>, <code>ALTER TABLE<\/code> operations<\/td><\/tr><tr><td>[Insert your DBMS here] features<\/td><td>Features related to storage engines, subqueries, CTEs, data types, compatibility<\/td><\/tr><tr><td>Replication and high availability<\/td><td>Replica types, treating replicas as backups, plugins<\/td><\/tr><tr><td>Vector search &amp; co.<\/td><td>Creating tables to store vector values, selecting vector values, storage engines, extensions<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>From this, we can conclude that <a href=\"https:\/\/www.cloudflare.com\/learning\/ai\/what-is-large-language-model\/\" target=\"_blank\" rel=\"noreferrer noopener\">large language models (LLMs)<\/a> aren\u2019t exactly the best companions for your database. Your schemas are no exception.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-ai-and-database-schemas\">AI and database schemas<\/h2>\n\n\n\n<p>When it comes to the schema of your beloved datastore, think of it as the backbone of your database. If you know a thing or two about backbones, you know that not all of them are the same. Some doctors would even argue that \u201cthere are no perfect backbones to begin with\u201d. The same goes for your database!<\/p>\n\n\n\n<p>Think about the application supported by your database and answer honestly \u2013 how many times have you refined your database since the start of its operations? Have you even looked at it for maintenance before? Nowadays, you don\u2019t even have to! Just slap a drawing or a screenshot of your database schema into Claude, provide the code, and ask it to fix all of the issues related to the schema.<\/p>\n\n\n\n<p>Or at least, that may be what you <em>want<\/em> to do &#8211; but that&#8217;s also where you&#8217;ll run into issues.<\/p>\n\n\n\n<section id=\"my-first-block-block_f818724ce3e06d237c492daa27de86ee\" class=\"my-first-block alignwide\">\n    <div class=\"bg-brand-600 text-base-white py-5xl px-4xl rounded-sm bg-gradient-to-r from-brand-600 to-brand-500 red\">\n        <div class=\"gap-4xl items-start md:items-center flex flex-col md:flex-row justify-between\">\n            <div class=\"flex-1 col-span-10 lg:col-span-7\">\n                <h3 class=\"mt-0 font-display mb-2 text-display-sm\">\u201cEveryone wants to move faster with AI, but few are truly ready for it.&#8221;<\/h3>\n                <div class=\"child:last-of-type:mb-0\">\n                                            What does the AI landscape look like in 2026? Get the full overview in Redgate&#8217;s 2026 State of the Database Landscape AI mini report >>                                    <\/div>\n            <\/div>\n                                            <a href=\"https:\/\/www.red-gate.com\/solutions\/state-of-database-landscape\/2026\/ai-mini-report\/\" class=\"btn btn--secondary btn--lg\" aria-label=\"Download the AI mini report: \u201cEveryone wants to move faster with AI, but few are truly ready for it.&quot;\">Download the AI mini report<\/a>\n                    <\/div>\n    <\/div>\n<\/section>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-ai-is-not-always-right\">AI is not always right!<\/h3>\n\n\n\n<p>Due to incorrectly formulated tasks, incomplete assignments, internal assumptions &#8211; and without specific skill files to help them &#8211; AI coding agents will get things wrong. They&#8217;ll simply assume one thing and build on it. Then they might assume something else. By the time you realize you\u2019re implementing nonsense, you\u2019ve already drifted too far away.<\/p>\n\n\n\n<p>A schema can be valid <a href=\"https:\/\/www.red-gate.com\/simple-talk\/blogs\/what-is-sql\/\" target=\"_blank\" rel=\"noreferrer noopener\">SQL<\/a> (<em>and<\/em> logically consistent), yet still not solve the problem you\u2019re after. This is mainly because generating database schemas is not primarily a database challenge. Effectively, it&#8217;s a business task disguised as something technical. If critical rules are missing from your prompt, they won\u2019t magically appear in your schema.<\/p>\n\n\n\n<p><a href=\"https:\/\/cloud.google.com\/discover\/what-is-prompt-engineering\" target=\"_blank\" rel=\"noreferrer noopener\">Prompts need to be crafted carefully, too<\/a>. For example, <em>\u201ca customer can have multiple addresses\u201d<\/em> will lead the AI to think &#8211; and need an answer for &#8211; &#8220;<em>What kind of addresses are they? Shipping, delivery, or perhaps IP addresses?<\/em>&#8220;. <\/p>\n\n\n\n<p>You can&#8217;t simply tell the AI to &#8216;generate a schema&#8217; without answering these questions. It leaves the chatbot without the important context it needs and, as a result, you have an ill-equipped schema.<\/p>\n\n\n\n<p>Ultimately, the problem may lay within your choice of an AI agent, your formulating of tasks, or something else &#8211; but you need to provide the AI with the context it needs. The more information you provide it, the quicker you&#8217;ll receive results &#8211; and the more accurate they&#8217;ll be.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"297\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/image-4-1024x297.png\" alt=\"How AI chatbots understand prompts\" class=\"wp-image-111323\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/image-4-1024x297.png 1024w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/image-4-300x87.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/image-4-768x223.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/image-4.png 1305w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><em>How AI chatbots understand prompts<\/em><\/figcaption><\/figure>\n\n\n\n<p>Skip context like this, and you&#8217;ll end up with schemas that <em>add<\/em> to your problems instead of solving them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-and-why-does-ai-make-so-many-mistakes\">How &#8211; and why &#8211; does AI make so many mistakes?<\/h2>\n\n\n\n<p><em>\u201cMy prompts are perfect but AI still provides nonsense responses\u201d<\/em>, you say. Well, not all chatbots are the same. Some require more context than others; not all developers ask for the exact things they need. So many elements that make up a &#8216;good&#8217; response are left up for interpretation.<\/p>\n\n\n\n<p>Basic terms like \u201cnice car\u201d, \u201caddresses\u201d, \u201cnormalize\u201d, \u201cindexes\u201d, \u201cscalable\u201d, \u201cencrypt\u201d&#8230;these all miss important context. And without context, there&#8217;s a higher chance of getting a &#8216;nonsense&#8217; response. The AI may revert to getting information from online sources which are, of course, often missing context. And sometimes they&#8217;re not what you&#8217;re looking for in the first place.<\/p>\n\n\n\n<p>ChatGPT, for instance, has a &#8216;research mode&#8217; &#8211; <a href=\"https:\/\/openai.com\/index\/introducing-deep-research\/\" target=\"_blank\" rel=\"noreferrer noopener\">Deep Research<\/a>. Some developers refer to this as <em>\u201cthe mode where ChatGPT can\u2019t make stuff up\u201d<\/em> because, by using this mode, the tool must provide credible sources for the information it feeds you.<\/p>\n\n\n\n<p>These &#8216;credible sources&#8217; need to be verified, too, since chatbots can predict upcoming words in sentences based on the data they have. Sometimes <a href=\"https:\/\/www.nature.com\/articles\/d41586-026-00969-z\" target=\"_blank\" rel=\"noreferrer noopener\">this results in citations that look perfectly real but are completely fabricated.<\/a><\/p>\n\n\n\n<p>Take a look at what happens when you provide a prompt to a chatbot like Claude. You see logos of various websites running for a couple of seconds before you see a response. This is showing the &#8216;work&#8217; the chatbot is doing behind the scenes as they search for information already online. They then aggregate excerpts of it, work on those excerpts, and <strong>provide information that may or may not be accurate.<\/strong><\/p>\n\n\n\n<p>For example, here&#8217;s ChatGPT&#8217;s summary of where it gets its information from:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"871\" height=\"1024\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/ChatGPT-871x1024.png\" alt=\"An image showing a ChatGPT conversation, asking the LLM where it gets its responses from.\" class=\"wp-image-111267\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/ChatGPT-871x1024.png 871w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/ChatGPT-255x300.png 255w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/ChatGPT-768x903.png 768w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/ChatGPT.png 962w\" sizes=\"auto, (max-width: 871px) 100vw, 871px\" \/><figcaption class=\"wp-element-caption\"><em>Asking ChatGPT where it gets its information for responses from<\/em><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-in-summary-where-ai-gets-its-information-from-and-how-to-get-the-most-accurate-information\">In summary: where AI gets its information from (and how to get the most accurate information)<\/h2>\n\n\n<div class=\"block-core-list\">\n<ol class=\"wp-block-list\">\n<li>The AI&#8217;s training data relies on theory, knowledge, and patterns that need to be created, modified, and\/or abandoned when necessary.<br><br><\/li>\n\n\n\n<li>&#8216;Reasoning from first principles&#8217;. The AI analyzes your question, looks at its sources, and provides the most relevant and accurate responses it can find.<br><br><\/li>\n\n\n\n<li>The AI may rely on information it finds online (web sources) &#8211; primarily well-regarded and reliable ones. In the case of databases, this might be official documentation, verified videos on YouTube, information from an official account on Reddit, etc. And, if using ChatGPT&#8217;s Research mode, it will cite its sources.<br><br><\/li>\n\n\n\n<li>For the best (most accurate) results, it&#8217;s crucial to provide the chatbot with as much detail as possible. Include context and specifics. &#8220;I store Blowfish-hashed passwords that are salted with a randomly-generated 5-character salt\u201c is better than saying, &#8220;I store hashed passwords.\u201c You need to refine your question to get the most accurate responses anyway.<\/li>\n<\/ol>\n<\/div>\n\n\n<p>Even if you ask AI to over-engineer a schema, it may ask you to clarify exactly what you want:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"897\" height=\"171\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/Over-engineering.png\" alt=\"An image showing what happens when you ask ChatGPT to over-engineer a database schema\" class=\"wp-image-111268\" srcset=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/Over-engineering.png 897w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/Over-engineering-300x57.png 300w, https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2026\/06\/Over-engineering-768x146.png 768w\" sizes=\"auto, (max-width: 897px) 100vw, 897px\" \/><figcaption class=\"wp-element-caption\"><em>What happened when I asked ChatGPT to over-engineer a database schema<\/em><\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-ai-over-engineered-database-schemas-and-you\">AI, over-engineered database schemas, and you<\/h2>\n\n\n\n<p>Here&#8217;s a database table schema generated by a human:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tsql decode:true \">CREATE TABLE `customer` (\n`customer_id` INT PRIMARY KEY AUTO_INCREMENT,\n`first_name` VARCHAR(100) NOT NULL DEFAULT \u2018\u2018,\n`last_name` VARCHAR(100) NOT NULL DEFAULT \u2018\u2018,\n`email` VARCHAR(100) NOT NULL DEFAULT \u2018\u2018,\n`verified` INT(1) NOT NULL DEFAULT 0\n);<\/pre><\/div>\n\n\n\n<p>And here&#8217;s an &#8216;over-engineered&#8217; database table schema generated by ChatGPT:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:tsql decode:true \">CREATE TABLE `entity_type` (\nentity_type_id INT PRIMARY KEY AUTO_INCREMENT,\ncode VARCHAR(255) NOT NULL UNIQUE\n);\nCREATE TABLE `entity` (\nentity_id BINARY(16) PRIMARY KEY,\nentity_type_id INT(255) NOT NULL,\ncreated_at DATETIME(6) NOT NULL,\ndeleted_at DATETIME(6) NULL,\nFOREIGN KEY (entity_type_id)\nREFERENCES entity_type(entity_type_id)\n);<\/pre><\/div>\n\n\n\n<p>This schema is over-engineered because every object in the database is now an <a href=\"https:\/\/www.datensen.com\/blog\/data-modeling\/what-is-a-database-entity\/\" target=\"_blank\" rel=\"noreferrer noopener\">entity<\/a>. We can go even further: we can make &#8216;customer&#8217; the entity, and add \u201ccommunication methods\u201d as per user definitions. For example, if a user has an email address, his communication method would be an email address. Or, if a user has a phone number, his communication method would be a phone number. Simple as that. <\/p>\n\n\n\n<p>OK, this may seem like a little <em>much<\/em>, but I\u2019m sure some of you have seen even worse. Ultimately, over-engineered schemas are a problem, because costs are usually immediate and certain &#8211; yet the benefits of engineering them in this way are often speculative. <\/p>\n\n\n\n<p>Most developers understand this but, judging by <a href=\"https:\/\/stackoverflow.com\/a\/1283648\" target=\"_blank\" rel=\"noreferrer noopener\">some of the questions and answers on StackOverflow<\/a>, the over-engineering habit is here to stay &#8211; at least for now.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion-ai-without-precision-is-a-liability\">Conclusion: AI without precision is a liability<\/h2>\n\n\n\n<p><strong>AI is a powerful tool, but power without precision is a liability \u2014 and nowhere is that more apparent than in database schema design. <\/strong><\/p>\n\n\n\n<p>A schema can pass every SQL validation check while completely missing the business logic it&#8217;s supposed to encode, because generating a good schema isn&#8217;t really a technical problem. It&#8217;s a business problem that happens to be expressed in SQL. <\/p>\n\n\n\n<p>If your prompt lacks context, your schema will lack correctness. The fix isn&#8217;t to avoid AI altogether, but to treat it as a capable assistant that still needs careful direction: provide full context, verify everything it produces, and never let it make architectural decisions without your oversight. The more specific your prompt, the less guesswork ends up in your schema \u2014 and the less time you spend unpicking it later.<\/p>\n\n\n\n<section id=\"my-first-block-block_c3ab39e6932a27547d929fe836757e4c\" class=\"my-first-block alignwide\">\n    <div class=\"bg-brand-600 text-base-white py-5xl px-4xl rounded-sm bg-gradient-to-r from-brand-600 to-brand-500 red\">\n        <div class=\"gap-4xl items-start md:items-center flex flex-col md:flex-row justify-between\">\n            <div class=\"flex-1 col-span-10 lg:col-span-7\">\n                <h3 class=\"mt-0 font-display mb-2 text-display-sm\">Accelerate and simplify database development with Redgate<\/h3>\n                <div class=\"child:last-of-type:mb-0\">\n                                            Automate time-consuming tasks and support consistent workflows.                                    <\/div>\n            <\/div>\n                                            <a href=\"https:\/\/www.red-gate.com\/solutions\/use-cases\/productivity-and-workflow-automation\/\" class=\"btn btn--secondary btn--lg\" aria-label=\"Learn more: Accelerate and simplify database development with Redgate\">Learn more<\/a>\n                    <\/div>\n    <\/div>\n<\/section>\n\n\n<section id=\"faq\" class=\"faq-block my-5xl\">\n    <h2>FAQs: Can AI design your database schema?<\/h2>\n\n                        <h3 class=\"mt-4xl\">1. Can AI generate a database schema for me?<\/h3>\n            <div class=\"faq-answer\">\n                <p>Yes, but with significant caveats. AI can produce syntactically valid SQL schemas, but without precise, context-rich prompts it will fill in missing business logic with assumptions &#8211; often wrong ones. The result can be a schema that looks reasonable but doesn&#8217;t actually fit your application&#8217;s needs.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">2. Why does AI get database tasks wrong so often?<\/h3>\n            <div class=\"faq-answer\">\n                <p>AI chatbots are trained on general data and don&#8217;t have deep, version-specific knowledge of your database platform. Studies from MariaDB found that most AI tools confuse MariaDB with MySQL, miss platform-specific features entirely, and give generic advice that doesn&#8217;t apply to your actual setup.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">3. What is a SKILL.md file and why does MariaDB use them?<\/h3>\n            <div class=\"faq-answer\">\n                <p>A SKILL.md file is a short document you give to an AI agent to correct its assumptions and fill gaps in its knowledge about a specific technology. MariaDB created eight of them &#8211; covering everything from query optimization to vector search &#8211; because AI tools make enough mistakes with MariaDB that they needed a structured way to set the record straight before each session.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">4. What is an over-engineered database schema?<\/h3>\n            <div class=\"faq-answer\">\n                <p>An over-engineered schema is one that adds unnecessary abstraction and complexity in pursuit of theoretical flexibility, usually at the cost of simplicity and performance. AI tools are prone to generating these when given vague prompts, producing structures where a simple customer table becomes a sprawling entity-relationship system nobody asked for.<\/p>\n            <\/div>\n                    <h3 class=\"mt-4xl\">5. How do I get better database schema results from AI?<\/h3>\n            <div class=\"faq-answer\">\n                <p>Specificity is everything. Instead of &#8220;a customer can have multiple addresses&#8221;, tell the AI exactly what types of addresses, what data needs to be stored, and what the business rules are. The more context you provide upfront, the less the AI has to guess &#8211; and the fewer assumptions end up baked into your schema.<\/p>\n            <\/div>\n            <\/section>\n","protected":false},"excerpt":{"rendered":"<p>AI can write SQL, but can it design your database schema? Learn why LLMs get databases wrong \u2014 and how to prompt them better when you do use them.&hellip;<\/p>\n","protected":false},"author":339547,"featured_media":105719,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[159169,143523],"tags":[159075,4168,159183,5854,4295],"coauthors":[146040],"class_list":["post-111266","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-databases","tag-ai","tag-database","tag-mariadb","tag-mysql","tag-schema"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/111266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/339547"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=111266"}],"version-history":[{"count":17,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/111266\/revisions"}],"predecessor-version":[{"id":111374,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/111266\/revisions\/111374"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media\/105719"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=111266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=111266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=111266"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=111266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}