Forum Moderators: coopster
I am having a few road blocks on creating a user-member site. I can and have created password protected sites for myself. Though, this is going to be a multiuser site. And, never have made a site that is multiple user friendly.
I just don't know a proper layout in the tree of things.. Basically, I am wanting to build a community where members signup and they can have their own blog, forums, and possibly have the ability to customize the front page of the site, or something.
Though, I am confused on a couple of things. Should, I just make the content of the site viewable to all.. And, then always check each and everypage with a validated session on the IP's and other validation..
And, if I have all of this user-input and content.. How much and what data needs to stored in the users database row.. And, whats the basic MySQL 'layout' for storing this data..
You know, should I have a database for each sections.. Blog, Articles, Forums, Member Account info, and etc.. With the primary key linked to the users ID.. And, this all will be updated underneath the blogs database and be retreived by the users ID key..
Now, I am just rambling, I just need to step back and clear my head.. And, get a few ideas from you guys..
Thanks for all the help..
You can find books and online resources for designing databases. The actual layout is highly application specific. I think I can safely say that novice database designers tend to put too much into one table. The things that should go into the user's database row are the bits of information you want to store that adequately define the user. You wouldn't put a blog or forum in a user's row - those imply a different set of tables.
As to what gets stored in database vs files, that's at least moderately subjective. Some programmers prefer db, some prefer files, and both have good reasons as to why - while arguments can be made for efficiency one way or the other, ultimately it's what you're most comfortable writing and maintaining. I generally lean heavily toward db because I don't like to fuss with file systems and directory permissions and such. For something structured like blogs and forums I would likely put the articles into database tables. Something more freeform like a generic web page I would be more apt to store as a file.
I have never thought much of flow charts because the flow appears in my head and it seems a waste of time to draw it all out when I can consult my head so much faster. However, if you're not sure how you want to define a thing, you may find a lot of value in grabbing a stack of paper and diagramming what you want to do. By diagram I don't mean anything terribly formal, just whatever is going to help you flesh it out. Use a sheet for each db table you're thinking about and write in pencil. If the table starts to look a bit too complicated, grab another sheet and move some of the fields to it, making sure you've got unique identifiers that relate the information between the tables - user id, article id, that sort of thing.