Creating and Indexing Email Database using SqlCe

Posted by Anindya Chatterjee on Stack Overflow See other posts from Stack Overflow or by Anindya Chatterjee
Published on 2010-05-18T05:53:52Z Indexed on 2010/05/18 6:00 UTC
Read the original article Hit count: 464

Filed under:
|
|
|
|

I am creating a simple email client program. I am using MS SqlCe as a storage of emails. The database schema for storing the message is as follows:

StorageId int IDENTITY NOT NULL PRIMARY KEY,
FolderName nvarchar(255) NOT NULL,
MessageId nvarchar(3999) NOT NULL,
MessageDate datetime NOT NULL,
StorageData ntext NULL

In the StorageData field I am going to store the MIME message as byte array. But the problem arises when I am going to implement search on the stored messages. I have no idea how I am going to index the messages on top of this schema.

Can anyone please help me in suggesting a good but simple schema, so that it will be effective in terms of storage space and search friendliness as well?

Regards,

Anindya Chatterjee

© Stack Overflow or respective owner

Related posts about email

Related posts about .NET