DEV Community

Sualeh Fatehi
Sualeh Fatehi

Posted on

Understand Your Database Schema With ChatGPT

How would you like to get help from ChatGPT to answer questions like these?

  • What is this database about?
  • Which topic is this schema about?
  • Can you write SQL for getting book names and author names?
  • Can you suggest comments for columns that do not have them?
  • Does this database have personal data?
  • Can you suggest indexes for this database?

In order to do this, you need to describe your schema to ChatGPT. Enter SchemaCrawler. SchemaCrawler generates easy-to-read text output with tables, columns, foreign keys, and indexes. You can paste the output into ChatGPT and ask questions such as the ones above.

Let's get started. Begin with SchemaCrawler by following any of the instructions in the series on SchemaCrawler. Once you have your schema in text form, simply paste it into ChatGPT and ask your questions! You will be surprised at the help you can get.

Top comments (3)

Collapse
 
adriens profile image
adriens

btw, may I suggest adding a tag dedicated to :

  • chatgpt
  • openai
  • ai

That would make this post better indexation

Collapse
 
sualeh profile image
Sualeh Fatehi

@adriens - thanks for the idea! Now let us turn this into a collaborative effort and build it into SchemaCrawler.

Collapse
 
adriens profile image
adriens

Prefect post, perfect timing 🙌