Last post Mar 23, 2010 09:36 AM by nisarkhan
Mar 19, 2010 10:50 AM|ScottyG|LINK
for years now I have had a problem with trying to design the best database design for an internal email messaging system for a website.
I would have thought that this would be a fairly easy thing to think of at this point in my development history but it still eludes me to no end.
What irratates me even more is that I would think i could find something online giving more detail about it but i have yet to find the right search term to use
Mar 19, 2010 10:59 AM|qwe123kids|LINK
What U really want??
Mar 19, 2010 11:08 AM|ScottyG|LINK
What the structure of the database should look like.
I can do all the sql for it but the structure is what has me confused
What mainly gets confusing is the part where people can reply to an email so the table should have a to and from field which would house the userid's
Then there is the issue of deletion if one I delete a message you sent to me you may want to keep it in your sent items so how do I do all of this to make it as close to a natural email as possible as far as the database structure goes.
Mar 19, 2010 12:22 PM|atconway|LINK
You are correct, there does not seem to be a lot of database schema designs online for a typical email system, but your same question comes up from time to time. The questions usually dead end the same way; What functionality do you want in your email system
because that dictates the database design. A simple email tracker might not have replies, etc so the schema is much more simple.
I will say this, if you can't get your mind wrapped around the complexities of the database schema for all of the email functionality, you will have many times the frustration once you set out to wrap code around it. Just because you might figure out the
schema, will not result in a finished product.
The elements of an email are not overly complicated (to, from, subject, date, priority, etc), so that is why I don't think there is a ton of buzz on the matter. I recommend starting your db from scratch step by step, with the easier columns and then build
out the lookup tables for tracking replies, etc.
Here are some threads previously where something like this was discussed:
request for database design for email system:
..as you can see a lot of the threads dead end. You may want to post back with what you have already so people can improve or offer advice on the design.
Mar 19, 2010 12:38 PM|DigiMortal|LINK
I don't know exactly what is the goal of your database (is it storage for mail server or is it some internal business application). If it for e-mail archive then I would consider some not so complex SharePoint solution.
Mar 19, 2010 12:44 PM|ScottyG|LINK
The purpose of the internal messaging system is just the same as in facebook, myspace etc... the same thing that any good community website would have.
as far as what i have currently well that would be nothing because this time around i figured i would reach out to the world and see what others had to input on this instead of repeating the same mistakes over and over again
Mar 23, 2010 09:36 AM|nisarkhan|LINK
there is a very good chapter in the book "ASP.NET 3.5 Social Networking" look for chatper 6 it give detail design of db and also other techniques.