currently I am working on a kind of "Chat" Application.
The app consists of "threads". Each of this threads consist of "subthreads" in wich a user can send a message (like a group). But there also should be an option to send private messages.
Firstly I have to say that I have basically no knowlege about NoSQL-Databases. I only know some of it´s dis- or advantages. I also noticed that NoSQL is not NoSQL. In my case I mean a json (or similar) based NoSQL-Database.
So now my question is if I should use a SQL(RDBMS) or NoSQL Design. I saw a lot of "tutorials" using NoSQL-Databases.
In my understanding a SQL Datatbase would be more practicable and efficient, because there would be a lot of Selecting and joins depending on ids, etc... With a a NoSQL you would end in a giant Json for every entry that has to be read every time.
My SQL Scheme should be something like this
readby <- this would be a json/array. Not optimal for SQL.
attachmentids <- this would be a json/array. Not optimal for SQL.
- This is not the finished naming or rows, but just an example how it could look like. Nevertheless I would be pleased about improvement suggestions
If you recommend a NoSQL Database, can you please provide an example on how I could efficiently save this data?
Thank you guys
Edit: I plan to fetch the messages quite regulary from the client. But because it should work offline, there will be also an storage of messages to the client locally (therefor I probably need to work with JSON). But only after the data was correctly stored on the server. So the client only has the data, the server has, locally.