I am making a chat app for android with phone gap and PHP at back end. as its my first time am building a chat app,so i m little confused that how to store chat messages,
storing messages in database
A. one row for each message (but with this size of db gonna large and speed slow)
B. one row for all messages but this is not good i think
storing messages in text file and appending but i feel its gonna be very slow and hard to maintain
storing messages in XML but time in parsing XML and storing complexity gonna create problem
so i end up with no solution,please suggest me some solution and i m new to forum so be patient at my silly mistakes and how big fishes like fb,whats app store their messages>