I have an application that works with webServices and the mysql database, I'm putting a chat on it, the part about how to get messages, view notifications and search for users I already have, my question is:
How should I store my messages in the bank?
I thought of some ways, but I do not find it interesting. The first one was, I would create a table messages in my bank and it would have sender, recipient and message, but I do not believe to be interesting as messages can take up a lot of space in my bank. The second was, I would not use my external bank, but SQLite, in it I would save the history of the conversations, so each user would only have their messages in his bank. But this I can not do, because if my user logs into your account on another device, the messages would not be there.