Click here to Skip to main content
15,885,847 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I am developing a website. I plan to add many features for users and that requires many fields for each user to store data. My problem is I don’t know if I should store all user activities in one table (questions, answers, votes, personal data ... ) or make separate tables (one for questions , one for answers ...). I would like to be able add/modify columns later.
Posted

Hi
Dear Ernest you should study about Database Normalization for get the answer about your question. a really good database should be normal at 3NF however some times we need a BCNF but more times 3NF normalization is really good normalization for working with database. you can read about normalization follow of lins:

http://en.wikipedia.org/wiki/Database_normalization[^]
http://support.microsoft.com/kb/283878[^]
http://databases.about.com/od/specificproducts/a/normalization.htm[^]
https://www.ischool.utexas.edu/~wyllys/DMPAMaterials/normstep.html[^]

Best Regards.
 
Share this answer
 
v2
It really depends on your specific needs. If I were you I would try to figure out what will be changed in the future ( new fields, new relations ...). I would expect a lot of empty fields if all data are in one table. Don’t forget to optimize database for faster search queries. Also don’t forget that database will grow over time. Take all of those factors and design database that will meet all of the requirements mentioned above and you can be wrong.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900