With Generative AI Database Explorer, you can explore your database schema and stored procedures using Generative AI. This tool helps you understand your database schema and stored procedures by generating SQL queries based on the schema and explaining the schema and stored procedures in the database to the user based on the stored schema.
Although there are many other tools available that perform similar functions, this tool produces a semantic model of the database schema, combined with a data dictionary and enriched using Generative AI.
The reason that this approach of enriching a semantic model rather than just querying the database directly is:
- Many databases are not normalized and have grown organically over time. This can make it difficult to understand the schema and stored procedures by just looking at the table & column names.
- Data dictionaries are often not maintained or are incomplete, but can still be useful to provide additional information about the schema.
- Additional grounding information may need to be provided by a user to ensure that the Generative AI can provide accurate information.
- Enables greater control and the database owner can review and adjust the semantic model to ensure it is correct.
- The semantic model can be stored in version control and used as an asset that is deployed as part of another application.
A console application that provides commands to manage Generative AI Database Explorer projects, including functions for:
- init-project: Initializing a new project folder with a
settings.jsonfile to contain the configuration for the project.e!!!! XOX - extract-model: Extract a representation of the database schema as a semantic model in the project folder based on the
settings.jsonfile. - data-dictionary: Update an extracted semantic model with additional information provided from a set of data dictionary files.
- enrich-model: Enrich an existing semantic model of a database schema in the project folder based on the
settings.jsonfile using Generative AI to produce an enriched semantic model. - show-object: Show the details of a table, column, or stored procedure in the semantic model.
- query-model: Answer questions based on the semantic model by using Generative AI. This includes recommending SQL.
This planned app is a simple web application that can take an enriched model and enable a user to explore the database schema and stored procedures using chat.
All commands require the -p/--project setting that specifies a folder on disk called a "project folder" that will contain a settings.json file that the user will configure before being able to execute any other commands.
This is a representation of the database schema that is enriched by Generative AI. The semantic model is stored in subfolder in the project folder with the name of the database in a file called semanticmodel.json. The semantic model must be produced by the console tool before it can be used to querying or with the web application.
Dependabot follows the dependabot-monthly-v1 policy. Routine version updates are scheduled monthly for the first calendar day of the month at 09:00 Pacific/Auckland time. Minor and patch updates are grouped per configured ecosystem and directory as nuget-minor-and-patch or github-actions-minor-and-patch; major updates remain separate pull requests. A three-day release-age cooldown applies to version updates.
Security updates are the exception to the monthly window: Dependabot security pull requests remain event-driven and are grouped separately as nuget-security or github-actions-security. For an urgent routine update, manually check the relevant Dependabot entry for updates rather than waiting for the next monthly scan. A manual check can run outside the normal schedule; the release-age cooldown may still defer recent versions.
The configured coverage remains NuGet in /genai-database-explorer-service and GitHub Actions in /. Other manifests and configuration types are not enabled by this policy.
This repository is provided "as is" without warranty of any kind, whether express or implied. Use at your own risk! The author will not be liable for any losses or damages associated with the use of this repository.
It is intended to be used as a starting point for your own project and not as a final product.
Copyright (c) 2024 Daniel Scott-Raynsford
Licensed under the MIT license.
- Daniel Scott-Raynsford | @github | danielscottraynsford.com
- Project Link: https://github.com/PlagueHO/genai-database-explorer
TBC
TBC