DEV Community

Sualeh Fatehi
Sualeh Fatehi

Posted on

1

Use ChatGPT to Explore Your Database Schema - Part 2

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, --use-metadata.

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 --use-metadata.

API Trace View

How I Cut 22.3 Seconds Off an API Call with Sentry

Struggling with slow API calls? Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

Top comments (4)

Collapse
 
sualeh profile image
Sualeh Fatehi

@adriens - here you go with your feature request.

Collapse
 
adriens profile image
adriens

Wouldn't you like to create a dedicated Schemacrawler on ChatGPT series ?

Collapse
 
sualeh profile image
Sualeh Fatehi

I think I am done for the time being. This was a fun ride. Thanks for all your suggestions.

Collapse
 
adriens profile image
adriens

Awesome... just have to play with it now !

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay