You are here: Re: PhP database design question « PHP Programming Language « IT news, forums, messages
Re: PhP database design question

Posted by Andy Jeffries on 03/29/06 21:51

On Wed, 29 Mar 2006 09:53:54 -0800, NC wrote:
>> Yes, a separate Table for messages sent,saved,received could give better
>> results than a whole table with all the messages,
>
> I respectfully disagree. First, this would imply that a message sent by
> user A to user B will have to exist in two instances (in the `sent` table
> for user A and in the `received` table for user B). If a user broadcasts
> a message to 100 other users, you'll have to store 101 copies of that
> message...

OK, if you only have one table, how do you cope with the situation above
when 50 people delete it from their inbox, but the others want to keep the
message.

In a logical sense it absolutely does exist in each person's inbox/sent
items as each person could apply their own choice of actions to it
(deleting it is one, it could also be marked that you've replied and when
or flagged for follow-up or marked as spam) - these aren't global for
every copy of the message.

Cheers,


Andy

--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация