Hi,
I'm workign on a project that requires a private 'forum' style communications between two users.
I was just wondering what is that standard database table design for forums? Im only asking about the way that posts are handled not all of the user data.
Is there just one table where the posts are identified by an id number and then reply posts are linked to this id number but differentiated by their order number?
IE
Original post (new thread) - POST ID, AUTHOR etc
Reply - POST ID, AUTHOR, REPLY NUMBER (1)
Reply - POST ID, AUTHOR, REPLY NUMBER (2)
...and so on.
Or is it more complicated than this?
Thanks
rj
[SOLVED]forum db implementation
Moderator: General Moderators
-
rubberjohn
- Forum Contributor
- Posts: 193
- Joined: Fri Feb 25, 2005 4:03 am
[SOLVED]forum db implementation
Last edited by rubberjohn on Sun Feb 05, 2006 3:22 pm, edited 1 time in total.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
most that I've seen use a single table for all posts. There is another table for thread identification, which simply has a subject field, and a few other bits specific to threads that posts do not share. Posts store the rest of the information, which may include subject, various settings, the post it is in reply to, the post text, and so forth.
-
rubberjohn
- Forum Contributor
- Posts: 193
- Joined: Fri Feb 25, 2005 4:03 am
ok cheers thats cleared that up.
what would be the best way to secure the forum. the way it will work is that one user will view anothers profile and leave them a message. the system will only allow the two users to communicate in that particular thread.
is it enough just to include the author and the recipient in the original thread submission to the database table and then check the credentials of the user against that table when they try to either read or submit to the thread?
thanks again
rj
what would be the best way to secure the forum. the way it will work is that one user will view anothers profile and leave them a message. the system will only allow the two users to communicate in that particular thread.
is it enough just to include the author and the recipient in the original thread submission to the database table and then check the credentials of the user against that table when they try to either read or submit to the thread?
thanks again
rj
-
rubberjohn
- Forum Contributor
- Posts: 193
- Joined: Fri Feb 25, 2005 4:03 am