In some email I received from Magnus Sundberg <[EMAIL PROTECTED]> on Mon, 31 Mar
2003 18:34:55 +0200, wrote:

> Hello Jeff,
>  From your database design it looks like that you change the 
> mailbox_idnr record in the messages table when you move mail from one 
> mailbox folder to another. I hope this is possible at least by the IMAP 
> protocoll?
> 
> The problem as I see it is the relational database structure itself. You 
> have this pointing relation MESSAGEBLK->MESSAGE->MAILBOX->USERS, quite 
> the opposite to when you are programming linked trees on a computer.
> 
> I beleive you could achevie this by another database layer, one for each 
> user and messageblk. Let's divide the messageblk into two parts 
> msgblkptr (MessageBlockPointer) and msgblkdata (MessageBlockData).
> The pointer is unique for every user and points to the Data.
> So if you send 1000 people a message you will get 1000 pointers, but 
> just one datablock.
> When you delete a pointer, you check if there are any more pointers to 
> the block, if the ointercount is zero, you also delete the data block.

that`s what the unique id`s (auto_increment/sequence).

> What is wrong with my reasoning?
 
Quite nothing, it`s very good thought.

> Except for that this will be difficult to merge into the installed base.

and change the database design slightly?

> What will the performance hit be?

i assume that there will be one, depends of the usage and environment, though.

> Is it worth the effort of changing?

surely it does.

> Please explain the problem of crosslinking.

if someone is going to move data around, simply
re-create a poiner(many ways), and I`m sure the crosslinking can be solved by a 
simple
rule, which wont permit it to happen.


cheers,
-lou

> Is this one of exchanges weak points?
> /Magnus
> 
> Jeff Brenton wrote:
> > Hello Magnus,
> > 
> > MS> Is there one new MESSAGEBLK created in the database for each user for
> > MS> these messages, or is the MESSAGEBLK shared between the users.
> > 
> > Yes, there is a complete message (1 entry into message and 2 or more
> > into messageblk tables) for each recipient. Send a message to 1,000
> > people on the system, and 1,000 copies of it exist.
> > 
> > The only system that does NOT do that, to my knowledge, is Exchange
> > Server; it maintains a separate table internally to keep track of
> > which users have seen/deleted the message, and doesn't actually delete
> > it until ALL have seen it.
> > 
> > While this is more space efficient, it is also a nightmare if certain
> > users decide to move the message to one of their mailbox folders
> > (maintained on the server, rather than on their local machine),
> > because the copy makes a new link... message bodies can be cross
> > linked endlessly, making problems if you ever need to restore the
> > database.
> > 
> > At least some backup procedures "fix" this by saving individual
> > "snapshots" of the tables, so you end up with a backup containing a
> > complete copy of these group messages for each user who hasn't purged
> > it from their mailbox, and the restore ends up having multiple copies
> > anyway...
> > 
> 
> 
> 
> 
> _______________________________________________
> Dbmail mailing list
> [email protected]
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
> 


-- 
Lou Kamenov / Network Infrastructure/Security Analyst
AEYE R&D - http://www.aeye.net          [EMAIL PROTECTED]
AEYE Commercial - http://www.aeye.biz   [EMAIL PROTECTED]
phone: +44 (0) 20 8879 9832 fax: +44 (0) 7092 129079
mobile: +44 (0) 79 0551 4036 PGP Key ID - 0xA297084A

AEYE(=AI) stands for Artificial Intelligence.

Reply via email to