As a follow on to Use ChatGPT to Explore Your Database Schema, SchemaCrawler's integration with ChatGPT in SchemaCrawler v16.20.4 allows you to share database metadata with OpenAI (ChatGPT), allowing for richer questions. SchemaCrawler needs your permission to share this metadata by means of an additional command-line argument,
You can ask ChatGPT very specific questions on your schema, for example to summarize the purpose of the database or to help you write SQL queries.
You can try prompts such as the following ones:
- Summarize my database schema in one paragraph
- Based on my schema, write a SQL query for book names and author names
- Based on my schema, write a SQL query to find all books that have previous editions
Please note that if you have a large schema, you may run out of the maximum possible tokens. You can adjust this by using SchemaCrawler command-line arguments to limit the number of tables with regular expressions. Or you can use SchemaCrawler's integration with ChatGPT as described in Part 1, without