Looks real good, Paul.
Happy New Year.

best..
Mike


----- Original Message ----- 
From: "Paul J Stevens" <[EMAIL PROTECTED]>
To: "DBMAIL Developers Mailinglist" <dbmail-dev@dbmail.org>
Sent: Friday, December 31, 2004 8:19 AM
Subject: [Dbmail-dev] header storage schema changes. (W)Here we (may) go.


> Hi all,
>
> I'm working towards header storage.  Came across what looks like a very
> useful design at http://yukatan.sourceforge.net
>
> Though the design is not a perfect fit for dbmail there are some very
> useful ideas in there. In fact they combine some of the ideas posted on
> the list before.
>
> Add some fields to the physmessage table (these all refer to rfc2822
> headers).
>
> sendername varchar(xx),
> senderaddr varchar(xx),
> subject varchar(xx),
> messageid varchar(xx)
>
> Add a separate headerfield table which will contain *all* headers for a
> given message.
>
> CREATE TABLE headerfield (
>         physmessage_id  int NOT NULL,
>
>         CONSTRAINT headerfield_physmsg
>                         FOREIGN KEY (physmessage_id)
>                         REFERENCES dbmail_physmessage(id)
>                         ON UPDATE CASCADE ON DELETE CASCADE,
>
>         fieldno         INTEGER NOT NULL,
>
>         CONSTRAINT headerfield_key
>                         PRIMARY KEY (physmessage_id, fieldno),
>
>         fieldname       VARCHAR(128) NOT NULL DEFAULT '',
>         fieldbody       VARCHAR(255) NOT NULL DEFAULT ''
> );
>
>
> And split out some very common headers to their own tables along the same
lines:
>
> CREATE TABLE inreplytofield (...);
> CREATE TABLE referencesfield (...);
> CREATE TABLE fromfield (...);
> CREATE TABLE replytofield (...);
> CREATE TABLE tofield (...);
> CREATE TABLE ccfield (...);
>
> But perhaps these should be merged into the physmessage table.
>
> Of course, when all fields are extracted into a separate header table,
> splitting them out to a table of their own, or merging them into the
> physmessage table is not that difficult and will - I'm sure - be subject
> to further discussion.
>
>
> and a happy newyear everybody,
>
> -- 
>   ________________________________________________________________
>   Paul Stevens                                  mailto:[EMAIL PROTECTED]
>   NET FACILITIES GROUP                     PGP: finger [EMAIL PROTECTED]
>   The Netherlands________________________________http://www.nfg.nl
>
> _______________________________________________
> Dbmail-dev mailing list
> Dbmail-dev@dbmail.org
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>

Reply via email to