Need Help for Database Structure
Hi folks!
I'm building an Online Turkish Dictionary where I want users can contribute to the dictionary by adding, editing and maybe removing the words, meanings, pronunciations and so on. (using t3-create-app, app dir with drizzle and postgres)
You can see the initial ER Diagram in the first picture.
What I actually want is that users can request changes for words, meaning, and all other tables related to a dictionary. Imagine user sees a typo or misinformation in a word, meaning, or partOfSpeech of a meaning, they can request editing by sending the edited data, removing data or adding a new data to the dictionary. As you can see in the first pic, I have user roles which means these requests can be in pending state and accepted or rejected by authorized people.
I thought that extra tables suffixed with Requests like Word_Requests, Meaning_Requests would solve it. However, I realized that it almost doubles my table count since I need this logic for all tables. See the second diagram. I couldn't even complete the diagram here :D
I asked chatGPT what I want and it suggested me the idea of creating Requests table as below:
It makes sense to me at first glance but I'm not sure about it. This approach seems flexible and scalable. I guess I can even create dynamic pages to show what's requested to change ? What do you guys think ?
I'll be grateful if I can have your opinions. You can ask me anything especially if something is not clear.
0 Replies