Best way to model the database of a chat [closed]

5

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.

    
asked by anonymous 15.08.2014 / 19:58

1 answer

-1

Another solution would be for you to use Dropbox. If the user wanted to have a message history, he could log in through Dropbox and from there, you would have access to save files to his account through the Dropbox API. So you would not take up space in your database: D

    
15.08.2014 / 20:55