Reputation: 2170
I know this has been done before somewhat but I would still like to get some consensus. When building an internal mailing system for your website, is there any advantage to have multiple tables to handle the mail. For example, with
message_id,
reply_id,
sender_id,
recipient,
subject,
message,
time,
read_status,
I seem to be able to handle everything, however, as the project scales, perhaps 2 tables would be better. I am fairly new to this, so I want to make sure I am not missing some obvious issue that might occur down the line.
Many thanks for looking at this somewhat abstract question.
Upvotes: 0
Views: 40
Reputation: 15911
is there any advantage to have multiple tables to handle the mail.
Simple thing about tables
is that their usage is directly proportional to the amount of data
( read columns ) u need to handle in your layout schema...so unless you have a big schema with lots of attributes / columns, then NO, there is no particular advantage of using multiple tables
as the project scales, perhaps 2 tables would be better.
Project Scales in what sense???
If the number of users increase then existing schema should be able to handle it as there is no need to add any new columns
If there is need to add new attributes ( read columns ) , then i think you should better normalize and set the schema before actually implementing the DB-Schema
If i would implement something for 2nd case, then ( being a lazy programmer ) i would put some columns reserved in current schema, so that, if needed, i would later rename the column to my needs and put them directly in use.....no need to redesign the schema ( in contradiction to what i said in 2nd bullet point ) !!
Upvotes: 1