views:

13

answers:

1

Hello!

Can you advice how to store email MessagePart hierarchy into database (SQLite)?

Parts can be of different MIME type (text, image, etc). Also they can be multipart.

The only way I see is to store all parts in single MessageParts table with content_bytes field and mime_type field + parent_id for multipart

Is it ok? Is there some better way?

Thanks!

A: 

Look up "generalization specialization relational modeling" and you will find some excellent articles on the web. This is well understood, but often overlooked.

Walter Mitty