The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Forum database stricture
joyful
post Jun 9 2011, 01:44 PM
Post #1


Advanced Member
****

Group: Members
Posts: 239
Joined: 15-November 10
Member No.: 13,147



Hey!

Simply out of personal interest, I was wondering what then standard stricture of a forum database is...
For example, HTML help: Is each topic a new table? and each sub category (Like Programming etc,) a new database?
Or, is the whole forum one database?

Also, I am wondering this about a mySQL database forum (I am sure there other database types, but I am wondering about mySQL)

Thanks! smile.gif I was just wondering!

--
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
joyful
post Jun 14 2011, 02:36 PM
Post #2


Advanced Member
****

Group: Members
Posts: 239
Joined: 15-November 10
Member No.: 13,147



Anyone?

I was simply thinking about and wondering what this sort of thing would be like...

What would the stricture of a large database of this kind be like?
Would each topic be a table?

Thanks a lot! smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Jun 14 2011, 05:53 PM
Post #3


WDG Member
********

Group: Root Admin
Posts: 8,146
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



If I were designing a forum, I'd have the entire forum be a single database. I wouldn't create separate databases for each topic.

BTW, the word you're looking for is "structure" not "stricture". The word "stricture" means something else entirely.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Jun 15 2011, 02:18 AM
Post #4


Jocular coder
********

Group: Members
Posts: 2,298
Joined: 31-August 06
Member No.: 43



QUOTE(joyful @ Jun 15 2011, 04:36 AM) *

Anyone?

I was simply thinking about and wondering what this sort of thing would be like...

What would the stricture of a large database of this kind be like?
Would each topic be a table?



A table is a collection of entries, each having the same structure. And each *topic* has the same structure. It therefore makes no sense to have one table per topic. You need a table TOPIC, in which each entry contains all the bits of info relating to a single topic. But within a topic there will be many posts; you therefore need a table POST, in which each entry contains all the bits of info relating to a single post. Each entry in the POST table will include the id of the TOPIC to which it belongs.

(This is "database 101", I think...)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
joyful
post Jun 15 2011, 01:00 PM
Post #5


Advanced Member
****

Group: Members
Posts: 239
Joined: 15-November 10
Member No.: 13,147



Hey! Thanks for the replies.
Sorry about the misspelling (structure), my bad! wacko.gif

So, it would be made of 1 database that had 2 tables. (POST and TOPIC)
So, The TOPIC table would basically be a list of all the topics?
And the POST table would be all of the posts (they would be coordinated with the topic they are from in the TOPIC table)?

Do I understand correctly?

Thanks a lot! smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Jun 15 2011, 03:01 PM
Post #6


WDG Member
********

Group: Root Admin
Posts: 8,146
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



That sounds like a reasonable approach to me. But you're likely to have more than just those 2 tables.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
joyful
post Jun 15 2011, 07:36 PM
Post #7


Advanced Member
****

Group: Members
Posts: 239
Joined: 15-November 10
Member No.: 13,147



What else would you have? Maybe "USERS"?

Anything else?

Thanks again! smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Jun 15 2011, 08:15 PM
Post #8


WDG Member
********

Group: Root Admin
Posts: 8,146
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Yes, USERS seems like a given, unless all the posts are anonymous. And if users can upload files, then you might need a table for those. And so on, depending on the functionality you're going to implement.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
joyful
post Jun 17 2011, 01:56 PM
Post #9


Advanced Member
****

Group: Members
Posts: 239
Joined: 15-November 10
Member No.: 13,147



Yes... That is true...

Thanks a lot Darin and Brian... That perfectly answers my question! blush.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 7th July 2015 - 06:04 AM