Currently I'm storing the report generated by ChatGPT in separate tables. This is unnecessarily complex and prone to error. I store the sections of the report in separate tables (summary, tags, key takeaways, etc). Although fetching and storing the data is still fast, it could be even faster and simplified to reduce opportunity for errors.
Solution
Store the report as a single string under the report column of the sermons table. If you want to have the raw data, just store the raw data under a report_json column as a json string, which you can then retrieve and parse on the front-end.
Currently I'm storing the report generated by ChatGPT in separate tables. This is unnecessarily complex and prone to error. I store the sections of the report in separate tables (summary, tags, key takeaways, etc). Although fetching and storing the data is still fast, it could be even faster and simplified to reduce opportunity for errors.
Solution
Store the report as a single string under the
report
column of thesermons
table. If you want to have the raw data, just store the raw data under areport_json
column as a json string, which you can then retrieve and parse on the front-end.