your question implies that somebody knows by heart what this example does and how...
In other words, with a question like that, you have little chance to have an answer.
Anyway, to complete my previous answer on your other post...
To manage attachment, you create a second file in your DB for attachments, with a blob/binary memo field in it to store the attachment, and the ID of the message it is attached to.
Again, it couldn't be simpler