• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tables in Mysql

 
Amarnath Joshi
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,

Im developing a mailing system. so im creating individual tables(Inbox,Sent.Trash) for individual users who are registered. But my VP's saying me to keep only one table for both inbox and Sent which method is secured and best practice. Please suggest me.
As i saw in some forums creating searate tables is best practice. Please help me out.
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mailing system? Single table or multiple table approach will work.

Each approach has its advantage and disadvantage.

Things to consider: maintenance/housekeeping, table data size (no of records), primary key and indexing

Which one to choose depends on how much data you expect to have per user basis. MySQL can support ten or hundred thousands of records or more depending on the storage engine (MyISAM, InnoDB etc).

For single table approach, the table will need a flag indicating what mailbox (inbox, sent box, draft, trash, etc) the mail is in. Also housekeeping of such table is recommended (eg similar to those email purging every few months for emails before such and such date).

 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch.
 
Amarnath Joshi
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You...Tsang...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic