Artificial intelligence is increasingly shaping how developers design, query and maintain databases. While traditional database modelling tools focus on visualisation and manual schema definition, newer generations of tools integrate AI-assisted workflows to reduce complexity and improve productivity. DbSchema, a visual database design tool, has recently introduced AI-driven features that augment core development tasks rather than replacing them.
Dr. Veikko Krypczyk
Modern database systems are becoming more complex due to distributed architectures, polyglot persistence, and evolving data models. AI techniques—especially those based on large language models—are now being used to automate schema generation, optimise queries, and assist with documentation. Research trends show that AI can help translate requirements into schemas, detect inconsistencies, and improve performance tuning through learned patterns.
AI-Supported SQL Generation and Query Optimisation
One of the most notable additions in recent version of DbSchema is the integrated AI assistant. DbSchema introduced an AI component designed to support database developers in writing SQL and interacting with database structures more efficiently. A core feature is the ability to generate SQL queries from natural language prompts. Instead of manually crafting queries, database developers can describe their intent e.g., filtering, joining, aggregating and the AI translates it into executable SQL. From a technical perspective, this reduces the cognitive load when working with large schemas or unfamiliar databases. It is particularly useful in legacy schemas and by onboarding new developers. The AI assistant also supports query refinement. It can suggest improvements to existing SQL statements, such as rewriting joins for better performance, highlighting missing indexes, simplifying nested queries.
The AI can also assist with modifying an existing schema. In this case, DDL statements are proposed by the AI assistant in response to a natural language prompt. The user can review and apply these by leveraging the familiar DbSchema synchronisation workflow between different schema versions. The AI sometimes proposes multiple solutions for the same prompt, which may be applied by the user selectively. This may happen in response to a prompt involving tradeoffs between design choices not yet specified by the user.

Figure 1: AI can also assist with modifying an existing schema.
Semantic Schema Analysis and Knowledge Discovery
AI Assistant in DbSchema can also analyse table names, column types, and relationships within a schema to infer semantic meaning and structural intent. By examining patterns in naming and data organisation, it is able to identify likely foreign key relationships even when they are not explicitly defined, recognise common naming conventions used across tables and columns, and suggest potentially missing constraints that could improve data integrity and consistency. This capability supports database developers in better understanding existing database structures, especially in scenarios where documentation is incomplete or the schema has evolved over time. This is particularly helpful when reverse-engineering databases, where documentation may be incomplete.
Instead of manually navigating complex diagrams, developers can interact with the schema using natural language queries. By formulating questions such as which tables are related to orders or which entities contain user data, they can quickly retrieve relevant structural information without needing to inspect each relationship visually. This approach transforms the database schema into a searchable knowledge base, making it easier to explore, understand, and work with even large or unfamiliar data models.
AI-Enhanced Documentation and Data Handling
Documentation is often neglected in database projects due to time constraints. DbSchema integrates automation features that are enhanced by AI. DbSchema can generate HTML5 documentation directly from schema models, including detailed information about tables, relationships, and metadata. AI enhances this process by automatically generating descriptions for tables and columns, summarising the overall schema structure, and improving the readability of technical documentation. As a result, database developers can significantly reduce manual documentation effort while ensuring that the generated content remains consistent and synchronised with the actual database design.
DbSchema supports schema versioning and comparison, enabling developers to track structural changes over time. While this functionality itself is not inherently AI-driven, artificial intelligence can enhance it by explaining differences between schema versions in a more accessible way, suggesting possible migration strategies, and highlighting potential breaking changes. This becomes particularly valuable in CI/CD environments, where database evolution must be carefully managed to avoid disruptions in production systems.
Beyond schema design, DbSchema also provides capabilities for working directly with data, which can be further enhanced through AI assistance. For example, the generation of synthetic test data—traditionally based on predefined rules—can benefit from AI by producing more realistic datasets that better reflect the semantics of the schema. This leads to improved testing scenarios and more reliable results. In addition, developers can visually explore datasets and leverage AI to formulate queries, effectively bridging the gap between database design and data analysis.
DbSchema allows the user to configure the level of schema details that is sent to the AI servers with each prompt. More information sent ensures the best AI response. For example, using the full schema definition, the AI may discover that there is already a view defined that entirely answers a certain query. For users with elevated information confidentiality needs, the information sent may be restricted to specifically selected tables, or even none. In the latter case, the AI would typically still respond with a correct SQL query on generic example, which may not name the exact tables or columns used in the user’s schema. DbSchema also supports AI engines running entirely on the user’s premises, such as ollama.

Figure 2: Different AI responses – depending on the volume of data provided.
DbSchema demonstrates how AI can be integrated into database design tools in a practical and developer-centric manner. Its AI capabilities focus on concrete tasks such as generating and optimising SQL, improving schema understanding, and supporting documentation and data exploration. For software developers, the primary benefit lies not in full automation, but in reducing friction in everyday work. As AI continues to evolve, such features are likely to become standard components of database tooling, gradually shifting the developer’s role toward guided design, validation, and higher-level decision-making.
Veikko works as a developer and likes to test tools that simplify work and take care of unwanted tasks.