I would like to save user messages to a database. The message will be data object ( class with fields text, sender, date) that contains the message text with meta data:
- what is the most apperoperiate data type to store object (in this case message).
- could I append the content of one object (message) to another object without having to read the column value, update t in memory and write it back to disk.
this is because I need to store all received message for user until user download them.
thanks.
text will be type of
TEXTSender should be sender Id in that case it will be
IntorShort Intand Date can be of type
DATE,DATETIMEorTIMESTAMPMore info about DATE type goes here.
Your Message will be saved and retrieved in following format
I cannot fully understand your second question.
How ever you can append data in your column in mysql using concat
http://dev.mysql.com/doc/refman/4.1/en/string-functions.html#function_concat