I recently tried out ChatGPT for variety of database specific functions. I wanted to make use of it as a tool that does the database operations. Like say I want it to create the scripts, I wanted it to execute the same. And that I feel like making the option for administration of the database.
My current focus is that the ChatGPT should work for the SQL dialect for now. I have not yet tried out as a simple noSQL interpreter. But if things work around positively that would be a good option in near future for me to test some of the operations.
So let's say you create a prompt where you want the ChatGPT to act like a database admin. Here are some of the things that you do for the same and enter it into the prompt.
First thing I did is entered a prompt for making initial table creation script and that you can see in the result of the following image. You would be able to see this if I were to share the link but currently I need to keep the prompt private.
Now that you have a table, you need to add some of the dummy data. And then you would be able to run the query for the same like this. You can check out the image for the type of the script that work with the insert query.
Now from here onwards you have a table and some of the test data that you can enjoy for some of the sample dataset. So if you create say like SQLite database file and happen to add some sample data into the table that would have some sample to run on the table.
If you check my original prompt you can see that I played around with some value because I wanted to sort some of the data. And also I wanted to clean it for certain parameters so that I don't have to run the queries specifically while creating another table.
It was a good experience trying out some of the queries with the table and the database. It turned out like things were lot fun that way. I hope that more queries I run on some of those tables things would be pretty cool to work with as well. In short, things of this type using the queries for managing the database.
I feel ChatGPT and the HuggingFace GPT API are good for working with the database and making your queries simple. You can use it for the job too. So it is going to make your life lot interesting as of now. I don't feel like this would be any bad or removing people from the job too.